This interface provide functionalities of statistics operations. More...
Public Member Functions | |
void | CountPixel (ILImage *img, ILRegion *region, int lb, int ub, int *belowCount, int *betweenCount, int *aboveCount) |
void | CountPixelColor (ILImage *img, ILRegion *region, LColor lb, struct LColor ub, int *betweenCount, int *outsideCount) |
void | Max (ILImage *img, ILRegion *region, int *value, int *posX, int *posY) |
void | MeanStdDev (ILImage *img, ILRegion *region, double *meanValue, double *stdDevValue) |
void | Min (ILImage *img, ILRegion *region, int *value, int *posX, int *posY) |
double | Sharpness (ILImage *img, ILRegion *region) |
Public Member Functions inherited from ILObject | |
ILObject * | Copy () |
LPVErrorCode | Load (LString filename) |
void | Reset () |
LPVErrorCode | Save (LString filename) |
BOOL | Valid () |
This interface provide functionalities of statistics operations.
To use this interface, you should create a LImageStats object.
void CountPixel | ( | ILImage * | img, |
ILRegion * | region, | ||
int | lb, | ||
int | ub, | ||
int * | belowCount, | ||
int * | betweenCount, | ||
int * | aboveCount | ||
) |
Count the pixels in the input image which is below, between or above the given threshold bounds.
[in] | img | The input image. |
[in] | region | Input region. It's optional, could be null. |
[in] | lb | The lower bound of threshold range, in range of 0 ~ 255 for 8bit images, 0 ~ 65535 for 16bit images |
[in] | ub | The upper bound of threshold range, in range of 0 ~ 255 for 8bit images, 0 ~ 65535 for 16bit images |
[out] | belowCount | Return the count of pixels below the lower bound of threshold range. |
[out] | betweenCount | Return the count of pixels in the threshold range. |
[out] | aboveCount | Return the count of pixels above the upper bound of threshold range. |
void CountPixelColor | ( | ILImage * | img, |
ILRegion * | region, | ||
LColor | lb, | ||
struct LColor | ub, | ||
int * | betweenCount, | ||
int * | outsideCount | ||
) |
Count the pixels in the input image which is between or outside the given color bounds.
For all of the channels, the pixel value is within the color bounds, then it's a "between" color pixel. Otherwise, for any of the channel, the pixel value is smaller or greater than the lower/upper bound, then it's a "outside" color pixel.
[in] | img | The input image. |
[in] | region | Input region. It's optional, could be null. |
[in] | lb | The lower bound of color range, each channel should be smaller then or equal to the upper bound. |
[in] | ub | The upper bound of color range, each channel should be bigger then or equal to the lower bound. |
[out] | betweenCount | Return the count of pixels within the bounds. |
[out] | outsideCount | Return the count of pixels out of the bounds. |
Find the pixel of maximum value in the input image, report the value and pixel's position. If there's more than one pixel with the same value, report the left-top one.
[in] | img | The input image. |
[in] | region | Input region. It's optional, could be null. |
[out] | value | Return the maximum value. |
[out] | posX | Return the x-coordinate of the pixel's position with maximum value. |
[out] | posY | Return the y-coordinate of the pixel's position with maximum value. |
Calculate the mean and standard deviation of the input image.
[in] | img | The input image. |
[in] | region | Input region. It's optional, could be null. |
[out] | meanValue | Return the mean value. |
[out] | stdDevValue | Return the standard deviation value. |
Find the pixel of minimum value in the input image, report the value and pixel's position. If there's more than one pixel with the same value, report the left-top one.
[in] | img | The input image. |
[in] | region | Input region. It's optional, could be null. |
[out] | value | Return the minimum value. |
[out] | posX | Return the x-coordinate of the pixel's position with minimum value. |
[out] | posY | Return the y-coordinate of the pixel's position with minimum value. |
Compute the relative sharpness of the input image, based on the edge gradients. It's usually used to automate focusing a camera lens on a scene. Note that the score may be affected by the contrast, brightness and content of the scene, thus it's meaningless to compare the sharpness scores of different scenes.
[in] | img | The input image. |
[in] | region | Input region. It's optional, could be null. |
value | Return the sharpness score. |