【问题标题】:Motion Deblur using Matlab使用 Matlab 进行运动去模糊
【发布时间】:2017-12-18 17:06:13
【问题描述】:

我了解了 deconvlucydeconvwnr 技术来消除运动模糊,它们在模拟去模糊图像上效果很好。因此,我试图在手机拍摄的真实镜头上检查这个算法。我还使用 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

但是,我得到了非常糟糕的结果。我可以知道做错了什么。 这是一张图片:

提前致谢

【问题讨论】:

    标签: matlab image-processing


    【解决方案1】:

    使用模拟模糊对图像进行去模糊与对实际相机拍摄的照片进行去模糊非常不同。

    相机运动引起的运动模糊会显着降低图像质量。由于相机运动的路径可以是任意的,运动模糊图像的去模糊是一个难题。有几种方法可以解决这个问题,例如盲修复或使用稳定镜片进行光学校正。

    解决方法是使用盲反卷积和 deconvblind 命令。

    https://www.mathworks.com/help/images/ref/deconvblind.html

    【讨论】:

    • 我用 deconvwnr 得到的结果比 deconvblind 好一些。
    猜你喜欢
    • 2012-05-24
    • 1970-01-01
    • 2016-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-21
    • 2013-08-29
    相关资源
    最近更新 更多