Can anyone know what is going on with this opencv error ?
cv2.error: /home/desktop/OpenCV/opencv/modules/core/src/matrix.cpp:2294:
error: (-215) d == 2 && (sizes[0] == 1 || sizes[1] == 1 ||
sizes[0]*sizes[1] == 0) in function create
Line code which raise it is :
rvecs, tvecs, inliers = cv2.solvePnPRansac(objp, corners2, cameraMatrix, dist)
I followed step by step this tutorial: http://docs.opencv.org/master/dc/dbb/tutorial_py_calibration.html
It seems that cameraMatrix
is incorrect, but why ?
cameraMatrix
looks like this and seems to be as it would (see here):
[[ 535.99484574, 0. , 334.33388272],
[ 0. , 535.99541504, 239.81116973],
[ 0. , 0. , 1. ]]
From tutorial : cameraMatrix – Input camera matrix