imaqColorHistogram2
Usage
ColorHistogramReport* imaqColorHistogram2(Image* image, int numClasses, ColorMode mode, const CIEXYZValue* whiteReference, Image* mask);
Purpose
Calculates the histogram, or pixel distribution, of a color image.
Image Types Supported
IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL
Parameters
Name
|
Type
|
Description
|
---|---|---|
image | Image* | The image whose histogram the function calculates. |
numClasses | int | The number of classes into which the function separates the pixels. |
mode | ColorMode | The color space in which to perform the histogram. |
whiteReference | const CIEXYZValue* | If mode is CIE L*a*b*, the CIE XYZ components that map to white. If this parameter is set to NULL, the default values (0.950456,1,1.088754, 0), which map to the RGB values (255,255,255, 0), are used. |
mask | Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function calculates the histogram using only those pixels in the image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to calculate the histogram of the entire image. |
Return Value
Type |
Description |
---|---|
ColorHistogramReport* | On success, this function returns a report describing the classification of each plane in a HistogramReport. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().When you are finished with the report, dispose of it by calling imaqDispose(). |