adong7639

图像处理之小波变换

Matlab 小波变换

lean图像的行列应该满足2的幂次方

img  =  imread(\'lena.jpg\');
img =rgb2gray(img);
img = double(img);

[ca1 ch1,cv1,cd1] = dwt2(img,\'haar\');
figure;
imshow([uint8(ca1),uint8(ch1);uint8(cv1),uint8(cd1)]);
title(\'first wavelet decomposition\');

[ca2 ch2,cv2,cd2] = dwt2(ca1,\'haar\');
figure;
imshow([uint8(ca2),uint8(ch2);uint8(cv2),uint8(cd2)]);
title(\'second wavelet decomposition\');

% restruct img
img_ca1 =  idwt2(ca2,ch2,cv2,cd2,\'haar\');
img_re = idwt2(img_ca1,ch1,cv1,cd1,\'haar\');
figure;
imshow( uint8(img_re));
title(\'wavelet restruct\');

参考:

http://media.cs.tsinghua.edu.cn/~ahz/digitalimageprocess/chapter12/chapt12_ahz.htm

 

分类:

技术点:

相关文章:

  • 2021-11-18
  • 2021-11-28
  • 2021-05-26
  • 2021-11-18
  • 2021-05-30
  • 2021-12-20
  • 2021-12-08
  • 2021-12-08
猜你喜欢
  • 2021-11-29
  • 2021-12-12
  • 2021-12-29
  • 2022-12-23
  • 2021-04-22
  • 2021-08-24
  • 2021-11-23
相关资源
相似解决方案