denoise_bilateral(image, win_size=None, sigma_color=None, sigma_spatial=1, bins=10000, mode='constant', cval=0, multichannel=False)
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`
).
Input image, 2D grayscale or RGB.
Window size for filtering. If win_size is not specified, it is calculated as max(5, 2 * ceil(3 * sigma_spatial) + 1)
.
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.
Standard deviation for range distance. A larger value results in averaging of pixels with larger spatial differences.
Number of discrete values for Gaussian weights of color filtering. A larger value results in improved accuracy.
How to handle values outside the image borders. See numpy.pad
for detail.
Used in conjunction with mode 'constant', the value outside the image boundaries.
Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.
Denoised image.
Denoise image using bilateral filter.
>>> from skimage import data, img_as_floatSee :
... 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)
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
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