corrct.denoisers
Advanced denoising methods.
@author: Nicola VIGANÒ, Computational Imaging group, CWI, The Netherlands, and ESRF - The European Synchrotron, Grenoble, France
Module Contents
Functions
Denoise an image. |
Data
API
- corrct.denoisers.eps
None
- corrct.denoisers._default_regularizer_l1dwl(r_w: Union[float, numpy.typing.NDArray]) corrct.regularizers.BaseRegularizer [source]
- corrct.denoisers.denoise_image(img: numpy.typing.NDArray, reg_weight: Union[float, collections.abc.Sequence[float], numpy.typing.NDArray] = 0.01, psf: Optional[numpy.typing.NDArray] = None, pix_weights: Optional[numpy.typing.NDArray] = None, iterations: int = 250, regularizer: Callable = _default_regularizer_l1dwl, lower_limit: Optional[float] = None, verbose: bool = True) Union[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 : Union[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 : Union[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 : Optional[float], 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.