我目前正在完成我的兴趣点检测器的评估工具。在最后的步骤中,我发现了一个令人困惑的错误。OpenCV CV findHomography assertion error - counter => 4
Mat findHomography(InputArray srcPoints, InputArray dstPoints, int method=0, double ransacReprojThreshold=3, OutputArray mask=noArray())
的srcPoints
和dstPoints
是vector<Points2f>
存储该匹配的关键点的对应点。到目前为止,没有什么特别的 - 就像在教程中。
但是当我使用RANSAC并在范围[0,...,4]中有一个vector<Points2f>
时,我得到的断言错误比计数器应该大于或等于4。
问题1:该算法是否至少需要4个点才能描述属于当前模型的内容,并创建共识?
问题2:有没有关于此的文档? (我看了一下doc和tutorials。)
Please note that I already have seen this question。但是RANSAC的行为没有令人满意的答案。或者我是否应该接受这种方法至少需要四分才能找到单应性?
感谢您的帮助。
你能给我一个提示,我可以读这个方程吗?我只在文中发现了一些短语,告诉我“你至少需要4分”,但没有任何解释。 –
看看这个:http://cseweb.ucsd.edu/classes/wi07/cse252a/homography_estimation/homography_estimation.pdf – memecs