本文介绍了如何判断单应矩阵是否可以接受?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 OpenCV 的 findHomography 函数来估计来自不同图像的两组点之间的单应性时,由于输入点内的异常值,有时您会得到一个糟糕的单应性,即使您使用 RANSAC 或LMEDS.

When using OpenCV's findHomography function to estimate an homography between two sets of points, from different images, you will sometimes get a bad homography due to outliers within your input points, even if you use RANSAC or LMEDS.

// opencv java example:
Mat H = Calib3d.findHomography( src_points, dst_points, Calib3d.RANSAC, 10 );

如何判断生成的 3x3 单应矩阵是否可接受?

How can you tell if the resulting 3x3 homography matrix is acceptable or not?

我已在 Stackoverflow 和 Google 中寻找此问题的答案,但无法找到.

I have looked for an answer to this here in Stackoverflow and in Google and was unable to find it.

我找到了这篇文章,但对我来说有点神秘:

I found this article, but it is a bit cryptic to me:

单应性的几何误差"

推荐答案

判断单应性是否可接受的最好方法是.

The best way to tell if the homography is acceptable is.

1- 获取一张图像的点并使用计算的单应性重新投影它们.

//for one 3D point, this would be the projection
px' = H * px;
py' = H * py;
pz' = H * pz;

2- 计算重投影点与实际点之间的欧几里得距离图片.

2- Calculate the euclidean distance between the reprojected points and the real points in the image.

重投影错误一点.p是投影点,q是实点.

Reprojection error for one point. p is the projected point and q is the real point.

3- 建立一个阈值来决定重投影误差是否可以接受.

例如,对于许多跟踪应用程序来说,大于一像素的误差是不可接受的.

For example, an error greater than one pixel wouldn't be acceptable for many tracking applications.

这篇关于如何判断单应矩阵是否可以接受?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-16 23:52
查看更多