{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / exposure / _adapthist / equalize_adapthist

function

skimage.exposure._adapthist:equalize_adapthist

source: /dev/scikit-image/src/skimage/exposure/_adapthist.py :23

Signature

def   equalize_adapthist ( image kernel_size = None clip_limit = 0.01 nbins = 256 )

Summary

Contrast Limited Adaptive Histogram Equalization (CLAHE).

Extended Summary

An algorithm for local contrast enhancement, that uses histograms computed over different tile regions of the image. Local details can therefore be enhanced even in regions that are darker or lighter than most of the image.

Parameters

image : (M[, ...][, C]) ndarray

Input image.

kernel_size : int or array_like, optional

Defines the shape of contextual regions used in the algorithm. If iterable is passed, it must have the same number of elements as image.ndim (without color channel). If integer, it is broadcasted to each image dimension. By default, kernel_size is 1/8 of image height by 1/8 of its width.

clip_limit : float, optional

Clipping limit, normalized between 0 and 1 (higher values give more contrast).

nbins : int, optional

Number of gray bins for histogram ("data range").

Returns

out : (M[, ...][, C]) ndarray

Equalized image with float64 dtype.

Notes

  • For color images, the following steps are performed:

    • The image is converted to HSV color space

    • The CLAHE algorithm is run on the V (Value) channel

    • The image is converted back to RGB space and returned

  • For RGBA images, the original alpha channel is removed.

See also

equalize_hist
rescale_intensity

Aliases

  • skimage.exposure.equalize_adapthist

Referenced by