cumulative-distribution

cumulative_distribution

skimage.exposure.cumulative_distribution(image, nbins=256) [source]

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

Parameters:

image : array

Image array.

nbins : int

Number of bins for image histogram.

Returns:

img_cdf : array

Values of cumulative distribution function.

bin_centers : array

Centers of bins.

See also

histogram

References

[R85] http://en.wikipedia.org/wiki/Cumulative_distribution_function

Examples

>>> from skimage import data, exposure, img_as_float
>>> image = img_as_float(data.camera())
>>> hi = exposure.histogram(image)
>>> cdf = exposure.cumulative_distribution(image)
>>> np.alltrue(cdf[0] == np.cumsum(hi[0])/float(image.size))
True
doc_scikit_image
2017-01-12 17:20:40
Comments
Leave a Comment

Please login to continue.