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
solvePNP计算结果很离谱请教 #2
Comments
你好,我覺得應該是內參數的問題,你可以先用opencv自帶的程式校正一下K和D兩個參數 |
恩,K我觉得差不多(按image size设),但D我确实没有管。 |
这样算,基本可用 double focal_length = img.cols; // Approximate focal length.
cv::Point2d center = cv::Point2d(img.cols/2,img.rows/2);
cv::Mat cam_matrix = (cv::Mat_<double>(3,3) << focal_length, 0, center.x, 0 , focal_length, center.y, 0, 0, 1);
cv::Mat dist_coeffs = cv::Mat::zeros(4,1,cv::DataType<double>::type); |
这样设置是不是默认人脸中心在图像中心? |
@lincolnhard 你好,问一下。我标定内参之后,发现 能说一下原因么? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问下,我代码运行起来后,发现solvePnP后的rotation_vec, translation_vec里面的数值都异常,都是e+30,e-11等,可能是哪里的问题,该函数输入的landmark点我看了下,都是对的,因为显示出来都没有问题。其他参数我没有改,感觉也不应该有非常大的影响。
不知道哪里的问题。。。。。,特请教,谢谢!
The text was updated successfully, but these errors were encountered: