Hi,
I am having trouble using solvePNPRansac
correctly. I try to estimate the camera pose for each frame of a video. I have a set of 3d points using recoverPose
then TriangulatePoints
after selecting keyframes. But I also would like to have the pose for all the frames between so I am trying to use solvePNPRansac
with the set of 3d points and the newly detected 2d points. However the two set are not of the same size, and I am having this error:
cv2.error: OpenCV(4.5.1) error: (-215:Assertion failed) npoints >= 4 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F)) in function ‘cv::solvePnPRansac’
I am not sure how I should select the correct points in this case.
Do you have some suggestions?