corrct.denoisers

Advanced denoising methods.

@author: Nicola VIGANÒ, Computational Imaging group, CWI, The Netherlands, and ESRF - The European Synchrotron, Grenoble, France

Module Contents

Functions

_default_regularizer_l1dwl

denoise_image

Denoise an image.

Data

eps

API

corrct.denoisers.eps

None

corrct.denoisers._default_regularizer_l1dwl(r_w: float | numpy.typing.NDArray) corrct.regularizers.BaseRegularizer[source]
corrct.denoisers.denoise_image(img: numpy.typing.NDArray, reg_weight: float | collections.abc.Sequence[float] | numpy.typing.NDArray = 0.01, psf: numpy.typing.NDArray | None = None, pix_weights: numpy.typing.NDArray | None = None, iterations: int = 250, regularizer: collections.abc.Callable = _default_regularizer_l1dwl, lower_limit: float | None = None, verbose: bool = True) numpy.typing.NDArray | tuple[numpy.typing.NDArray, float][source]

Denoise an image.

Image denoiser based on (flat or weighted) least-squares, with wavelet minimization regularization. The weighted least-squares requires the local pixel-wise weights. It can be used to denoise sinograms and projections.

Parameters

img : NDArray The image to denoise. reg_weight : float | ArrayLike | NDArray, optional Weight of the regularization term. The default is 1e-2. If a sequence / array is passed, all the different values will be tested. The one minimizing the error over the cross-validation set will be chosen and returned. pix_weights : ArrayLike | NDArray | None, optional The local weights of the pixels, for a weighted least-squares minimization. If None, a standard least-squares minimization is performed. The default is None. iterations : int, optional Number of iterations. The default is 250. regularizer : Callable, optional The one-argument constructor of a regularizer. The default is the DWL regularizer. lower_limit : float | None, optional Lower clipping limit of the image. The default is None. verbose : bool, optional Turn verbosity on. The default is True.

Returns

NDArray Denoised image.