marrina
2008-05-09, 21:07
F=imread('f:\xy10082.jpg');
figure(1);
imshow(F,[]);
PSF=fspecial('motion',7,45);
MF=imfilter(F,PSF,'circular');
noise=imnoise(zeros(size(F)),'gaussian',0,0.001);
MFN=MF+noise;
figure(2);
imshow(MFN,[]);
NSR=sum(noise(:).^2)/sum(MFN(:).^2);
figure(3);
imshow(deconvwnr(MFN,PSF),[]);
figure(4);
imshow(deconvwnr(MFN,PSF,NSR),[]);
我想在已知图像中添加运动模糊和高斯噪声,然后用维纳滤波器除去噪声,运行上面的程序后针对MFN=MF+noise出现如下错误:Integers can only be combined with integers of the same class, or scalar doubles. 请问为什么呢?谢谢!
figure(1);
imshow(F,[]);
PSF=fspecial('motion',7,45);
MF=imfilter(F,PSF,'circular');
noise=imnoise(zeros(size(F)),'gaussian',0,0.001);
MFN=MF+noise;
figure(2);
imshow(MFN,[]);
NSR=sum(noise(:).^2)/sum(MFN(:).^2);
figure(3);
imshow(deconvwnr(MFN,PSF),[]);
figure(4);
imshow(deconvwnr(MFN,PSF,NSR),[]);
我想在已知图像中添加运动模糊和高斯噪声,然后用维纳滤波器除去噪声,运行上面的程序后针对MFN=MF+noise出现如下错误:Integers can only be combined with integers of the same class, or scalar doubles. 请问为什么呢?谢谢!