ImageGear Professional for Windows ActiveX
TabulateHistogram16Gray Method

Description:

Tabulates and returns the histogram of a 8 or 16-bit grayscale image.

BinWidth is used to determine the range of pixel values that are to be counted in their own bin. A value of 1 indicates that each pixel value is to be counted in its own histogram bin. A value of 2 would allow neighboring values (such as 128 and 129) to be counted as a single bin (as a single value). If BinWidth = possible_pixel_values then only a single histogram bin (4 bytes) is filled and the bin count is equal to the number of pixel values counted.

Specifies the number of bins to allocate for the histogram. For n-bit image, 2^n bins are sufficient; for 8-bit image this makes 256 bins, and for 16-bit image- 65536 bins. If a pixel value is encountered that would overflow BinCount it is ignored. This pixel value will not be included in the sum returned in Count (you can use this fact to determine if any values were ignored).

Syntax:

      TabulateHistogram16Gray(BinWidth As Long, BinCount As Long) As
IGIntegerArray

Parameters:

Name Description
BinWidth Specifies the range of pixel values to be counted into one bin.
BinCount Specifies the number of bins to allocate for the histogram.

Return Value:

Object of type IGIntegerArray Object containing the histogram.

Bits Per Pixel:

8..16g

Sample:

Med

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback