02-06-2013 07:45 AM - edited 02-06-2013 08:08 AM
Hello everyone!
This code rotates an 2d array around a specified pivot point, using the IMAQ Vision library.
After execution, the pivot point is in the center of the array and the array is enlarged to fit the rotation.
Execution speed is very dependent on the specified angle, the position of the pivot point and the size of the array.
I'm sharing this code because, after a long search on the forums and internet, I found there is no fast solution for rotating 2d arrays by an arbitrary degree in LabVIEW.
I want to start a discussion about optimizing this code, without the use of IMAQ Vision (which is a detour to a C++ DLL).
Please help me defend labview and let us find a really fast way to do this directly, without using Pixmaps or Vision.
Thank you, and as always, kudos will be given!
02-06-2013 08:21 AM
Mmm, I made a mistake
Pivot should be OFFSET.
So after execution the offset is NOT the middle of the image.
sorry
02-07-2013 01:32 AM
Please someone
02-07-2013 03:14 AM - edited 02-07-2013 03:16 AM
Altenbach posted an example of array rotation here - http://forums.ni.com/t5/BreakPoint/LV-Picture-Control/m-p/230351#M748
I don't know how efficient it is, but since it's Altenbach, it's probably pretty good. It's also always around the center, but I'm assuming it should be possible to modify it to work on an arbitrary pivot point (e.g. by enlarging the entire array and placing the new pivot in the center).