bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / exposure / exposure / is_low_contrast
function
skimage.exposure.exposure:is_low_contrast
source: /dev/scikit-image/src/skimage/exposure/exposure.py :784
Signature
def is_low_contrast ( image , fraction_threshold = 0.05 , lower_percentile = 1 , upper_percentile = 99 , method = linear ) Summary
Determine if an image is low contrast.
Parameters
image: array-likeThe image under test.
fraction_threshold: float, optionalThe 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. [1]
lower_percentile: float, optionalDisregard values below this percentile when computing image contrast.
upper_percentile: float, optionalDisregard values above this percentile when computing image contrast.
method: str, optionalThe contrast determination method. Right now the only available option is "linear".
Returns
out: boolTrue when the image is determined to be low contrast.
Notes
For boolean images, this function returns False only if all values are the same (the method, threshold, and percentile arguments are ignored).
Examples
image = np.linspace(0, 0.04, 100)
✓is_low_contrast(image)
✗image[-1] = 1
✓is_low_contrast(image) is_low_contrast(image, upper_percentile=100)✗
Aliases
-
skimage.exposure.is_low_contrast