[英]How can I retrieve the points of the homography computed findHomography and RANSAC?
我是 OpenCV 的新手。 我注意到这条线
Mat H = findHomography( obj, scene, CV_RANSAC );
有助于使用 RANSAC 找到单应性H
但是,我需要 RANSAC 之后“纯化”匹配点的位置,但我根本找不到可以使用的功能。 我需要一个使用 RANSAC 并在 RANSAC 之后返回匹配点位置的函数。
findHomography可以选择提供内点和离群值的掩码(内点就是你所说的纯化匹配)。
C++: Mat findHomography(InputArray srcPoints, InputArray dstPoints, int method=0, double ransacReprojThreshold=3, OutputArray mask=noArray() )
Python:cv2.findHomography(srcPoints, dstPoints[, method[, ransacReprojThreshold[, mask]]]) → retval, mask
在进行匹配时,您只能使用内点(即对应mask
值等于 1 的点)。
当你从 finghomography 得到 H33 的真实结果时,为什么不将匹配点从掩码转换为帧,那么你会得到许多“纯化”的匹配点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.