Ask Your Question

Epilines not correct

asked 2013-08-03 07:54:59 -0500

Abid Rahman K gravatar image

updated 2013-08-04 06:03:02 -0500


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

image description

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 :


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

image description

Why does it happen like this?

edit retag flag offensive close merge delete



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

Abid Rahman K gravatar imageAbid Rahman K ( 2013-08-03 07:56:31 -0500 )edit

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

3gfisch gravatar image3gfisch ( 2014-08-20 18:41:26 -0500 )edit

I need these pictures! Where i can find them?

Canzoni 2017

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

1 answer

Sort by ยป oldest newest most voted

answered 2013-08-18 06:28:22 -0500

Alexander Mordvintsev gravatar image

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

and got the following result: epilines

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.

edit flag offensive delete link more


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

curtis newton gravatar imagecurtis newton ( 2014-08-29 10:40:21 -0500 )edit

Question Tools



Asked: 2013-08-03 07:54:59 -0500

Seen: 11,484 times

Last updated: Aug 18 '13