cv2.undistortPoints: -215:Assertion failed; src seems to have an invalid format

asked 2019-08-08 20:03:16 -0500

caniko gravatar image

I am running the following code in python. I am only including the src since that is the source of the assertion error. I am not sure what is happening in this instance, and would appreciate the assistance. Thanks in advance

points_cam1 = np.array([[[1232., 1004.]]])

cv2.undistortPoints(src=points_cam1, cameraMatrix=mtx_l, distCoeffs=dist_l, P=P1, R=R1)

error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\calib3d\src\undistort.cpp:569: error: (-215:Assertion failed) src.isContinuous() && (src.depth() == CV_32F || src.depth() == CV_64F) && ((src.rows == 1 && src.channels() == 2) || src.cols*src.channels() == 2) in function 'cv::undistortPoints'
edit retag flag offensive close merge delete