{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / restoration / deconvolution / richardson_lucy

function

skimage.restoration.deconvolution:richardson_lucy

source: /dev/scikit-image/src/skimage/restoration/deconvolution.py :359

Signature

def   richardson_lucy ( image psf num_iter = 50 clip = True filter_epsilon = None )

Summary

Richardson-Lucy deconvolution.

Parameters

image : ([P, ]M, N) ndarray

Input degraded image (can be n-dimensional). If you keep the default clip=True parameter, you may want to normalize the image so that its values fall in the [-1, 1] interval to avoid information loss.

psf : ndarray

The point spread function.

num_iter : int, optional

Number of iterations. This parameter plays the role of regularisation.

clip : bool, optional

True by default. If true, pixel value of the result above 1 or under -1 are thresholded for skimage pipeline compatibility.

filter_epsilon : float, optional

Value below which intermediate results become 0 to avoid division by small numbers.

Returns

im_deconv : ndarray

The deconvolved image.

Examples

from skimage import img_as_float, data, restoration
camera = img_as_float(data.camera())
from scipy.signal import convolve2d
psf = np.ones((5, 5)) / 25
camera = convolve2d(camera, psf, 'same')
rng = np.random.default_rng()
camera += 0.1 * camera.std() * rng.standard_normal(camera.shape)
deconvolved = restoration.richardson_lucy(camera, psf, 5)

Aliases

  • skimage.restoration.richardson_lucy