Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Cut / extract image after rotation

 

Hello, I'm looking for a template on Image_In with IMAQ Match Pattern2 and the result is Fragments_In. Size_To_Cut is cluster with x and y resolution of template I am looking for. Everything is great as long as there 0 as an angle in Rotate Image function. The framents are then corectly cut, but still rotated. I was trying many solution with reference image connected to Image Dst of IMAQ Rotate, but the results were always shifted or somoething, there were wrong. I check the image information after rotation and it was the same as before, but maybe I'm doing something wrong, maybe the coordinates change. Thank you very much for all answers.

 

KArol

0 Kudos
Message 1 of 4
(3,567 Views)

Hello Karol,

 

If I understood correctly, are you getting rotated images as the output in 'Pictures_Array_Out' even when an angle of 0 is  provided as input to the IMAQ Rotate function? I tried this out on my end, but I did not get the same result - the images were not rotated. Could you post the VI on the forums? I (or others) could try it out then. 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 2 of 4
(3,518 Views)

HEllo

    Here is mentioned VI. Now there is constant '0' attached as an ANGLE input. I was looking for some solution and found, that I probably need to change the coordinates before cutting, after rotating with some blocks as  PixelToRealWorld or something but have no time to check that.

 

Karol

0 Kudos
Message 3 of 4
(3,511 Views)

Hello Karol,

 

For some reason, I am not able to get your VI up and working on my PC. I will play around with it to find out why. I have attached a similar VI that I made myself which works. I hope this works for you as well. 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 4 of 4
(3,482 Views)