对图像进行二维DCT

clc;clear;close all;
data=[ 
83 78 79 70 61 66 55 42;
82 77 78 66 60 64 53 41;
80 75 76 64 58 62 52 39;
78 74 74 62 56 61 50 37;
76 72 72 60 55 59 49 36;
74 70 70 59 53 57 47 34;
72 67 69 56 51 55 45 31;
71 66 67 55 49 54 43 30;
];
    %显示读入的图像 %为了防止后一个显示的图像覆盖前一个显示结果,每次显示时调用figure生成一个新窗口 	
   figure(1);
 little_old=mat2gray(data);
  big_old = imresize(little_old,70);
 imshow(big_old)
    title('原输入图像');
new=dct2(data) ;%dct变换
  figure(2);
 little_new=mat2gray(new);
 figure(2);
    big_new = imresize(little_new,70);
    imshow(big_new);title('变换图像');

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值