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.
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.
02-16-2015 04:21 AM
Hi all,
I have an 8bit grayscale image of dimension 3969 X 600, the image is slightly tilted. i need to find the rotation angle and apply the rotation before i do the processing.
Is there any transformation functions readily available in LabVIEW to find the rotation angle?
Need your suggestions folks,
Solved! Go to Solution.
02-16-2015 05:18 AM
Hello,
slightly tilted is a strange phrase - it doesn't tell anything about your rotation.
Do you have any characteristic points (two points at least) on your image that can be used as a reference to calculate the degree of image rotation? If you can find such fiducials, you can base your image rotation on this.
You have IMAQ Rotate readily available in the Image Manipulation pallete.
Best regards,
K
02-16-2015 06:20 AM
Hi Klemen,
Thanks for your time,
I am not sure which points i need to use as reference to calculate the degree of rotation, is there any functions available to calculate the rotation, I have attached the 2d array of image. I need a little more help.
Can i use the vi (rotate 8bit) which can be found in the following link below?
http://www.ni.com/example/26943/en/
02-16-2015 07:36 AM
Hi Klemen,
The reference points are (0,250) (3968,359). Is there any generic formula to calculate the degree using the co-ordinates.
02-17-2015 12:08 AM
Hello,
just calculate the slope of the line, connecting both points:
xDiff = p2.x - p1.x
yDiff = p2.y - p1.y
angle [deg] = atan2(yDiff,xDiff) *(180/pi)
Best regards,
K