skimage2.restoration.denoise_tv_bregman#

skimage2.restoration.denoise_tv_bregman(image, weight=5.0, max_num_iter=100, eps=0.001, isotropic=True, *, channel_axis=None)[source]#

Perform total variation denoising using split-Bregman optimization.

Given \(f\), a noisy image (input data), total variation denoising (also known as total variation regularization) aims to find an image \(u\) with less total variation than \(f\), under the constraint that \(u\) remain similar to \(f\). This can be expressed by the Rudin–Osher–Fatemi (ROF) minimization problem:

\[\min_{u} \sum_{i=0}^{N-1} \left( \left| \nabla{u_i} \right| + \frac{\lambda}{2}(f_i - u_i)^2 \right)\]

where \(\lambda\) is a positive parameter. The first term of this cost function is the total variation; the second term represents data fidelity. As \(\lambda \to 0\), the total variation term dominates, forcing the solution to have smaller total variation, at the expense of looking less like the input data.

This code is an implementation of the split Bregman algorithm of Goldstein and Osher to solve the ROF problem ([1], [2], [3]).

Parameters:
imagendarray

Input image to be denoised (converted using skimage2.util.img_as_float()).

weightfloat, optional

Denoising weight. It is equal to \(\frac{\lambda}{2}\). Therefore, the smaller the weight, the more denoising (at the expense of less similarity to image).

epsfloat, optional

Tolerance \(\varepsilon > 0\) for the stop criterion: The algorithm stops when \(\|u_n - u_{n-1}\|_2 < \varepsilon\).

max_num_iterint, optional

Maximal number of iterations used for the optimization.

isotropicbool, optional

Switch between isotropic and anisotropic TV denoising.

channel_axisint or None, optional

If None, the image is assumed to be grayscale (single-channel). Otherwise, this parameter indicates which axis of the array corresponds to channels.

Added in version 0.19: channel_axis was added in 0.19.

Returns:
undarray

Denoised image.

See also

denoise_tv_chambolle

Perform total variation denoising in nD.

Notes

Ensure that channel_axis parameter is set appropriately for color images.

The principle of total variation denoising is explained in [4]. It is about minimizing the total variation of an image, which can be roughly described as the integral of the norm of the image gradient. Total variation denoising tends to produce cartoon-like images, that is, piecewise-constant images.

References

[1]

Tom Goldstein and Stanley Osher, “The Split Bregman Method For L1 Regularized Problems”, https://ww3.math.ucla.edu/camreport/cam08-29.pdf

[2]

Pascal Getreuer, “Rudin–Osher–Fatemi Total Variation Denoising using Split Bregman” in Image Processing On Line on 2012–05–19, https://www.ipol.im/pub/art/2012/g-tvd/article_lr.pdf