[Python] How does Richardson–Lucy algorithm work? Code example?

Discussão em 'Python' iniciado por Stack, Junho 19, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to figure out how deconvolution works. I understand the idea behind it but I want to understand some of the actual algorithms which implement it - algorithms which take as input a blurred image with its point sample function (blur kernel) and produce as output the latent image.

    So far I found Richardson–Lucy algorithm where the math does not seem to be that difficult however I can't figure how the actual algorithm works. At Wikipedia it says:


    This leads to an equation for which can be solved iteratively according...
    ​

    however it does not show the actual loop. Can anyone point me to a resource where the actual algorithm is explained. On Google I only manage to find methods which use Richardson–Lucy as one of its steps, but not the actual Richardson–Lucy algorithm.

    Algorithm in any language or pseudo-code would be nice, however if one is available in Python, that would be amazing.

    Thanx in advance.

    Edit

    Essentially what I want to figure out is given blurred image (nxm):

    x00 x01 x02 x03 .. x0n
    x10 x11 x12 x13 .. x1n
    ...
    xm0 xm1 xm2 xm3 .. xmn


    and the kernel (ixj) which was used in order to get the blurred image:

    p00 p01 p02 .. p0i
    p10 p11 p12 .. p1i
    ...
    pj0 pj1 pj2 .. pji


    What are the exact steps in the Richardson–Lucy algorithm in order to figure out the original image.

    Continue reading...

Compartilhe esta Página