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

show angle result? #18

Open
roachsinai opened this issue Dec 16, 2018 · 3 comments
Open

show angle result? #18

roachsinai opened this issue Dec 16, 2018 · 3 comments

Comments

@roachsinai
Copy link

roachsinai commented Dec 16, 2018

//show angle result
outtext << "X: " << std::setprecision(3) << euler_angle.at<double>(0);
cv::putText(temp, outtext.str(), cv::Point(50, 40), cv::FONT_HERSHEY_SIMPLEX, 0.75, cv::Scalar(0, 0, 0));
outtext.str("");
outtext << "Y: " << std::setprecision(3) << euler_angle.at<double>(1);
cv::putText(temp, outtext.str(), cv::Point(50, 60), cv::FONT_HERSHEY_SIMPLEX, 0.75, cv::Scalar(0, 0, 0));
outtext.str("");
outtext << "Z: " << std::setprecision(3) << euler_angle.at<double>(2);
cv::putText(temp, outtext.str(), cv::Point(50, 80), cv::FONT_HERSHEY_SIMPLEX, 0.75, cv::Scalar(0, 0, 0));
outtext.str("");

Seems it should be: Y-Z-X means, pitch-yaw-roll?

@jack17529
Copy link

jack17529 commented Jan 23, 2019

@lincolnhard and @roachsinai, please help.
How to calculate pitch angle with Python?

@roachsinai
Copy link
Author

What do you mean?

_, _, _, _, _, _, euler_angle = cv2.decomposeProjectionMatrix(pose_mat)

@jack17529
Copy link

@roachsinai , I figured it out already 👍 yeah that is also right.
I think what you were asking are actually euler angles, that are displayed on the video capture, they are X for pitch,... respectively.

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