匀速运动模糊视频如何恢复,求matlab程序

2024-12-19 01:41:52
推荐回答(1个)
回答1:

I=imread(' ');%自己加图片名称
figure(1);imshow(I,[]);
title('原图像');
PSF=fspecial('motion',40,75);
MF=imfilter(I,PSF,'circular');
noise=imnoise(zeros(size(I)),'gaussian',0,0.001);
MFN=imadd(MF,im2uint8(noise));
figure(2);imshow(MFN,[]);
title('运动模糊图像');
NSR=sum(noise(:).^2)/sum(MFN(:).^2);
figure(3);
imshow(deconvwnr(MFN,PSF,NSR),[]);
title('逆滤波复原');
figure(4);
imshow(deconvwnr(MFN,PSF,NSR),[]);
title('维纳滤波复原');
NP=0.002*prod(size(I));
[reg1 LAGRA]=deconvreg(MFN,PSF,NP/3.0);
figure(5);imshow(reg1);
title('最小二乘滤波复原');