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
Solved! Go to Solution.
From looking over your previous forum posts, specifically this one here:
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.
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.
We will try to make sure that we keep these issues separate in different threads so that if any one searches for your initial query they will find the solution in this thread, feel free to mark this thread as solved and carry the enquiry with regards to the area of the rectangle in the new thread that you have created:
Thanks for replying. Regards to accept the solution, at the moment there is no option for accepting the solution as it appears on the browsing page, I will accept it because I understood your point. Can you suggest a way, how can I detect my rectangle. You can post suggestion on my other thread.
When images are displayed in an incorrect orientation, you may rotate selected images counterclockwise or with a customized rotation angle. Rotating images individually or rotating a group of images can also be easily achieved! Here is a simple VB.NET solution for rotating image.