Find Homography matrix from Fundamental matrix

感情迁移 提交于 2019-12-05 03:44:29

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/22780102/find-homography-matrix-from-fundamental-matrix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!