【问题标题】:apply wavelet with haar filter and reconstruction image with approximation coefficients应用带有 haar 滤波器的小波和带有近似系数的重建图像
【发布时间】:2014-04-29 03:15:23
【问题描述】:

我想在图像上应用带有 haar 滤波器的小波,然后使用近似系数重建图像。 我在 matlab 中运行这段代码:

f = imread('pic.tif');
sX = size(f);
[cA,cH,cV,cD] = dwt2(f,'haar');
x = idwt2(cA,[],[],[],'haar',sX);
imshow(x);

这是 pic.tif:

但是输出的图片是白屏,

为什么?!

【问题讨论】:

  • 感谢您为白屏提供图片,尽管我想大多数人都可以发挥想象力。 :)

标签: matlab haar-wavelet dwt


【解决方案1】:

显然,您的图像“x”计算正确,但显示时未缩放。试试这个例子,效果很好。

load woman;
f = X;
sX = size(f);
figure,imagesc(f); colormap(gray);
wname = 'haar';
[cA,~,~,~] = dwt2(f,wname);
x = idwt2(cA,[],[],[],wname, sX);
figure,imagesc(x); colormap(gray);

【讨论】:

    猜你喜欢
    • 2016-07-19
    • 1970-01-01
    • 1970-01-01
    • 2014-07-14
    • 1970-01-01
    • 2015-11-04
    • 2010-11-08
    • 2014-06-03
    • 1970-01-01
    相关资源
    最近更新 更多