This is a development version (0.26.1rc0.dev0) and may be unstable.Go to latest (0.26.1rc0.dev0+git20260530.b607368ff)
{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0 / skimage / exposure / exposure / cumulative_distribution

function

skimage.exposure.exposure:cumulative_distribution

source: /_skimage2/exposure/exposure.py:313

Signature

def cumulative_distribution(image, nbins = 256)

Summary

Return cumulative distribution function (cdf) for the given image.

Parameters

image : array

Image array.

nbins : int, optional

Number of bins for image histogram.

Returns

img_cdf : array

Values of cumulative distribution function.

bin_centers : array

Centers of bins.

Examples

from skimage import data, exposure, img_as_float
image = img_as_float(data.camera())
hi = exposure.histogram(image)
cdf = exposure.cumulative_distribution(image)
all(cdf[0] == np.cumsum(hi[0])/float(image.size))
✓
True

See also

histogram

Aliases

  • skimage.exposure.cumulative_distribution