从基本矩阵中找到同形异义矩阵 [英] Find Homography matrix from Fundamental matrix

查看:226
本文介绍了从基本矩阵中找到同形异义矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在给定一组对应关系和基本矩阵F的情况下,我试图计算同构矩阵H.

根据对极几何学原理,我知道这可以通过解决方案

首先,请注意,您在链接中提到的方程式(C29)使用的线l与e ij 具有相同的坐标,是图像j中的子极.因此,l = e ij 不是一条上界,因为dot(e ij ,e ij )== norm(e ij )²== 1!= 0.

如果我坚持使用您链接中给出的符号,则可以将对数极子e ij 计算为F ij 的左空矢量.您可以通过在F_ij的转置上调用cv::SVD::solveZ来获取它.然后,如您的链接中所述,可以将单应性H ij (将点从图像i映射到图像j)计算为H ij = [e ij ] x F ij ,其中[e ij ] x 表示法是3x3斜对称算子.可以在有关跨产品的Wikipedia文章中找到该符号的定义.. >

但是,请注意,这样的单应性H ij 使用与e ij相同的坐标线,通过从图像j反投影的平面定义了从图像i到图像j的映射.子>.通常,这将提供与cv::findHomography返回的结果非常不同的结果,在这种情况下,所得的单应性是通过观察到的场景中的主平面从图像i到图像j的映射.因此,您将能够使用cv::findHomography返回的单应性近似注册两个图像,但是通常对于使用上述方法获得的单应性来说并非如此.

I'm trying to compute Homography matrix H given a set of correspondences and the Fundamental matrix F.

From the principle of Epipolar geometry I know this can be done by cross product of epiline and F from Epipole Geometry

[e_ij] x F_ij = H_ij

I'm using OpenCV for finding Fundamental matrix F from set of matches between two views using cv::findFundamentalMat().

My question is that how can I find e_ij and how to use it in order to compute H. In OpenCV there is a function cv::computeCorrespondEpilines() that finds epilines corespond to each given point.

It's worth mentioning that I'm not interested in computing H directly from set of matches but only from computed Fundamental matrix.

Thanks

解决方案

First, notice that the equation (C29) you mentioned from your link uses a line l with same coordinates as eij, which is the epipole in image j. Therefore, l=eij is not an epiline, since dot( eij , eij ) == norm(eij)² == 1 != 0.

If I stick to the notations given in your link, you can compute the epipole eij as the left null-vector of Fij. You can obtain it by calling cv::SVD::solveZ on the transpose of F_ij. Then, as is mentioned in your link, the homography Hij (which maps points from image i to image j) can be computed as Hij = [eij]x Fij, where the notation [eij]x refers to the 3x3 skew-symmetric operator. A definition of this notation can be found in the Wikipedia article on cross-product.

However, be aware that such an homography Hij defines a mapping from image i to image j via the plane backprojected from image j using the line with same coordinates as eij. In general, this will give a result which is very different from the result returned by cv::findHomography, where the resulting homography is a mapping from image i to image j via the dominant plane in the observed scene. Hence, you will be able to approximately register the two images using the homography returned by cv::findHomography, but in general this will not be the case for the homography obtained using the method above.

这篇关于从基本矩阵中找到同形异义矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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