You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rotation during pixel origin initialisation at here results in inconsistency with Python. To illustrate this, consider the variable xy before shifting the fractional part when rotating at angle 1 and 90 degree using the example dataset. The important value to look at here is xy(1,2).
For rotating 1 degree, xy(1,2) is 28.588474093612945 in MATLAB, and in Python xy[1,0] is 27.588474093612945 (MATLAB and Python indices differ by 1), so they are equal; however for rotating 90 degree, xy(1,2) is 32.999999999999970 in MATLAB, and in Python xy[1,0] is 32.0.
So for 90 degree, mod(xy(1,2),1) in MATLAB results in 0.9999... and xy(:,2) is shifted by that amount, but it does not happen in Python.
Attached some files containing values of xy for both MATLAB and Python at degree 1 and 90. xy_deg_1_90.zip
The text was updated successfully, but these errors were encountered:
A fix could be increasing the precision in rotation in MATLAB, see here. The xy value matches for any angle now. This is the change I made when I compare the Python and MATLAB results.
The rotation during pixel origin initialisation at here results in inconsistency with Python. To illustrate this, consider the variable
xy
before shifting the fractional part when rotating at angle 1 and 90 degree using the example dataset. The important value to look at here isxy(1,2)
.For rotating 1 degree,
xy(1,2)
is28.588474093612945
in MATLAB, and in Pythonxy[1,0]
is27.588474093612945
(MATLAB and Python indices differ by 1), so they are equal; however for rotating 90 degree,xy(1,2)
is32.999999999999970
in MATLAB, and in Python xy[1,0] is32.0
.So for 90 degree,
mod(xy(1,2),1)
in MATLAB results in0.9999...
andxy(:,2)
is shifted by that amount, but it does not happen in Python.Attached some files containing values of
xy
for both MATLAB and Python at degree 1 and 90.xy_deg_1_90.zip
The text was updated successfully, but these errors were encountered: