How it works

We used the cv2.findFundamentalMat function to estimate the fundamental matrix from left-right image point correspondences. This function supports a few different algorithms for fundamental matrix parameters estimation, such as cv2.FM_7POINT (7-point algorithm), cv2.FM_8POINT (8-point algorithm), cv2.FM_LMEDS (least-median approach), and cv2.FM_RANSAC (RANSAC-based approach). Two optional parameters specify the error threshold for RANSAC-based estimation algorithms and confidence levels for the least-median and RANSAC-based approaches.

The following are the expected results:

Fundamental matrix: [[ 1.60938825e-08 -2.23906409e-06 -2.53850603e-04] [ 2.97226703e-06 -2.38236386e-07 -7.70276666e-02] [ -2.55190056e-04 7.69760820e-02 ...

Get OpenCV 3 Computer Vision with Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.