octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44830] image package: imtransform gives diffe


From: H. G.
Subject: [Octave-bug-tracker] [bug #44830] image package: imtransform gives different numbers on simple rotation
Date: Tue, 28 Apr 2015 09:49:54 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #5, bug #44830 (project octave):

I have double checked the behavior of findbounds.m. And this function seems to
be quite Matlab compatible. If I run this little script


uv = [1 3; 1 3];
a = 45;
t = maketform('affine',[cosd(a) sind(a) 0; -sind(a) cosd(a) 0; 0 0 1]);
xy = findbounds(t, uv)


Then the Matlab and the Octave result are identical:  xy = [-1.4142 2.8284;
-1.4142 2.8284] .

Additionally I have performed another test for Matlab compatibility of
imtransform.m. Running this little script


M = [0 1 0; 0 1 0; 0 1 0];
[imtrans, x, y] = imtransform(M, t, 'fillvalues',0);
imtrans
x
y


gives different results in Matlab and Octave. The difference in the rotated
image data (imtrans) is already known, this was the original issue of this bug
report. But also the returned coordinate limits x and y are different between
Matlab and Octave. Octave returns x=[-1.4142; 1.4142] and y=[1.4142; 4.2426],
whereas Matlab returns x = [-1.4142, 1.5858] and y=[1.4142, 4.4142].

The height and width of the returned coordinate limits of Octave are sqrt(8),
which I can fully understand. The height and width of the returned coordinate
limits of Matlab are sqrt(9)=3, there I have no clue why this would be! (Or is
it just rounding off the coordinates width to integer values, but why whould
they then keep the coordinate limits at fractional values??)

So my personal conclusion is, that the Matlab version of imtransform does some
funny things, that I don't understand. And I can fully live with the image
results of the Octave version of imtransform.m . (Maybe same image size would
be nice, but that's been taken care of with a different bug report already.)

My suggestion: Should we just add a little note to the help string of
imtransform.m, and the close this bug report? Maybe something like this "note:
The transformed image data is comparable in quality to the Matlab results. But
there are differences in the exact values of the returned images."

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44830>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]