OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Fri, 13 Jun 2014 18:35:49 -0500Finding fundamental matrix using RANSAC and 15 pointshttp://answers.opencv.org/question/34834/finding-fundamental-matrix-using-ransac-and-15-points/I want to find fundamental matrix using RANSAC having 10 points and find a bug(?) or discrepancy between documentation and source code. https://github.com/Itseez/opencv/blob/master/modules/calib3d/src/fundam.cpp#L710 this code says that I must have 15 points to use RANSAC (otherwise it use LMEDS even if I chose RANSAC), but http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#Mat%20findFundamentalMat%28InputArray%20points1,%20InputArray%20points2,%20int%20method,%20double%20param1,%20double%20param2,%20OutputArray%20mask%29 says that RANSAC work with >= 8 points (seems obvious to me). Can someone explain to me "why 15"? I spent a lot of time to finding a mistake in my program.Tue, 10 Jun 2014 16:40:55 -0500http://answers.opencv.org/question/34834/finding-fundamental-matrix-using-ransac-and-15-points/Answer by Kuznetcov Alexey for <p>I want to find fundamental matrix using RANSAC having 10 points and find a bug(?) or discrepancy between documentation and source code. <a href="https://github.com/Itseez/opencv/blob/master/modules/calib3d/src/fundam.cpp#L710">https://github.com/Itseez/opencv/blob/master/modules/calib3d/src/fundam.cpp#L710</a> this code says that I must have 15 points to use RANSAC (otherwise it use LMEDS even if I chose RANSAC), but <a href="http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#Mat%20findFundamentalMat%28InputArray%20points1,%20InputArray%20points2,%20int%20method,%20double%20param1,%20double%20param2,%20OutputArray%20mask%29">http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#Mat%20findFundamentalMat%28InputArray%20points1,%20InputArray%20points2,%20int%20method,%20double%20param1,%20double%20param2,%20OutputArray%20mask%29</a> says that RANSAC work with >= 8 points (seems obvious to me). Can someone explain to me "why 15"? I spent a lot of time to finding a mistake in my program.</p>
http://answers.opencv.org/question/34834/finding-fundamental-matrix-using-ransac-and-15-points/?answer=35019#post-id-35019I find an explanation. http://code.opencv.org/issues/2394#note-3
Sadly documentation has not changed from those days. In my opinion this feature should be documented, because LMEDS marks exactly 7 points as inliers, and when you expect to use RANSAC it looks really strange when you pass 14 very good points and function return 7 outliers.Fri, 13 Jun 2014 18:35:49 -0500http://answers.opencv.org/question/34834/finding-fundamental-matrix-using-ransac-and-15-points/?answer=35019#post-id-35019