The Richardson–Lucy algorithm, also known as Lucy–Richardson deconvolution, is an iterative procedure for recovering a latent image that has been blurred by a known point spread function. It was named after William Richardson and Leon Lucy. 
Pixels in the observed image can be represented in terms of the point spread function and the latent image as
where is the point spread function (the fraction of light coming from true location that is observed at position ), is the pixel value at location in the latent image, and is the observed value at pixel location . The statistics are performed under the assumption that are Poisson distributed, which is appropriate for photon noise in the data.
The basic idea is to calculate the most likely given the observed and known . This leads to an equation for which can be solved iteratively according to
It has been shown empirically that if this iteration converges, it converges to the maximum likelihood solution for .
where the division and multiplication are element wise, and is the flipped point spread function, such that
In problems where the point spread function is dependent on one or more unknown parameters, the Richardson–Lucy algorithm cannot be used. A later and more general class of algorithms, the expectation-maximization algorithms, have been applied to this type of problem with great success
For the two dimensional case this can be implemented in MATLAB, to estimate the latent greyscale image from a known blurred image and point spread function:
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 end
The MATLAB image processing toolbox has an implementation in the function deconvlucy as well as a demo on its usage.
- Richardson, William Hadley (1972). "Bayesian-Based Iterative Method of Image Restoration". JOSA 62 (1): 55–59. doi:10.1364/JOSA.62.000055.
- Lucy, L. B. (1974). "An iterative technique for the rectification of observed distributions". Astronomical Journal 79 (6): 745–754. Bibcode:1974AJ.....79..745L. doi:10.1086/111605.
- Shepp, L. A.; Vardi, Y. (1982), "Maximum Likelihood Reconstruction for Emission Tomography", IEEE Transactions on Medical Imaging 1: 113, doi:10.1109/TMI.1982.4307558
- Fish D. A.,; Brinicombe A. M., Pike E. R., and Walker J. G. (1995), "Blind deconvolution by means of the Richardson–Lucy algorithm", Journal of the Optical Society of America A 12 (1): 58–65, Bibcode:1995JOSAA..12...58F, doi:10.1364/JOSAA.12.000058
- A.P. Dempster, N.M. Laird, D.B. Rubin, 1977, Maximum likelihood from incomplete data via the EM algorithm, J. Royal Stat. Soc. Ser. B, 39 (1), pp. 1–38