06-10-2009 02:44 AM
I need to know how the coordinates of the pixels change when they are rotated by a certain angle.
Or suggest some VI which will give the new coordinate values after rotation..
pls reply
Solved! Go to Solution.
06-10-2009 04:23 AM
Hi,
You can use 2D Cartesian Coordinate Rotation.vi (from Mathematics->Geometry palette)
Andrey.
06-10-2009 05:51 AM
i tried it .. but it also gave negative values ..
how to convert them in to meaningful values..?
pls reply
06-10-2009 06:13 AM
Combine it with 2D Cartesian Coordinate Shift.vi. You should clear understand where is your rotation center, of course.
Andrey.
06-10-2009 06:39 AM
i tried it .. but it also gave negative values ..
how to convert them in to meaningful values..?
pls reply
06-10-2009 06:50 AM - edited 06-10-2009 06:51 AM
Hmmm....
Not fully understand where is your problem? Show your code, please.
Quick and dirty test:
Andrey.
06-10-2009 07:21 AM
but still the values are negative...
i want to rotate the overlay for the selected roi..
AM UPLOADING THE VI
06-10-2009 07:53 AM
If you will do this exercise accurately, then you will get desired result.
Your problem with coordinate shift (if you not maintain size of the rotated image, then it should be used in calculation. Also be accurate with rotated rectangle).
Otherwise if you need just rotate ROI for overlay, then you can use IMAQ Transform ROI instead of calculation each point separately. See attached example.
Andrey.
06-10-2009 08:12 AM
iam wrkin in LV 8.2
pls send me a screenshot of the VI.
How do i find the reference?
06-10-2009 08:23 AM
Saved in LV 8.2. Screenshot attached.
Andrey.