# Epilines not correct

Hi,

I am trying to draw epilines on two images. But only one is shown correctly. See my result below:

Epilines on the first image (left) seems to be correct since epipole matches with location of second camera. But what about the second image. I expected it to be converged somewhere at left, but it is not. Any idea what is the reason?

Here is my code : https://gist.github.com/abidrahmank/6146351

UPDATE:

Just interchanging input images (img1 and img2) gives me following result which looks more better. (But it works only on this set of images)

Why does it happen like this?

edit retag close merge delete

1

Just interchanging the images gives more accurate results in both the cases

( 2013-08-03 07:56:31 -0500 )edit

Hi where to get this pics? would be nice that i can test my program.. thx

( 2014-08-20 18:41:26 -0500 )edit

I need these pictures! Where i can find them?

Canzoni 2017

( 2016-09-22 17:16:46 -0500 )edit

Sort by ยป oldest newest most voted

The problem with this particular scene is that almost all matched points lie on the same plane in 3d space. This is a known degenerate case for fundamental matrix estimation. Take a look these slides for explanation. I tried to increase 2nd nearest neighbor threshold in this code from 0.7 to 0.8:

for i,(m,n) in enumerate(matches):
if m.distance < 0.8*n.distance: # was 0.7
good.append(m)


and got the following result:

Note the corrctly matched out-of-plane background points.

In general fundamental matrix estimation is very sensitive to quality of matches and number of outliers, since opencv uses 8-point algorithm for model estimation. Try to work with higher resolution images with rich textures and non-planar scenes.

more

( 2014-07-03 03:03:54 -0500 )edit

how can you get m & n for matches ? are these key points ? I use c++ and there is no distance variable in keypoints, only in matches

( 2014-08-29 10:40:21 -0500 )edit

Official site

GitHub

Wiki

Documentation