Hi S.A.S :),
After doing some testings and readings, I have more ideas about IgnoreBlackAndWhite option now, let see if my understanding is correct.
Let say if I set "IgnoreBlack" in LearnMode, it will ignores all pixels which contain black color spectrum while learning, but not the pixels with RGB 255,255,255 in color. So, if the target area used for matching contains some pixels with black color spectrum, those pixels will also be ignored and it does affect the accuracy.
As you can see from the attachment - photo01.jpg, the product is irregular in shape and is placed in a mold. What I would like to do is check the design/pattern on the product, but not for the mold. The design/pattern may have large variety of colors and patterns, but the color of mold is constant. Since the position of mold is fixed, I can mask the photo before matching in order to increase the accuracy. However, I have no idea of how to eliminate the masked part while matching or create a template in irregular shape.
My program is written in C# and I referenced Color Pattern Matching.vb before implementation.
Please find the attachment for your reference.
Thanks a lot.
Regards,
Joanne
P.S. photo01.jpg - live image of product and mold
photo01_masked.jpg - masked live image
template01.png - template created by Vision Assistant
Color Pattern Matching.scr - script file