Ask Your Question

How can solvePnPRansac be used with double values?

asked 2012-07-24 15:40:51 -0500

Niko gravatar image

I'm trying to use solvePnPRansac() to compute the 3D pose from a known 2D projection of the object. My values (intrinsic camera parameters, model points (3D), image points (2D)) are all double values. The normal solvePnP() does not complain about that.

However, when I try to use solvePnPRansac, it yields an error message:

Assertion failed < opoints.depth() == CV_32F >

How can I use this function with double values? (working with float does not give the desired results)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-06 05:10:37 -0500

wl2776 gravatar image

Upgrade OpenCV? Version 2.4.10 contains another check in solvePnPRansac

CV_Assert(opoints.depth() == CV_32F || opoints.depth() == CV_64F);

So does the latest git snapshot:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2012-07-24 15:40:51 -0500

Seen: 556 times

Last updated: Mar 06 '15