Ask Your Question

yeshi's profile - activity

2017-04-02 18:47:58 -0600 asked a question Using SolvePnP for Pose estmation

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);