【发布时间】:2017-12-18 17:06:13
【问题描述】:
我了解了 deconvlucy 和 deconvwnr 技术来消除运动模糊,它们在模拟去模糊图像上效果很好。因此,我试图在手机拍摄的真实镜头上检查这个算法。我还使用 Movavi 视频编辑器稳定了视频。
这是我的代码:
I = imread('mobile_blur13.png');
imshow(I);
lengthmin = 12;
lengthmax = 15;
thetamin =331;
thetamax=335;
figure;
for length = lengthmin:0.2:lengthmax
for theta = thetamin:0.5:thetamax
PSF = fspecial('motion',length,theta);
res = deconvlucy(I,PSF,100);
res2 =deconvreg(I,PSF);
noise_var = 0;
signal_var = var(double(I(:)));
estimated_nsr = noise_var/signal_var;
res1= deconvwnr(I,PSF,estimated_nsr);
%res = medfilt2(rgb2gray(res));
f = imfilter(res, fspecial('average', [3 3]));
imshow(f);
end
end
但是,我得到了非常糟糕的结果。我可以知道做错了什么。 这是一张图片:
提前致谢
【问题讨论】: