我如何检索点的单应性计算findHomography和RANSAC

How can I retrieve the points of the homography computed findHomography and RANSAC?

本文关键字:单应性 计算 findHomography RANSAC 何检索 检索      更新时间:2023-10-16

我是OpenCV的新手。我注意到

这一行
Mat H = findHomography( obj, scene, CV_RANSAC );

有助于在RANSAC中找到H

然而,我需要RANSAC之后"纯化"匹配点的位置,我根本找不到我可以使用的函数。我需要一个函数,使用RANSAC,并返回匹配点的位置后RANSAC。

findHomography可以选择性地提供inliers和outliers的掩码(inliers就是你所说的纯化的匹配)。

c++: Mat findHomography(InputArray srcPoints, InputArray dstPoints, int method=0, double ransacReprojThreshold=3, OutputArray mask=noArray())

Python: cv2。findHomography(srcPoints, dstPoints[, method[, ransacReprojThreshold[, mask]]])→检索,掩码

在进行匹配时,您只能使用内线(即相应mask值等于1的点)

当你从finghomography得到真正的H33结果时,为什么不透视变换从蒙版到帧的匹配点,然后你得到许多"纯化"的匹配点