OpenCV::solvePNP() - Assertion failed

后端 未结 3 1764
臣服心动
臣服心动 2021-01-16 01:28

I am trying to get the pose of the camera with the help of solvePNP() from OpenCV.

After running my program I get the following errors:

OpenCV Error:         


        
3条回答
  •  无人及你
    2021-01-16 02:15

    Step into the function in a debugger and see exactly which assertion is failing. ( Probably it requires values in double (CV_64F) rather than float. )

    OpenCVs new "inputarray" wrapper issuppsoed to allow you to call functions with any shape of mat, vector of points, etc - and it will sort it out. But a lot of functions assume a particular inut format or have obsolete assertions enforcing a particular format.

    The stereo/calibration systems are the worst for requiring a specific layout, and frequently succesive operations require a different layout.

提交回复
热议问题