Ask Your Question

m.barz's profile - activity

2020-03-21 18:35:39 -0600 received badge  Famous Question (source)
2018-04-20 08:19:57 -0600 received badge  Notable Question (source)
2017-06-19 09:59:18 -0600 received badge  Popular Question (source)
2014-02-21 02:38:24 -0600 received badge  Student (source)
2014-02-19 04:45:05 -0600 asked a question 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