Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Color Pattern Matching I get different results depending on Search Box Area

It appears that you have to extract color planes in order to use Geometric Matching.  I messed around with this, but not the best option for my application.  I have Red, Blue, Green, Yellow, Cyan, and White Leds and who know what other colors might be added.   I would rather use a color matching versus a grayscale matching by means of color plane extraction.
 
0 Kudos
Message 11 of 18
(1,626 Views)
Are you getting a higher matchscore that is dependent on the ROI size even after making the template smaller? I have not been able to reproduce this.
0 Kudos
Message 12 of 18
(1,608 Views)
Not sure what you are asking for.   First of all,  I believe you were able to reproduce the Led not found when the search box was at the windows extents.   When I make the search box only around the Led not found, I get a high matchscore.  Typically in the 900's.   I made the search box about 3 times the size of the Led being searched.
0 Kudos
Message 13 of 18
(1,606 Views)
I was able to reproduce the matching error only when the template had extraneous black in the background. Shrinking the borders of the template to more closely match the border of the LED itself improves the matching algorithm, and seems to no longer produce the errors you are getting.
0 Kudos
Message 14 of 18
(1,601 Views)
A few questions:   Why doesn't the extra black in the background matter when making the search box smaller around the not found Led?  Is it because there are less decisions being made and math computations when it's the only Led in the search box?   I also learned the template to 'Ignore Black'.  Why does the extra black in the background matter then?  I understand that you can make everything pass when you slightly modified the *.png file to get rid of some of the extra black in the background.     It seems a little too finicky though.   This would be somewhat acceptable if I was the person supporting the equipment.   I could spend a lot of time making sure each learned template is setup perfectly.   It won't be acceptable though when this equipment that I'm programming is in India and Mexico in January and a technician there re-learns a template and has problems.   I think I will play it safe and create a search rectangle around each Led, since the color pattern matching algorithm seems more robust for this case.    I appreciate you trying this out.  I would suggest the software department revisit the color pattern matching tool for the next revision.  I think improvements could be made.
 
0 Kudos
Message 15 of 18
(1,600 Views)
I noticed that the LED not found tended to be the one in the top right corner that is sandwiched in between two other LEDS. The pattern match from the 2 adjacent LEDs seem to interfere, causing the algorithm to not see the whole template, giving it a lower score. The option to "ignore black" only ignores pure black or white pixels. While you're image is indeed very dark, it may not be pure black. This problem you are having generally stems from the way that the algorithm fragments the image based on the ROI. Unfortunately this is just inherent in the way that the algorithm was designed.
0 Kudos
Message 16 of 18
(1,587 Views)
Thanks for all your help
0 Kudos
Message 17 of 18
(1,583 Views)
You're welcome Dan! Thank you for using the National Instruments forums!
0 Kudos
Message 18 of 18
(1,577 Views)