Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The problem here is not only in those diagonal matches (incorrect obviously) but also in most of the matches, which are pretty bad. In order to see how bad the resulting homography is check the answer here and here. Note also these things:

  • your scene is pretty low on texture. You have many flat objects (planes!) with overall the same colour (LCD screen -> black, wall -> white-blueish, table -> brownish). Try adding some additional objects (a flower maybe? :)) and see how this affects the homography estimation
  • you've added a bag in the second image in the overlapping area, which omho might lead to some confusion
  • try ORB or some other feature detector
  • try BruteForce matcher (I rarely use the FLANN since BF usually does the trick); try different settings for the cross-check matching (BFMatcher's parameter). Using cross-check means that feature A from image 1 is matched with feature A' from image 2 and vice versa, which often reduces the number of false positives greatly
  • try another filter for your good matches (note that appyling multiple filters for example (cross-check + min/max distance) might reduce your matches so much that RANSAC fails to estimate a homography) such as the ratio test; there are also other match filters online