skimage2.restoration.richardson_lucy#
- skimage2.restoration.richardson_lucy(image, psf, num_iter=50, clip=True, filter_epsilon=None)[source]#
Richardson-Lucy deconvolution.
- Parameters:
- image([P, ]M, N) ndarray
Input degraded image (can be n-dimensional). If you keep the default
clip=Trueparameter, you may want to normalize the image so that its values fall in the [-1, 1] interval to avoid information loss.- psfndarray
The point spread function.
- num_iterint, optional
Number of iterations. This parameter plays the role of regularisation.
- clipbool, optional
True by default. If true, pixel value of the result above 1 or under -1 are thresholded for skimage pipeline compatibility.
- filter_epsilonfloat, optional
Value below which intermediate results become 0 to avoid division by small numbers.
- Returns:
- im_deconvndarray
The deconvolved image.
References
Examples
>>> from _skimage2 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)