is SolvePnp pose estimation works for planner points?

asked 2019-03-27 08:42:19 -0500

opencvr gravatar image

updated 2019-03-27 09:23:37 -0500

Hi,

I am detecting 4 points on object (z=0) and using it as image points like this,

2d points
        std::vector<cv::Point2d> image_points;
        image_points.push_back(rect_points1[0]);
        image_points.push_back(rect_points1[1]);
        image_points.push_back(rect_points1[2]);
        image_points.push_back(rect_points1[3]);

also I have defined 3d object points in some arbitary reference frames like this,

3d points
        std::vector<cv::Point3d> model_points;
        model_points.push_back(cv::Point3d(0, 0, 0));
        model_points.push_back(cv::Point3d(1, 1, 0));
        model_points.push_back(cv::Point3d(2, 0, 0));
        model_points.push_back(cv::Point3d(1, -1, 0));

then using SolvePnp algorithm to find object POSE.

is this algorithm only work for non planner points? or method am I implementing is also correct?

Thanks.

edit retag flag offensive close merge delete