LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pattern Matching (All): No rotation angle returned!

Hello all,

 

I have tried the example called Pattern Matching (All).vi in Labview 2013. I selected a certain object in the image PCB03-01 as a template. And then I did the pattern matching as I clicked the button "Read Next Image". Apparently, when it goes to PCB03-10, the source image is rotated by some angle. Therefore, I think the pattern matching should produce a rotation angle. However, in the matching results, the angle is always displayed as "0". (See the attached image for what I have described.)

 

Anyone has any idea why it happens? And how should we use the VI properly to make it produce the rotation angle (if the source image or the template image is rotated by some angle)?

 

Pattern Matching (All).png

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

Hi there,

 

That’s because you need additional steps to determine that the object is rotated. As this help topic explains (Coordinate System) you need a reference in the picture that can tell you the presence of an angular motion.

 

I did a quick prototype on Vision Assistant and attached the script and a VI generated from the script to give you an idea of the software implementation.

 

I hope this helps.

Alejandro C. | National Instruments
0 Kudos
Message 2 of 5
(4,077 Views)

Hi Alejandro,

 

Thank you very much for you reply and your efforts.

 

I tried the Vision Assistant, but it managed to detect the rotated pattern without setting coordinate system. Instead, I just clicked the option "Search for rotated patterns". You can check the image and the script that I have attached.

 

Besides, it seems that the Labview VI that you have attached does not work. When I run it, it just asks me to load a image and then display it. I have not seen anything about pattern matching in the Front Panel. Do you know what the problem is?

 

Thanks.

Regards.

 

Cheng

Download All
0 Kudos
Message 3 of 5
(4,036 Views)

Correct, using the rotated pattern option will simplify things. About the error...I forgot to include the template path control that's way the inspection is failing (the current setup is not able to automatically detect where the template is located). I'm attaching a new simplified example with path control for manually locating the template.

 

I hope this helps

Alejandro C. | National Instruments
Message 4 of 5
(4,019 Views)

In Pattern match(all).vi some subvi is password protected how to open it?

0 Kudos
Message 5 of 5
(2,728 Views)