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.
Given:
Point correspondences a in image 1.
Goal:
Finding corresponding points b laying on the so called epipolar line L
in image 2.
How?
| x0 | | x1 |
a = | y0 | , b = | y1 |
| 1 | | 1 |
L = F * a
|F00 F01 F02|
F = |F10 F11 F12|
|F20 F21 F22|
The following equation must be fulfilled to obtain b in image 2:
a' * F * b = 0
.
Note: a' = transpose(a)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With