Closed yzz-cver closed 2 years ago
Hi, thank you for your interest.
If I understand your question correctly, you are referring to this line in the code: https://github.com/duanzhiihao/CEPDOF_tools/blob/20f3babe275b0ca10ebff25a0f62be8d521795c9/cepdof_api.py#L225
You said:
Why not this representation?R = np.asarray([[c, -s], [s, c]]),thank you!
Your version corresponds to a counterclockwise rotation matrix. See for example Wikipedia:
However, in our case, the degree is clockwise, as you highlighted in your screenshot. So we should replace theta
with -theta
in the matrix, which will result in our version as in our code.
The figure below is the calculated rotation matrix. I don't know which step is wrong. Please help me to take a look. Thank you.
Your definition of alpha
is different than in our case. In our case, alpha
should be the clock-wise rotation angle from the vertical axis pointing up. See the image below.
With the above definition, your calculation would be correct.
Please let me know if this helps or not.
Thank you for your patience to explain, it helped me a lot!
No problem :) I'm happy that you figured it out!
Sorry, there is one place that I still don't fully understand. The solution of the rotation matrix is shown in the figure, and the obtained matrix is still incorrect.
Your calculation in your setting is indeed correct. But I just recall that we need to reverse the y axis (should be pointing down), since in the image coordinate, the top-left corner is the origin (0,0). I also did it wrong in my previous reply. See below for the correct version.
I understand, thank you very much!
Hello, according to the definition of the angle of the dataset, why is the rotation matrix in the following representation. Why not this representation?R = np.asarray([[c, -s], [s, c]]),thank you!