1 | initial version |

five-point.cpp is the file that provides functions to calculate the Essential matrix (a special case of the Fundamental matrix) using the five point algorithm. The findEssentialMat function is similar to findFundamentalMat, the difference is that you require the intrinsic parameters of your camera (calculated from calibration). You need to provide the following:

- p1: points of the image 1 (vector<point2f> or Mat)
- p2: points of the image 2 (vector<point2f> or Mat)
- focal: focal distance (double), it is the element (0,0) of your intrinsic parameters matrix.
- pp: principal point (Point2d), this vector must have the elements (0,2) and (1,2) of the intrinsic parameters matrix.
- method: in this case it could be RANSAC or LMeDS (similar to findFundamentalMat)
- probability of success: usually 0.99
- error: this value is the threshold used in RANSAC to determine if a match is considered an outlier or an inlier
- output: a matrix that contains ones and zeros, indicates which correspondences are outliers using a zero and inliers using a one.

Example:

```
Mat essential = findEssentialMat(p1,p2,focal,pp,RANSAC,0.99,1,output);
```

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.