Skip to content

Commit

Permalink
fix opencv3 compatibility problem
Browse files Browse the repository at this point in the history
  • Loading branch information
PeiliangLi committed Jun 21, 2017
1 parent a2fcbb8 commit 25b1ef7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vins_estimator/src/loop-closure/keyframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ void KeyFrame::PnPRANSAC(vector<cv::Point2f> &measurements_old,

cv::Mat inliers;
TicToc t_pnp_ransac;
solvePnPRansac(pts_3_vector, measurements_old_norm, K, D, rvec, t, true, 100, 10.0 / 460.0, 100, inliers);
if(CV_MAJOR_VERSION < 3)
solvePnPRansac(pts_3_vector, measurements_old_norm, K, D, rvec, t, true, 100, 10.0 / 460.0, 100, inliers);
else
solvePnPRansac(pts_3_vector, measurements_old_norm, K, D, rvec, t, true, 100, 10.0 / 460.0, 0.99, inliers);
ROS_DEBUG("t_pnp_ransac %f ms", t_pnp_ransac.toc());

std::vector<uchar> status;
Expand Down

0 comments on commit 25b1ef7

Please sign in to comment.