skimage 0.17.2

NotesParametersReturnsBackRef
denoise_bilateral(image, win_size=None, sigma_color=None, sigma_spatial=1, bins=10000, mode='constant', cval=0, multichannel=False)

Notes

This is an edge-preserving, denoising filter. It averages pixels based on their spatial closeness and radiometric similarity .

Spatial closeness is measured by the Gaussian function of the Euclidean distance between two pixels and a certain standard deviation (:None:None:`sigma_spatial`).

Radiometric similarity is measured by the Gaussian function of the Euclidean distance between two color values and a certain standard deviation (:None:None:`sigma_color`).

Parameters

image : ndarray, shape (M, N[, 3])

Input image, 2D grayscale or RGB.

win_size : int

Window size for filtering. If win_size is not specified, it is calculated as max(5, 2 * ceil(3 * sigma_spatial) + 1) .

sigma_color : float

Standard deviation for grayvalue/color distance (radiometric similarity). A larger value results in averaging of pixels with larger radiometric differences. Note, that the image will be converted using the img_as_float function and thus the standard deviation is in respect to the range [0, 1] . If the value is None the standard deviation of the image will be used.

sigma_spatial : float

Standard deviation for range distance. A larger value results in averaging of pixels with larger spatial differences.

bins : int

Number of discrete values for Gaussian weights of color filtering. A larger value results in improved accuracy.

mode : {'constant', 'edge', 'symmetric', 'reflect', 'wrap'}

How to handle values outside the image borders. See numpy.pad for detail.

cval : string

Used in conjunction with mode 'constant', the value outside the image boundaries.

multichannel : bool

Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.

Returns

denoised : ndarray

Denoised image.

Denoise image using bilateral filter.

Examples

This example is valid syntax, but we were not able to check execution
>>> from skimage import data, img_as_float
... astro = img_as_float(data.astronaut())
... astro = astro[220:300, 220:320]
... noisy = astro + 0.6 * astro.std() * np.random.random(astro.shape)
... noisy = np.clip(noisy, 0, 1)
... denoised = denoise_bilateral(noisy, sigma_color=0.05, sigma_spatial=15,
...  multichannel=True)
See :

Back References

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

skimage.restoration._denoise.denoise_bilateral skimage.filters.rank.bilateral.sum_bilateral skimage.filters.rank.bilateral.mean_bilateral

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#91
type: <class 'function'>
Commit: