GetImageStat

Component [in]

Enumerated integer specifying the color component for which the image statistics is obtained. This parameter is disregarded for grayscale images. Must be one of the following values:

0  collects the statistics of the luminance of the image

1  collects the statistics of the red component of the image

2  collects the statistics of the green component of the image

3  collects the statistics of the blue component of the image


Step [in]

An optional integer between 1 and 16 specifying the sampling step, which is used to collect pixel values for the calculations. If this number is 1, every pixel is taking into consideration. If the number is 2, every second pixel in a row will be skipped, as well as every second row in the image, etc. Increasing the sampling step raises the speed of the image statistics collection, but sacrifices some accuracy.


pStat [out,retval]

Pointer to the SAFEARRAY (float) containing the image statistics. The statistics is written to the array as follows:

Stat [0] – Mean value

Stat [1] – Standard deviation

Stat [2] – Pixel count

Stat [3] – Minimum

Stat [4] – Maximum

Stat [5] – Median

Stat [6] – Skewness

Stat [7] – Kurtosis



S_OK

Success

E_FAIL

Failure.

