TVL1Denoising

class giant.image_processing.denoising.TVL1Denoising(options=None)[source]

Implements denoising using the total variation approach with a prime dual algorithm.

Essentially we minimize the following .. math:

\left\|\left\|\nabla \mathbf{I}\right\|\right\| + \lambda\sum_i\left\|\left\|\mathbf{I}-\mathbf{N}_i\right\|\right\|

where \(\mathbf{I}\) is the denoised image, \(\mathbf{N}_i\) are the input images, \(\nabla \mathbf{I}\) is the gradient of the smoothed image, \(\lambda\) is a tuning parameter balancing between smooth images (smaller) and crisp images (higher), and \(\left\|\left\|\bullet\right\|\right\|\) is the \(L_2\) norm operator.

Generally, this works ok for denoising but can easily mistake dim point sources for noise and can produce weird ring artifacts around point sources, therefore, for star/point source only images it is probably preferable to use something like the GaussianDenoising.

For more details on the algorithm see https://hal.science/hal-00437581v1

Parameters:

options (TVL1DenoisingOptions | None) – the options to configure the class with

allowed_dtypes: list[DTypeLike] = [<class 'numpy.uint8'>]

The allowed datatype.

Methods

__call__

Call self as a function.