matlab - Would Richardson–Lucy deconvolution work for recovering the latent kernel? -
i aware richardson–lucy deconvolution recovering latent image, suppose have noisy image , original image. can find kernel caused transformation?
below matlab code richardson-lucy deconvolution , wondering if easy modify , make recover kernel instead of latent image. thoughts change convolution options valid output represent kernel, think?
function latent_est = rl_deconvolution(observed, psf, iterations) % utilise conv2 function must make sure inputs double observed = double(observed); psf = double(psf); % initial estimate arbitrary - uniform 50% grey works fine latent_est = 0.5*ones(size(observed)); % create inverse psf psf_hat = psf(end:-1:1,end:-1:1); % iterate towards ml estimate latent image 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 thanks in advance.
this simple problem. convolution commutative. hence, don't need change implementation of rl deconvolution obtain psf, can call follows:
psf = rl_deconvolution(observed, latent_est, iterations)
Comments
Post a Comment