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

Hello,
 
I'm using Vision Assistant 8.2.1 and Development Module 8.2.1 in VB6.    In Vision Assistant 8.2.1, as well as my VB6 program, I notice this same anomaly when using Color Pattern Matching.   Here is an example of what I am seeing:   I have 6 red LEDs with a black background.  When I have the Search Box to the extents of the vision window the results returns only 5 found.   When I move the Search Box small and around only the red LED that was not found, it then finds it with a 980 score.   I have messed with search parameters, color sensitivity and minscore for hours with the problem still there.   I am close to changing my VB6 program to draw a ROI around each LED and do a ColorPatternMatch 6 times looking for a matchreport count of 1, because I know this works.   I prefer though to do only 1 ColorPatternMatch and look for a matchreport count of 6.   This method takes less cycle time.   I have suspected this problem for a couple years, as I have several machines in production doing extensive LED ColorPatternMatching.  I changed those programs to only do PatternMatching  for 1 LED at a time, but the Search Box is still at the vision window extents.  I think there may be a problem with the ColorPatternMatching Algorithm which has to do with the size of the Search Box and the number of items your are searching for.
 
 
0 Kudos
Message 1 of 18
(4,780 Views)
Dan,

Can you post up a sample image that you are working with? Is it always the same LED that is not being found? If so, I'd like to see if there is anything particularly different about that LED.
0 Kudos
Message 2 of 18
(4,750 Views)

Hello,

Here are the attachments.  You should be able to duplicate the problem in Vision Assitant.  When the search box is at the windows extents, it is the same led that is not found.  When I draw the box around only the Led not found, it will find it with a high matchscore.

0 Kudos
Message 3 of 18
(4,750 Views)
Dan,

Whenever I open up your script in Vision Assistant 8.5, I detect all 6 LEDs with the ROI drawn around the entire image, as you can see in the image I have attached. What version of Vision Assistant are you using? I'd like to see if I can reproduce your issue.

One thing that I might suggest in the meantime, is that you try using a geometric match, instead of a pattern match. This may suit your application a bit better.
0 Kudos
Message 4 of 18
(4,744 Views)
I'm using Vision Assistant 8.2.    I've attached another .png file also to try out.   Sometimes I could get all 6 Leds to be found, but If I mess with the search box size it would only find 5 Leds quite often.  I got in the mail a few days ago Vision Assitant 8.5,  that I could also try out. 
0 Kudos
Message 5 of 18
(4,740 Views)
I'm using Vision Assistant 8.2.   I've also attached another .png file to try out.    I did get Vision Assistant 8.5 in the mail a few days ago, so I could try installing that and see If I get the same results.   The notes on 8.5 didn't say anything about improvements to ColorPatternMatching though.
Does Geometric Pattern Matching work for color?
0 Kudos
Message 6 of 18
(4,735 Views)
The file didn't attach on last reply
0 Kudos
Message 7 of 18
(4,734 Views)
Trying to attach again
Download All
0 Kudos
Message 8 of 18
(4,738 Views)
Dan,

I was actually able to recreate the issue with the new template you attached. What's happening is that the black border on your template is interfering with the objects near it. Try making your template smaller so that it has less black space, and I think that should solve your issue. You also might try geometric matching, as it doesn't have these problems with overlapping objects.
0 Kudos
Message 9 of 18
(4,727 Views)
How do you explain making the search box smaller and it finding it with a high matchscore?  Something still seems fishy.   Can Geometric Matching be used with color?
0 Kudos
Message 10 of 18
(4,724 Views)