The Cozy Hut of Dr. Zhang分享 http://blog.sciencenet.cn/u/zjzhang

博文

离散余弦逆变换---idct2函数

已有 6877 次阅读 2011-11-20 12:30 |个人分类:图像分析(matlab,PDE)|系统分类:科研笔记

clear all;

RGB=imread('autumn.tif');

figure(1);imshow(RGB);title('原始图像');

I=rgb2gray(RGB);
D=dct2(I);

figure(2);imshow(log(abs(D)),[]);colormap(jet(64));colorbar;
title('离散余弦变换结果');

tmp=D;
tmp(abs(D)<10)=0;
K=idct2(tmp);
figure(3);imshow(K,[0 255]);title('反变换图像1');

tmp=D;
tmp(abs(D)<50)=0;
K=idct2(tmp);
figure(4);imshow(K,[0 255]);title('反变换图像2');

tmp=D;
tmp(abs(D)<100)=0;
K=idct2(tmp);
figure(5);imshow(K,[0 255]);title('反变换图像3');



https://wap.sciencenet.cn/blog-287000-509902.html

上一篇:离散余弦变换---dct2函数
下一篇:JPEG 压缩原理 --- dctmtx 函数的应用
收藏 IP: 121.33.190.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-23 12:05

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部