【发布时间】:2012-06-11 19:07:08
【问题描述】:
我正在尝试使用小波变换过滤图像。我尝试从这里使用函数mdwt:http://www.mathworks.com/matlabcentral/fileexchange/6391-wavelets-based-denoising/content/mdwt.m,以及来自此链接的其他函数,如下所示:
img = imread('A10T_1.jpg');
h = daubcqf(4,'min');
L = 1;
y = mdwt(img,h,L);
问题是在最后一行我得到:One or more output arguments not assigned during call to, Error in => y = mdwt(img,h,L);
问题出在哪里?函数mdwt 仅包含声明,仅此而已,我可以看到这就是问题所在。谁能帮我解决这个问题?或者有没有其他方法可以在不使用这些函数的情况下使用小波变换过滤图像?
提前致谢。
编辑:
现在我正在尝试使用以下代码显示图像去噪使用小波变换:
RGB = imread('small.jpg');
J = imnoise(RGB,'salt & pepper',0.05);h = daubcqf(6);
noisyLena = J;
figure; colormap(gray); imagesc(RGB); title('Original Image');
figure; colormap(gray); imagesc(noisyLena); title('Noisy Image');
% Denoise lena with the default method based on the DWT
[denoisedLena,xn,opt1] = denoise(noisyLena,h);
figure; colormap(gray); imagesc(denoisedLena); title('denoised Image');
但我得到了错误
??? The matrix row dimension must be of size m*2^(L)
Error in ==> denoise at 171
[xd , LL]= mdwt(double(i),h,L);
Error in ==> wavelet_start at 20
[denoisedLena,xn,opt1] = denoise(noisyLena,h);
去噪函数在哪里:http://www.mathworks.com/matlabcentral/fileexchange/6391-wavelets-based-denoising/content/denoise.m
问题出在哪里?
【问题讨论】:
标签: image matlab image-processing wavelet