Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

score too low?

Hello,
I have a case where a patternmatch should not have passed, and I'm using the default score of 700. I have attached a screen capture of the log file, which shows the template image it searched for, and the acquired image it says it found the template in. The captured image has the overlaid ROI and where it thinks it found the pattern. It seems to me, looking at where it thinks it found the pattern, that the score should be nowhere near 700.

So this brings into question, what should our lower score threshold be? We are using what appears to be the suggested default of 700, but that obviously should be raised given the false passes are observing. I did have a previous run, same false pass, same image and template, but the score was 804. So it should be at least 804, but what should it be? Our lagitimate pattern match passes are typically above 900, but I don't want to be too strict either. Any help would be appreciated. Please see the attached screen capture of the error.

Thanks
0 Kudos
Message 1 of 4
(3,139 Views)

Perhaps you should try a different approach.  It looks like the original image has a black grid over the entire image.  That is probably what is generating the high score, and the text is the minor portion that doesn't match.

I would suggest filtering the image to remove the grid.  You could use either an averaging filter or a median/min/max filter to remove the grid.  The best results would depend on the original image.

Once you remove the grid, you should have a solid background with text on it.  This will work much better with pattern matching.

If you post an original image, I could suggest ideal processing for it.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 4
(3,133 Views)
For the image you attached, I found a 3x3 averaging filter worked very well.  This removed the individual pixels and made it a smooth background.  I think pattern matching would work very well with the resulting image.  Of course, you would have to do the same processing on both the template image and the test image.
 
Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 4
(3,121 Views)
I absolutely agree with Bruce, and would just add that your template looks like it may be larger than it needs to be. Assuming that the "Message Sent" text is the only important part of your pattern, you will probably be happier with your results if you constrain your template to just that portion, instead of also including the high contrast areas at the top and bottom of your current template.

Also, you may want to look at the Golden Template Inspection feature. It may be well suited to the test you're trying to perform.

Kevin C.
0 Kudos
Message 4 of 4
(3,108 Views)