skimage 0.17.2

NotesParametersReturnsBackRef
denoise_wavelet(image, sigma=None, wavelet='db1', mode='soft', wavelet_levels=None, multichannel=False, convert2ycbcr=False, method='BayesShrink', rescale_sigma=None)

Notes

The wavelet domain is a sparse representation of the image, and can be thought of similarly to the frequency domain of the Fourier transform. Sparse representations have most values zero or near-zero and truly random noise is (usually) represented by many small values in the wavelet domain. Setting all values below some threshold to 0 reduces the noise in the image, but larger thresholds also decrease the detail present in the image.

If the input is 3D, this function performs wavelet denoising on each color plane separately.

versionchanged

For floating point inputs, the original input range is maintained and there is no clipping applied to the output. Other input types will be converted to a floating point value in the range [-1, 1] or [0, 1] depending on the input image range. Unless rescale_sigma = False , any internal rescaling applied to the image will also be applied to sigma to maintain the same relative amplitude.

Many wavelet coefficient thresholding approaches have been proposed. By default, denoise_wavelet applies BayesShrink, which is an adaptive thresholding method that computes separate thresholds for each wavelet sub-band as described in .

If method == "VisuShrink" , a single "universal threshold" is applied to all wavelet detail coefficients as described in . This threshold is designed to remove all Gaussian noise at a given sigma with high probability, but tends to produce images that appear overly smooth.

Although any of the wavelets from PyWavelets can be selected, the thresholding methods assume an orthogonal wavelet transform and may not choose the threshold appropriately for biorthogonal wavelets. Orthogonal wavelets are desirable because white noise in the input remains white noise in the subbands. Biorthogonal wavelets lead to colored noise in the subbands. Additionally, the orthogonal wavelets in PyWavelets are orthonormal so that noise variance in the subbands remains identical to the noise variance of the input. Example orthogonal wavelets are the Daubechies (e.g. 'db2') or symmlet (e.g. 'sym2') families.

Parameters

image : ndarray ([M[, N[, ...P]][, C]) of ints, uints or floats

Input data to be denoised. :None:None:`image` can be of any numeric type, but it is cast into an ndarray of floats for the computation of the denoised image.

sigma : float or list, optional

The noise standard deviation used when computing the wavelet detail coefficient threshold(s). When None (default), the noise standard deviation is estimated via the method in .

wavelet : string, optional

The type of wavelet to perform and can be any of the options pywt.wavelist outputs. The default is :None:None:`'db1'`. For example, wavelet can be any of {'db2', 'haar', 'sym9'} and many more.

mode : {'soft', 'hard'}, optional

An optional argument to choose the type of denoising performed. It noted that choosing soft thresholding given additive noise finds the best approximation of the original image.

wavelet_levels : int or None, optional

The number of wavelet decomposition levels to use. The default is three less than the maximum number of possible decomposition levels.

multichannel : bool, optional

Apply wavelet denoising separately for each channel (where channels correspond to the final axis of the array).

convert2ycbcr : bool, optional

If True and multichannel True, do the wavelet denoising in the YCbCr colorspace instead of the RGB color space. This typically results in better performance for RGB images.

method : {'BayesShrink', 'VisuShrink'}, optional

Thresholding method to be used. The currently supported methods are "BayesShrink" and "VisuShrink" . Defaults to "BayesShrink".

rescale_sigma : bool or None, optional

If False, no rescaling of the user-provided sigma will be performed. The default of None rescales sigma appropriately if the image is rescaled internally. A DeprecationWarning is raised to warn the user about this new behaviour. This warning can be avoided by setting rescale_sigma=True .

versionadded

rescale_sigma was introduced in 0.16

Returns

out : ndarray

Denoised image.

Perform wavelet denoising on an image.

Examples

This example is valid syntax, but we were not able to check execution
>>> from skimage import color, data
... img = img_as_float(data.astronaut())
... img = color.rgb2gray(img)
... img += 0.1 * np.random.randn(*img.shape)
... img = np.clip(img, 0, 1)
... denoised_img = denoise_wavelet(img, sigma=0.1, rescale_sigma=True)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

skimage.restoration._cycle_spin.cycle_spin skimage.restoration.j_invariant.calibrate_denoiser skimage.restoration._denoise.denoise_wavelet

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /skimage/restoration/_denoise.py#694
type: <class 'function'>
Commit: