skimage2.exposure.match_histograms#

skimage2.exposure.match_histograms(image, reference, *, channel_axis=None)[source]#

Adjust an image so that its cumulative histogram matches that of another.

The adjustment is applied separately for each channel.

Parameters:
imagendarray

Input image. Can be gray-scale or in color.

referencendarray

Image to match histogram of. Must have the same number of channels as image.

channel_axisint or None, optional

If None, the image is assumed to be a grayscale (single channel) image. Otherwise, this parameter indicates which axis of the array corresponds to channels.

Returns:
matchedndarray

Transformed input image.

Raises:
ValueError

Thrown when the number of channels in the input image and the reference differ.

References