IPHISTOGRAM Function
Computes the density function or the cumulative density function for an image.
Usage
result = IPHISTOGRAM(image)
Input Parameters
imageA 2D or 3D array containing an image; image, row, or pixel-interleaved images; or a volume.
Returned Value
result—A 1D or 2D long array.
Keywords
Cumulative—If set, the cumulative density function is returned.
Intleave—A scalar string indicating the type of interleaving of 3D image arrays. Valid strings and the corresponding interleaving methods are:
*'pixel'—The input array arrangement is (pxy) for p  pixel-interleaved images of x-by-y.
*'row'—The 3D image array arrangement is (xpy) for row-interleaved images of x-by-y.
*'image'—The 3D image array arrangement is (xyp) for p  image-interleaved images of x-by-y.
*'volume'—The input image array is treated as a single entity.
Max—The maximum value to consider. This keyword can be a scalar when image is 2D or 3D; or an array when  image is a 3D image, row or pixel-interleaved array. (Default: MAX(image))
Min—The minimum value to consider. This keyword can be a scalar when image is 2D or 3D; or an array when  image is a 3D image, row or pixel-interleaved array. (Default: MIN(image))
Omax—Specifies a variable to hold maximum value or values considered.
Omin—Specifies a variable to hold minimum value or values considered.
Discussion
When the Cumulative keyword is set, the histograms of image are first computed. The cumulative histogram or histograms are then calculated by summating successive values in the histogram array.
 
note
For more information on the density function calculation, see the HISTOGRAM function Discussion section in the PV‑WAVE Reference.
Example
; Read a 24-bit image.
image = IMAGE_READ(!IP_Data + 'boulder_image.tif')
; Compute the cumulative histogram of each plane in the image.
hists = IPHISTOGRAM(image('pixels'), Intleave = 'image', $
Min = 0, Max = 255, /Cumulative)
TEK_COLOR
; Plot the histograms.
PLOT, hists(*,0), color = wocolorconvert(1)
OPLOT, hists(*,1), color = wocolorconvert(2)
OPLOT, hists(*,2), color = wocolorconvert(3)
See Also