This topic explains the difference between Color Recognition and Color Pattern Matching. It provides examples of each. To select Color Pattern Matching, select the Match Color and Pattern checkbox. See Color Recognition.
Color Recognition can perform recognition for a color only or a color combined with a pattern.
Color only recognition matches the average color of the pattern to the average color of the whole area of interest. In the following two examples, the patterns on the right, even though they are inverted, have a perfect match to both areas of interest.
Color Recognition: Example 1
Color Recognition: Example 2
The example below has a solid color pattern. It matches the color of 50% of the area of interest as shown by the match score of 500.
Color Recognition: Example 3
If you check the Match Color and Pattern box, the algorithm uses color as another feature to match with the pattern. In the following example, using Pattern Matching only we get almost perfect matches even though the pattens are different colors because Pattern Matching only uses location and brightness to distinguish between images.
Pattern Recognition: Example 1
Pattern Recognition: Example 2
Changing over to the Color Recognition and checking Match Color and Pattern, we can distinguish between the two patterns because of the color difference. In the example below, the match score is 1000, because the color and pattern are the same as the sample image (left image).
Match Color and Pattern: Example 1
In the example below, the match fails because the color is different even though the pattern is the same.
Match Color and Pattern: Example 2
For more details, see Color Inspection in https://www.ni.com/en-us/innovations/white-papers/06/image-processing-with-ni-vision-development-module.html