Using SolvePnP for Pose estmation

asked 2017-04-02 15:06:40 -0500

yeshi gravatar image

Hello,

I am using Aruco markers and trying to estimate the 3D pose of the object to which the marker is attached. I tried to use the singleMarkerPoseEstimation method or Aruco library but the z-axis is flipping around a lot. So i used the marker corners extracted using aruco library and calling SolvePnP method directly. Currently I set useExtrinsicGuess flag off and cv::SOLVEPNP_ITERATIVE flag. But still there is an occassional z-axis flipping.

Are there any other flags of SolvePnP that would give better pose estimates consistently? Or is it better to apply kalman filtering on the noisy data.

Thank you

CODE:

            rvecs.at(i)[0] = 0;
            rvecs.at(i)[1] = 0;
            rvecs.at(i)[2] = 0;

            tvecs.at(i)[0] = 0;
            tvecs.at(i)[1] = 0;
            tvecs.at(i)[2] = 0;

            cv::solvePnP(marker_object_points_,corners,camera_matrix_,dist_coeffs_,rvecs[i],tvecs[i],false,cv:: SOLVEPNP_ITERATIVE);
edit retag flag offensive close merge delete