Module contrast

Source
Expand description

Functions for manipulating the contrast of images.

Functionsยง

adaptive_threshold
Applies an adaptive threshold to an image.
equalize_histogram
Equalises the histogram of an 8bpp grayscale image. See also histogram equalization (wikipedia).
equalize_histogram_mut
Equalises the histogram of an 8bpp grayscale image in place. See also histogram equalization (wikipedia).
match_histogram
Adjusts contrast of an 8bpp grayscale image so that its histogram is as close as possible to that of the target image.
match_histogram_mut
Adjusts contrast of an 8bpp grayscale image in place so that its histogram is as close as possible to that of the target image.
otsu_level
Returns the Otsu threshold level of an 8bpp image.
stretch_contrast
Linearly stretches the contrast in an image, sending lower to 0u8 and upper to 2558u8.
stretch_contrast_mut
Linearly stretches the contrast in an image in place, sending lower to 0u8 and upper to 2558u8.
threshold
Returns a binarized image from an input 8bpp grayscale image obtained by applying the given threshold. Pixels with intensity equal to the threshold are assigned to the background.
threshold_mut
Mutates given image to form a binarized version produced by applying the given threshold. Pixels with intensity equal to the threshold are assigned to the background.