solvePnPRansac(), ipoints.isContinuous() error

asked 2014-03-26 13:44:42 -0600

jay gravatar image


I'm very new to openCV-python so I'm sorry if this is more obvious to others. I'm trying to run the example pose estimation code that is supplied in the documentation. I'm able to generate the appropriate camera calibration values using the example code. However, the pose estimation always fails at the solvePNPRansac() function with the failed assertion ipoints.isContinuous(), see error below:

OpenCV Error: Assertion failed (ipoints.isContinuous()) in solvePnPRansac, file /tmp/opencv-wcmo/opencv-, line 286
Traceback (most recent call last):
  File "", line 45, in <module>
    rvecs, tvecs, inliers = cv2.solvePnPRansac(objp, corners2, mtx, dist)
cv2.error: /tmp/opencv-wcmo/opencv- error: (-215) ipoints.isContinuous() in function solvePnPRansac

Any suggestions on how I might fix this would be greatly appreciated.


edit retag flag offensive close merge delete


Sorry, I figured it out but according to the forum rules I can't answer my own question for another day.

Turns out I wasn't passing solvePnPRansac any valid data for the image points, corners2. It seems that cornerSubPix() wasn't producing any output.

jay gravatar imagejay ( 2014-03-27 10:30:28 -0600 )edit