使用基本矩阵计算使用OpenCV的坐标转换 [英] Use fundamental matrix to compute coordinates translation using OpenCV

查看:406
本文介绍了使用基本矩阵计算使用OpenCV的坐标转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图计算两个图像之间的几个点的坐标对应。
我有一组已知对应的点,我使用它们与OpenCV的 findFundamentalMatrix(),以找到基本矩阵。
我验证了每个点的 x ^ T * F * x'=(0),结果总是正确或非常接近。

事情是,现在我想使用第一个图像上的点的坐标( y )和基本矩阵( F ),以便找到第二个图像上的点的坐标( y')。我首先想到简单地使用上面的等式,但是只给出 y'点的 z 无限解决方案



我还要如何使用基本矩阵计算翻译?



更清楚的是:知道基本矩阵 ,我如何使用它来将任何已知点(a,b,1)的坐标从第一个投影转换为第二个投影?



考虑到我们知道 a b F :(a',b,1) T * F *(a,b,1)=(0)



我以一个简单的绘图为例: http://i.imgur.com /drNr2.jpg 。想法是在投影2中找到红点(xq,yq)的坐标,考虑到我们知道它在投影中的坐标1和所有其他点在两个投影(和其他一些作为算法找到基本矩阵实际上至少需要8点)



另一个精度:在我的例子,已知点是共面的,但是研究的点不一定是。



我希望我的问题更清楚:)

解决方案

基本矩阵将点从一个图像转换为另一个图像中的线。




如何使用基本矩阵计算翻译? blockquote>



编辑:如果您已经校准了相机,您可以计算必要的矩阵, E ,从基本矩阵, F 。 E将一个图像中的点转换为另一个图像中的点。但当然,要求是有内部矩阵。如果 K 是内部矩阵 E = transpose(K)FK
另一种方法是为另一个图像中的点找到相应的线,然后沿着该线搜索与第一个图像中点周围的补丁外观相似的补丁。



编辑2 :在绘图中,您可以使用得到的点是共面的。因此,单应性在两个图像之间映射点位置,并且不需要找到基本矩阵。 OpenCV具有估计单应性的功能,只需要四个点。


I am trying to compute the coordinates correspondence of several points between two images. I have a group of points whose correspondences are known, I use them with OpenCV's findFundamentalMatrix() in order to find the fundamental matrix. I verified that x^T * F * x' = (0) for each point, and the result is always right or very close.

The thing is, now I'd like to use the coordinates of a point on the first image (y) and the fundamental matrix (F) in order to find the coordinates of the point on the second image (y'). I first thought about simply using the equation above, but given only the z of the y' point, there can be an infinity of solutions.

How else can I use the fundamental matrix to compute the translations ?

To be more clear: knowing the fundamental matrix "linking" two projections, how can I use it to translate the coordinates of any known point (a, b, 1) from the first projection to the second projection?

Considering that we know a, b and F in this equation: (a', b", 1)T * F * (a, b, 1) = (0)

I had made a simple drawing as an example: http://i.imgur.com/drNr2.jpg . The idea is to find the coordinates of the red dot (xq, yq) in projection 2, considering that we know its coordinates in projection 1 and the ones of all other points in both projections (and some other ones as the algorithm to find the fundamental matrix actually requires at least 8 points)

Another precision: in my example, known points are coplanar, but the researched point will not necessarily be.

I hope that made my problem more clear :)

解决方案

The fundamental matrix transforms points from one image to lines in the other. Could you elaborate more on

How else can I use the fundamental matrix to compute the translations?

please. Telling us what you want to achieve perhaps with an example would help too.

Edit: If you have calibrated the camera you can compute the essential matrix, E, from the fundamental matrix, F. E transforms a point in one image to a point in the other. But of course, the requirement is to have the internal matrix. If K is the internal matrix E=transpose(K)FK. The other method is to find the corresponding line for a point in the other image and then search along this line for the patch most similar in appearance to the patch surrounding the point in the first image. There are some other ways too but really need more information about the problem to tell which suits your case.

Edit 2: in the drawing you have got the points are coplanar. Hence, a homography maps the point positions between the two images, and there is no need to find the fundamental matrix. OpenCV has a function for estimating homographies, which needs only four points.

这篇关于使用基本矩阵计算使用OpenCV的坐标转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆