From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

pattern match with shift invariant AND rotation invariant

Is it possible to do a pattern match with shift invariant AND rotation invariant?

IMAQ Find Pattern 3 takes only shift OR rotaion invariant.

 

 

George Zou
0 Kudos
Message 1 of 6
(5,662 Views)

I am not sure I understand the problem. Rotation invariant will also find the template if the template has not rotated in the image (i.e. shifted). So I guess the answer to your question is if you select rotation invariant, the algorithm will find both shifted (0 degrees) and rotated templates in the image.

 

If you know a priori the max angle range that your template can rotate in the image, it is recommended to specify the angle range parameter of the algorithm, as this will speed up the algorithm not to look for a template in the full [0, 360] range.

 

Hope that makes sense.

0 Kudos
Message 2 of 6
(5,651 Views)

Dear zou,

 

you can perform shift invariant and rotation invariant matching in parallel, though I do not see the point.
Maybe you would like to compare the match scores, since they are different for both methods? The positions also differ slightly (and of course angles). Also, rotation invariant method is more time consuming, since it needs to rotate the template.

 

You can try something like this and then compare the match scores (here, you can specify multiple regions of interest to find your match). Don't forget to dispose of the images when they are no longer needed.

 

correlation.jpg

 

Best regards,


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 3 of 6
(5,633 Views)

Klemen,

 

Thanks for reply.

But your diagram is for shift OR rotation invariant.

I need shift AND rotation invariant.

 

The target object shifted AND rotated compare to the template.

And I don't have ROI.  The whole image is the ROI.  No easy way to narrow down.

 

George Zou
0 Kudos
Message 4 of 6
(5,612 Views)

Dear zou,

 

then you should use rotation invariant matching - it also finds the shifted reference template in the image along with the rotation information as ChristopheC pointed out.

 

If you don't get any matches, you should first check the template if it contains rotation invariant matching data (you should get an error if it doesn't). Also, the matching is not really scale invariant, only around to +-5%, so you need to train more samples if your object's size varies more.

 

What seems to be the problem in your application if you use rotation invariant matching?

 

And about ROI - if you are doing real-time analysis and tracking the same object in the image, the ROI narrows down your search area from iteration to iteration, so the detection is faster (compared to searching the entire image). This was just an example. If you want to search in the entire image, do not wire anything to "search rect".

Regards,


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 5 of 6
(5,603 Views)

Hello,

 

I would like to know some details on color pattern matching. What alogorithm was used in color pattern matching for shift and rotation invariant in labview 2009? Is it normalized correlation, pyramidal matching or some other algorithms?

 

In newer version, it was stated clearly. I would like to know the algorithm involved in older version. I working on my postgraduate studies and making some comparison between all the algorithms. 

Your kind assistance will help me alot. 

 

Thank you. 

0 Kudos
Message 6 of 6
(4,205 Views)