How to solve real_time_pose_estimation Debug error? abort() has been called

asked 2019-03-12 07:04:34 -0600

opencvr gravatar image

updated 2019-03-12 07:06:44 -0600

Hello,

when I run example_tutorial_pnp_detection application

This program shows how to detect an object given its 3D textured model. You can choose to use a recorded video or the webcam. Usage: ./cpp-tutorial-pnp_detection -help Keys: 'esc' - to quit.

I am getting this error,

OpenCV(4.0.1) Error: Assertion failed (channels() == CV_MAT_CN(dtype)) in cv::Mat::copyTo, file C:\opencv\sources\modules\core\src\copy.cpp, line 254

OpenCV: terminate handler is called! The last OpenCV error is:

OpenCV(4.0.1) Error: Assertion failed (channels() == CV_MAT_CN(dtype)) in cv::Mat::copyTo, file C:\opencv\sources\modules\core\src\copy.cpp, line 254

How to solve this?

Thanks.

edit retag flag offensive close merge delete

Comments

Since it is an example, the code must be working so it seems like that the input file (aka the images) aren't opened properly... modify the code and put a cv::imshow call in order to see if the images are correctly located and opened.

HYPEREGO gravatar imageHYPEREGO ( 2019-03-12 12:30:32 -0600 )edit