Ask Your Question
0

Opencv 3.0 Assertion failed [closed]

asked 2015-07-31 04:43:13 -0500

tuuzdu gravatar image

updated 2015-07-31 10:10:41 -0500

After roslaunch monocular_pose_estimator demo.launch

OpenCV Error: Assertion failed (CV_IS_MAT(_cameraMatrix) && _cameraMatrix->rows == 3 && _cameraMatrix->cols == 3) in cvUndistortPoints, file /home/tuuzdu/tmp/opencv-3.0.0/modules/imgproc/src/undistort.cpp, line 288
terminate called after throwing an instance of 'cv::Exception'
what(): /home/tuuzdu/tmp/opencv-3.0.0/modules/imgproc/src/undistort.cpp:288: error: (-215) CV_IS_MAT(_cameraMatrix) && _cameraMatrix->rows == 3 && _cameraMatrix->cols == 3 in function cvUndistortPoints

What is mean CV_IS_MAT?

edit retag flag offensive reopen merge delete

Closed for the following reason OpenCV Question: THe OpenCV community prefers to answer questions at: http://answers.opencv.org/questions/ by tfoote
close date 2017-04-15 03:01:44.943126

Comments

Did you solve this issue? I am getting the exact same error, when I use : cv2.undistortPoints(src_norm_mat, dst_norm_mat, cameraMatrix, distCoeffs, Mat, newCameraMatrix)

cameraMatrix is 3x3. But I have save as a numpy array.

vivekp gravatar image vivekp  ( 2016-06-06 08:58:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-31 10:54:23 -0500

NEngelhard gravatar image

This is rather a question for answers.opencv.org .

But CV_IS_MAT sounds like a test if the object you passed in is of type cv::Mat. How do you call the function and what is the size of your _cameraMatrix? Is it a 3x3 Matrix?

edit flag offensive delete link more

Comments

It calls like trackable_object_.camera_matrix_K_ = cv::Mat(3, 3, CV_64F); I rewrite undistort.cpp with CV_Assert( CV_IS_MAT(_cameraMatrix) ); and with CV_Assert( _cameraMatrix->rows == 3 && _cameraMatrix->cols == 3 ); I got "Assertion failed" only with CV_IS_MAT(_cameraMatrix)

tuuzdu gravatar image tuuzdu  ( 2015-07-31 12:00:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-31 04:43:13 -0500

Seen: 928 times

Last updated: Jul 31 '15