Color matching is the process of finding a match between the color of an ROI (match region) and the best predefined color-sample. With the ColorMatcher step you can perform 2 types of color matching tasks: color identification and supervised color segmentation.
Identification refers to matching the general color of the match region with the best predefined color-sample. This allows you to, for example, identify the color of found objects. In advanced applications, you can also identify mixtures of colors using histograms.
Segmentation refers to matching the color value of each pixel in the match region with the best predefined color-sample. This allows you to, for example, retrieve the relative presence of each color.
Match regions refer to one or more ROIs in the target image that must be matched with a color-sample. The default match region is the entire target image. To define specific match regions, you can specify fixtured geometric shapes in the ColorMatcher step, or you can import the match regions as a labeled image from other steps, such as the BlobAnalysis step or the ImageProcessing step. If a color matcher application requires finding the object's location and angle (as can be done with the ModelFinder step), you can anchor match regions at each fixturing location that the object was found. Note that the internally-generated image that contains the match regions is referred to as the "Area identifier image" in the MIL online help.
Color-samples refer to the color to be matched in the match region. You can define color-samples from an image or from 3 explicit color values (for example, RGB). For color-samples defined from an image, Matrox Design Assistant uses an estimation of the color, which is based on color statistics such as the mean. This estimation of the color is considered the color of the color-sample and is used in all operations of the ColorMatcher step.
Color matching is essentially based on the distance between the color of the match region and the color of the color-sample; the smaller the distance, the better the match. For identification, the distance is typically taken between an estimation of the color in the match region (for example, the mean color) and each color-sample; the color-sample with the closest distance to the color of the match region represents the best match. For segmentation, the same general process is performed, except that the match is performed by each pixel in the match region voting for the color-sample with the closest distance; the color-sample with the most votes is the best match. To accommodate different applications, the distance can be calculated in various color spaces (for example RGB or LAB).