ImageGear Professional v18.2 > API Reference Guide > Processing Component API Reference > Processing Component Objects > IGProcessingCtl Control > IGProcessingCtl Methods > TabulateHistogram Method |
Produces a histogram of the pixel values occurring in an image.
If segmIncr = 1, each pixel in the image is examined. The bin corresponding to that pixel value increments. The number of bins must be large enough to hold the entire histogram. If an 8 or 24-bit image, the number of bins must be 256. If a 4-bit or 1-bit image, the number of bins must be 16 or 2 respectively. Note that for a 24-bit image, only a single color channel can be a histogram at one time. Use argument colorChannel to select the channel.
If segmIncr is greater than 1, then rasters of the image are skipped. This can be used to speed up the tabulation when the image is large.
This method takes into account the ROI settings of pPage object, that are accessible via the IGPage Object.ROI Property. By default ROI is set to the entire image.
TabulateHistogram (ByVal pPage As IGPage, ByVal binCount As
Long, ByVal segmIncr As Long, ByVal colorChannel As
enumIGColorChannels) As IGIntegerArray
Name | Description |
---|---|
pPage | Reference to IGPage Object. |
binCount | Number of bins. |
segmIncr | Set = 1 to sample every pixel. Values larger than 1 will skip rasters of the image bitmap. |
colorChannel | For 24 bit images selects which channel: IG_COLOR_COMP_R, _G, or _B (IG_COLOR_COMP_RGB not allowed). |
An integer array that contains the resulting histogram.
1, 4, 8, 24
Image Processing and Effects