erkil1452 / gaze360

Code for the Gaze360: Physically Unconstrained Gaze Estimation in the Wild Dataset
http://gaze360.csail.mit.edu
Other
225 stars 42 forks source link

Definition of yaw and pitch #37

Closed LinReseach closed 2 years ago

LinReseach commented 2 years ago

Hi,

In your paper,

yaw=-atan(x./z); pitch=asin(y);

I don’t know why you define yaw and pitch like this. I think yaw and pitch should be defined as:

r=(x^2+y^2+z^2)^0.5; yaw=acos(z/r); pitch=atan(y/x); (because (x,y,z)is a normalized vector,so r always equals 1)

I know maybe this is a stupid question,but I will be very appreciated if you can help me.Thanks.

erkil1452 commented 2 years ago

Pitch is the vertical angle and our vertical axis is Y. So it needs to be a function of Y. We want zero pitch for Y=0 (e.g. [0,0,1]) so we use asin(Y).

Yaw is the horizontal angle, so it is a function of the remaining X and Z. We want yaw to be zero when looking into the camera, hence yaw = -atan2(x/z). The sign determines the clockwise/counterclockwise orientation and it is an arbitrary choice.

erkil1452 commented 2 years ago

See the E_xyz coordinates in Fig 2 of the supplement

LinReseach commented 2 years ago

Ok,I got it.Thanks a lot!