ROHAN SAPHAL
ROHAN SAPHAL

Reputation: 21

Estimation of fundamental matrix or essential matrix from feature matching

I am estimating the fundamental matrix and the essential matrix by using the inbuilt functions in opencv.I provide input points to the function by using ORB and brute force matcher.These are the problems that i am facing:

1.The essential matrix that i compute from in built function does not match with the one i find from mathematical computation using fundamental matrix as E=k.t()FK.

2.As i vary the number of points used to compute F and E,the values of F and E are constantly changing.The function uses Ransac method.How do i know which value is the correct one??

3.I am also using an inbuilt function to decompose E and find the correct R and T from the 4 possible solutions.The value of R and T also change with the changing E.More concerning is the fact that the direction vector T changes without a pattern.Say it was in X direction at a value of E,if i change the value of E ,it changes to Y or Z.Y is this happening????.Has anyone else had the same problem.???

How do i resolve this problem.My project involves taking measurements of objects from images. Any suggestions or help would be welcome!!

Upvotes: 2

Views: 1288

Answers (2)

Nivesh Gadipudi
Nivesh Gadipudi

Reputation: 506

  1. Yes, Computing Fundamental Matrix gives a different matrix every time as it is defined up to a scale factor.
  2. It is a Rank 2 matrix with 7DOF(3 rot, 3 trans, 1 scaling).
  3. The fundamental matrix is a 3X3 matrix, F33(3rd col and 3rd row) is scale factor.
  4. You make ask why do we append matrix with constant at F33, Because of (X-Left)F(x-Right)=0, This is a homogenous equation with infinite solutions, we are adding a constraint by making F33 constant.

Upvotes: 0

Dima
Dima

Reputation: 39389

  1. Both F and E are defined up to a scale factor. It may help to normalize the matrices, e. g. by dividing by the last element.
  2. RANSAC is a randomized algorithm, so you will get a different result every time. You can test how much it varies by triangulating the points, or by computing the reprojection errors. If the results vary too much, you may want to increase the number of RANSAC trials or decrease the distance threshold, to make sure that RANSAC converges to the correct solution.

Upvotes: 1

Related Questions