Pau Gargallo
unread,May 18, 2012, 4:58:27 AM5/18/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Henning Tjaden, libmv...@googlegroups.com
Hi Henning,
I wrote this code long ago and don't remember all the details. I'm
copying the mail to the libmv list in case someone can also help. In
any case, here are the answer to your questions:
> - Is the libmv five point implementation ready for use?
It's never been extensively tested with real data, but yes, it should
be ready to use.
> - I get up to 10 solutions for the essential matrix
> from FivePointsRelativePose(). How do I know which E is the right one (I
> could not find that in that in the Stewénius paper either)?
It is normal to get up to 10 solutions. Only one of them will be
correct, but you can not know which one it is with only 5
correspondences. The stardard way to use this functions is inside a
RANSAC loop. That is you iterate the following algo:
1- you sample 5 correspondences out of a large bag of correspondences
2- you compute up to 10 candidate essential matrices using these
correspondences
3- for each candidate, you count the number of inlier correspondeces
in the bag of correspondences
4- you keep the essential matrix with more correspondences.
There is a robust estimation framework in libmv. I remember it being a
bit too bureaucratic, but it works.
> - The values of the resulting translation vector of
> MotionFromEssentialAndCorrespondence() are not what i expected (for all Es I
> get). The values always seem to be between [-1; 1] and the z-component is
> mostly somewhere close to 1.0 regardless of camera movement (I don't even
> see a significant difference when the camera isn't moving at all).
MotionFromEssential assumes that the camera did move. It won't work
for static cameras. Additionally, it is impossible to know how far a
camera did move because there is always a scale ambiguity when
reconstructing things from images. Therefore, MotionFromEssntial
assumes always a translation of length 1. The only unknow is the
direction of the translation not the magnitude.
> Are the
> parameters x1 and x2 the projected coordinates of one matching feature in
> the camera coordinate system (x' = K^-1*x)?
yes, the five point algorithm works with the so called normalized
image coordinates.
> - In the file five_point_test.cc x1 and x2 are set to the following:
>
>> x1Col << d.x[0].col(i)(0), d.x[0].col((i+1) % num_views)(1);
>> x2Col << d.x[1].col(i)(0), d.x[1].col((i+1) % num_views)(1);
>
> Are these lines correct? Just for my better understanding, shouldn't it be:
>
>> x1Col << d.x[i].col(0)(0), d.x[i].col(0)(1);
>> x2Col << d.x[(i+1) % num_views ].col(0)(0), d.x[ (i+1) %
>> num_views ].col(0)(1);
you are right. The code is wrong and there seems to be many more
errors in the rest of the test because it is passing. :O
> I would already like to thank you and your partners for ever writing libmv
> and hope these are not too many or stupid questions.
It's been close to 3 years since i've last done anything for libmv. I
don't know what is its current state, but I'm sure that motivated
coders like you would be a great help! ;-)
Have fun!
pau