Ask Your Question
1

How can solvePnPRansac be used with double values?

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

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
1

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

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: https://github.com/Itseez/opencv/blob...

edit flag offensive delete link more

Question Tools

Stats

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

Seen: 1,324 times

Last updated: Mar 06 '15