Image.cdf#

property Image.cdf: tuple[ndarray, ndarray][source]#

Cumulative distribution function and bin values

Returns:

tuple (cdf, x) where cdf is normalised cumulative histogram values and x is left-hand bin values

Return type:

tuple(ndarray(N) or ndarray(N,P), ndarray(N))

The CDF is the cumulative frequency (cf) normalised to the range 0 to 1, computed by dividing the cumulative frequency by the total number of pixels in each plane. For a greyscale image cdf is a 1D array; for a multiplane (color) image it is a 2D array with the normalised cumulative histogram of each plane as a column.

Changed in version 2.0.0: Was previously called ncdf, and now returns (cdf, x) instead of only cdf. This convenience property now uses a lazily cached default histogram.

Seealso:

h cf pdf Histogram.cdf