Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Head Pose Estimation #464

Open
saeidn95 opened this issue May 16, 2024 · 4 comments
Open

Head Pose Estimation #464

saeidn95 opened this issue May 16, 2024 · 4 comments
Assignees

Comments

@saeidn95
Copy link

Changes to rotationMatrixToEulerAngle

Need for dropping the factor of 2 in return values (pitch, yaw and roll) in the function rotationMatrixToEulerAngle (

const rotationMatrixToEulerAngle = (r: number[]): { pitch: number, yaw: number, roll: number } => {
)

The formulation can be modified as follows;
var cosThetaZ = math.sqrt(r00 * r00 + _r20 * _r20);
// thetaZ = Math.asin(r10);
thetaZ = Math.tan2(r10, cosThetaZ);

what this change thetaX, thetaY, thetaZ, are within the range of -pi to +pi, and there is no need to scale the return values by 2.

@vladmandic
Copy link
Owner

why not submit a PR?

@saeidn95
Copy link
Author

I could not quite figure how to do that. Let me try again.

@vladmandic
Copy link
Owner

it would be better as then your name goes to contributors list. if you can't, I'll deal with it next week.

@saeidn95
Copy link
Author

Not sure if I did it right, but I did a pull request now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants