Ask Your Question

Alexander Mordvintsev's profile - activity

2016-11-21 17:45:23 -0600 received badge  Good Answer (source)
2016-11-21 17:45:23 -0600 received badge  Enlightened (source)
2014-08-12 10:26:16 -0600 received badge  Nice Answer (source)
2013-08-18 13:07:06 -0600 received badge  Teacher (source)
2013-08-18 06:28:22 -0600 answered a question Epilines not correct

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: 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.