is-low-contrast

is_low_contrast

skimage.exposure.is_low_contrast(image, fraction_threshold=0.05, lower_percentile=1, upper_percentile=99, method='linear') [source]

Detemine if an image is low contrast.

Parameters:

image : array-like

The image under test.

fraction_threshold : float, optional

The low contrast fraction threshold. An image is considered low- contrast when its range of brightness spans less than this fraction of its data type’s full range. [R90]

lower_bound : float, optional

Disregard values below this percentile when computing image contrast.

upper_bound : float, optional

Disregard values above this percentile when computing image contrast.

method : str, optional

The contrast determination method. Right now the only available option is “linear”.

Returns:

out : bool

True when the image is determined to be low contrast.

References

[R90] (1, 2) http://scikit-image.org/docs/dev/user_guide/data_types.html

Examples

>>> image = np.linspace(0, 0.04, 100)
>>> is_low_contrast(image)
True
>>> image[-1] = 1
>>> is_low_contrast(image)
True
>>> is_low_contrast(image, upper_percentile=100)
False
doc_scikit_image
2017-01-12 17:21:41
Comments
Leave a Comment

Please login to continue.