Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to match a pattern of a different scale

(Using LabView 2010)

I'm trying to match a pattern that is a different size in the two images and could use some advice.

 

The pallette I'm looking on is Vision and Motion -> Machine Vision -> Searching and Matching

 

It would seem (please correct me if I'm wrong) that the 'IMAQ Match pattern.vi' is unable to use scaling to match the template image to another image where the pattern is a different size, since it lacks the options.

 

I *think* it is possible with 'IMAQ match geometric pattern.vi', but after playing around with the example vi provided I simply can't get it to recognise the pattern if I change the size of either the template image or target image.

 

Can anyone who has got this to work for them tell me how they set it up?

 

Thanks

0 Kudos
Message 1 of 4
(5,361 Views)

Looking further at it, changing some inputs of the function "IMAQ Setup Match Geometric Pattern 2 VI", you can enable scaling, which claims to have a default scaling range of 75% to 125%.  However, it couldn't detect the images I gave the example vi in this range, and if you manually set the range, it can't match patterns (even of the same size) when I set the range larger than 90% to 110%...

0 Kudos
Message 2 of 4
(5,355 Views)

Hello,

 

match pattern is shift invariant, rotation invariant up to 0-360 deg, but scale invariant to only around +- 5 deg. One option is to learn multiple templates of the object you are trying to detect. 

 

If you use geomtric pattern matching, you have to "learn" the template to account for all the scales of your object, you wish to detect.

 

In the first step I suggest (to test your application) using Template editor (located at "C:\Program Files (x86)\National Instruments\Vision\Utility\NI Vision Template Editor\NI Vision Template Editor.exe") to create a template and build your aplication from there.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 3 of 4
(5,347 Views)

I would just like to correct a typing error in my previous post:

 

"...scale invariant to only around +- 5 deg."

 

There should be % instead of deg here.

 

Sorry.

 

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 4
(5,276 Views)