How to do it...

The fundamental matrix of an image pair can be estimated by solving a set of equations that involve a certain number of known matched points between the two images. The minimum number of such matches is seven, as described in the following steps:

  1. In order to illustrate the fundamental matrix estimation process and using the image pair from Chapter 9, Describing and Matching Interest Points, we selected seven good matches from the matching results of SIFT features, as presented in Chapter 9, Describing and Matching Interest Points.

These matches will be used to compute the fundamental matrix using the cv::findFundamentalMat OpenCV function. The image pair with its selected matches are shown in the following screenshot:

Get OpenCV 4 Computer Vision Application Programming Cookbook - Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.