Hello, My application is to find and count boxes on a shelf. As a test I'm using Apple and Fruit Punch Minute Maid juice boxes. The boxes look almost identical except for the color – Apple is green and Fruit Punch is red. When converted to grayscale, the intensities of the red and green are almost the same. Understandably the template matching gets confused, although otherwise I am absolutely amazed by its performance.
I have tried template matching using color images (the docs for 2.4.11 say all three color channels are used) and grayscale images. The performance for color is a little better, but still confuses one for the other.
Is there a standard way to introduce the actual color value into the template matching algorithm? I'm thinking of something like matching the color at half a dozen locations in the template versus the same location in identified match and somehow computing if they are close.
Can anyone offer suggestions?
Thanks, Barry.