Richardson-Lucy deconvolution会为恢复潜在内核而工作吗?

时间:2014-03-12 20:08:44

标签: matlab kernel neural-network fft convolution

我知道Richardson-Lucy反卷积用于恢复潜像,但假设我们有一个嘈杂的图像和原始图像。我们能找到导致转换的内核吗?

下面是Richardson-Lucy deconvolution的MATLAB代码,我想知道是否很容易修改并使其恢复内核而不是潜在的图像。我的想法是我们将卷积选项更改为valid,因此输出将代表内核,您如何看待?

function latent_est = RL_deconvolution(observed, psf, iterations)
    % to utilise the conv2 function we must make sure the inputs are double
    observed = double(observed);
    psf      = double(psf);
    % initial estimate is arbitrary - uniform 50% grey works fine
    latent_est = 0.5*ones(size(observed));
    % create an inverse psf
    psf_hat = psf(end:-1:1,end:-1:1);
    % iterate towards ML estimate for the latent image
    for i= 1:iterations
        est_conv      = conv2(latent_est,psf,'same');
        relative_blur = observed./est_conv;
        error_est     = conv2(relative_blur,psf_hat,'same'); 
        latent_est    = latent_est.* error_est;
    end

提前致谢。

1 个答案:

答案 0 :(得分:0)

这是一个非常简单的问题。卷积是可交换的。因此,您无需更改RL反卷积的实现来获取PSF,您可以简单地调用它如下:

psf = RL_deconvolution(observed, latent_est, iterations)