undistortPoints with Python
Hello,
I got a problem with the function undistortPoints() when using Python. Hope someone can help me with that...
Here my initialization of camera intrinsics and distortion coef...
K = np.array([[776.65250589, 0, 645.53907335],
[0, 770.65916345, 374.76352079],
[0.0,0.0, 1.0]], dtype = np.float64)
dist_coef = np.array([6.47285370e-02, -1.55334472e-01, -1.29510733e-03, 1.95433144e-05, 4.63095096e-02], dtype = np.float32)
My call of undistortPoints is as follows:
cv2.undistortPoints(src, dst, K, dist_coef)
And here the error I get:
cv2.error: /home/michael/workspace/opencv-2.4.8/modules/imgproc/src/undistort.cpp:282:
error: (-215) CV_IS_MAT(_cameraMatrix) && _cameraMatrix->rows == 3 &&
_cameraMatrix->cols == 3 in function cvUndistortPoints
Thanks in advance!
Kind regards, Michael Barz