Hello,
I was looking at imrotate and tried it on a simple test matrix and got
the wrong result:
octave:1> a=[1,2,3;4,5,6;7,8,9]
a =
1 2 3
4 5 6
7 8 9
octave:2> imrotate(a,270)
ans =
0 7 4 1
8 5 2 2
9 6 3 0
I wrote a patch to handle the special cases where rotations are of
angles divisible by 90, it speeds up these rotations tremendously and
returns the correct result.
Before Patch:
octave:5> a=rand(1000);
octave:6> tic;imrotate(a,90);toc
ans = 16.821
After Patch:
octave:7> tic;imrotate(a,90);toc
ans = 0.37471
Thanks,
Todd
|