OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Sat, 08 Apr 2017 16:35:56 -0500how to calculate the inliers points from my rotation and translation matrix?http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/ how to calculate the inliers points from my rotation and translation matrix?
if I have the points lists
std::vector<Point3d> opoints;
std::vector<Point2d> ipoints;
and I have the rotation and translation matrix, How can I calculate the inliers points
I know that cv::solvePnPRansac will calculate the inliers, rotation and translation from the two points list, but I need to calculate the inliers from my rotation and translation?
Thanks for your supportFri, 07 Apr 2017 16:35:39 -0500http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/Answer by Tetragramm for <p>how to calculate the inliers points from my rotation and translation matrix?
if I have the points lists
std::vector<point3d> opoints;
std::vector<point2d> ipoints;
and I have the rotation and translation matrix, How can I calculate the inliers points</p>
<p>I know that cv::solvePnPRansac will calculate the inliers, rotation and translation from the two points list, but I need to calculate the inliers from my rotation and translation?</p>
<p>Thanks for your support</p>
http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/?answer=138673#post-id-138673You can't know absolutely, but you can set an error threshold. Then any points that have less than that error are inliers.
Use projectPoints on the 3d to get a set of 2d points. Then calculate the error of the projected points from the "true" points as sqrt(diffx^2 + diffy^2). Fri, 07 Apr 2017 23:22:30 -0500http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/?answer=138673#post-id-138673Comment by Tetragramm for <p>You can't know absolutely, but you can set an error threshold. Then any points that have less than that error are inliers. </p>
<p>Use projectPoints on the 3d to get a set of 2d points. Then calculate the error of the projected points from the "true" points as sqrt(diffx^2 + diffy^2). </p>
http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/?comment=138750#post-id-138750[projectPoints](http://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga1019495a2c8d1743ed5cc23fa0daff8c) is the name of the function.Sat, 08 Apr 2017 16:35:56 -0500http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/?comment=138750#post-id-138750Comment by Mohammed Omar for <p>You can't know absolutely, but you can set an error threshold. Then any points that have less than that error are inliers. </p>
<p>Use projectPoints on the 3d to get a set of 2d points. Then calculate the error of the projected points from the "true" points as sqrt(diffx^2 + diffy^2). </p>
http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/?comment=138679#post-id-138679thanks for you, can you give me suggestion how to get get the 2d point from the 3d points?Sat, 08 Apr 2017 01:46:34 -0500http://answers.opencv.org/question/138651/how-to-calculate-the-inliers-points-from-my-rotation-and-translation-matrix/?comment=138679#post-id-138679