Histogram.cf#

property Histogram.cf: ndarray[source]#

Cumulative histogram count values

Returns:

array of cumulative histogram count values

Return type:

ndarray(N) or ndarray(N,P)

This the cumulative histogram count, which increases from 0 to the total number of pixels in the image plane.

For a greyscale image this is a 1D array, for a multiplane (color) image this is a 2D array with the cumulative histograms of each plane as columns.

Example:

>>> from machinevisiontoolbox import Image
>>> import numpy as np
>>> hist = Image.Read('flowers1.png').hist()
>>> with np.printoptions(threshold=10):
...     hist.cf
array([[   388,      2,    546],
       [   831,      4,   1142],
       [  1386,      6,   1752],
       ...,
       [266651, 269436, 269391],
       [267935, 269760, 269878],
       [272640, 272640, 272640]], shape=(256, 3))

Changed in version 2.0.0: In earlier releases this method was named cdf.

Seealso:

h pdf cdf