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

POINT_VARIANCE_THRESHOLD error on Solve Camera Pose #2

Open
K-Meech opened this issue Sep 7, 2023 · 0 comments
Open

POINT_VARIANCE_THRESHOLD error on Solve Camera Pose #2

K-Meech opened this issue Sep 7, 2023 · 0 comments

Comments

@K-Meech
Copy link
Owner

K-Meech commented Sep 7, 2023

Sometimes when 'Solve Camera Pose' is clicked, the following error occurs from openCV:

ret, rvec, tvec, error = cv.solvePnPGeneric(
cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\calib3d\src\sqpnp.cpp:242: 
error: (-215:Assertion failed) point_coordinate_variance >= POINT_VARIANCE_THRESHOLD 
in function 'cv::sqpnp::PoseSolver::computeOmega'

This is usually solved by placing more points, or removing ones that are poor matches. It would be good to catch this error, and provide an informative message to the user.

OpenCV code for reference: https://github.com/opencv/opencv/blob/748279d5f1026c265335c3ac5f0a56007f83a915/modules/calib3d/src/sqpnp.cpp#L242

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

1 participant