imaqMatchColor
Usage
int* imaqMatchColor(const Image* image, const ColorInformation* info, const ROI* roi, int* numScores);
Purpose
Determines how closely colors in an image match colors in the given color information.
Image Types Supported
IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL
Parameters
Name
|
Type
|
Description
|
---|---|---|
image | const Image* | The image containing colors you want to compare with the given color information. |
info | const ColorInformation* | The color information. Call imaqLearnColor() to get the color information. This parameter is required and cannot be NULL. |
roi | const ROI* | The region of the image in which to compare the colors. All region contours are considered to be external. If roi contains multiple regions, the color information in each region is compared individually to the color information specified by the info parameter and the match results are reported for each region Set the parameter to NULL to compare colors in the entire image. |
numScores | int* | On return, contains the number of values in the score array. Set this parameter to NULL if you do not need this information. |
Return Value
Type |
Description |
---|---|
int* | On success, this function returns an array filled with scores describing the closeness of a match between each contour in the region of interest (ROI) and the color information. A score of 1,000 indicates a perfect match. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with this array, dispose of it by calling imaqDispose(). |