Use fundamental matrix to compute coordinates tran

2019-04-09 06:42发布

问题:

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 :)

回答1:

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.



回答2:

You can use F to calculate an epipolar line l ( l = Fa) in the second image for every interesting point a in the first image, and then you can find the best corresponding point b on l with the highest correlation with point a.