LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

straight the image

Solved!
Go to solution

Hello every one,

 

Can any one help to in finding a way of how to straight the any image. If there is an image whose orientaion is completely out of phase comapred to reference image then how to straight the image. IMAQ rotate and IMAQ symmetry can do it but they work manually ( you have to change the angles yoursself) but I want the labview to recognise the image and straight it for me. Is this possible.?  I have attached my basic VI which only consists how to straight the image and an image which can explain everything itself. Thanks for help 

 

Best wishes,

Lazer

Download All
0 Kudos
Message 1 of 9
(3,560 Views)

Hello everyone,

 

My post is nearly 4 day old now, I am wondering when I will get the response.

 

Lazer

0 Kudos
Message 2 of 9
(3,496 Views)

A little exaggeration.  Try 2 days old.

0 Kudos
Message 3 of 9
(3,493 Views)

Hello Raven,

 

Thanks for reply and correction. 

 

Lazer

0 Kudos
Message 4 of 9
(3,486 Views)
Solution
Accepted by topic author lazer

Hello lazer,

 

From looking over your previous forum posts, specifically this one here:

 

http://forums.ni.com/t5/Machine-Vision/Pattern-Recognition-for-solar-cells-for-different-sizes/m-p/2...

 

The last program you posted ( "detect the shape 2.vi" ) looks like you have an angle coming out from your cluster of IMAQ Detect Shapes vi. What you would want to do to straighten up an image is to take a reference to your shape, which you are doing in that program, see its angle of offset from either the vertical or horizontal, which you also have coming out from an unbundle by name function, and then apply that angle to rotate your image in the opposite direction to get it "straight". I would suggest taking that angle and feeding it in to your IMAQ rotate function that you have in "straight the image.vi" and seeing the results of it there.

Best regards,

Mark W
Applications Engineer
National Instruments UK & Ireland
Message 5 of 9
(3,459 Views)

Hello Mark, 

 

Thanks for reply and guding me through the procedure. It is working. Thank you very much, however I have another question to ask. As you can see in my post "Detect the shape 2", What I am trying to do is: I am intending to detect the rectangle and then calculate the area of this rectangle. Any way which can perform this task as well. I have attached, another VI which I tried to detect the image but this one only showing me the cells only, but I am trying to detect the whole rectangle. I program which can detect any rectangle and calculate the area of the rectangle. 

 

Many Thanks 

Lazer

0 Kudos
Message 6 of 9
(3,431 Views)