# Problems with python version of findEssentialMat()

**URL:** <https://forum.opencv.org/t/problems-with-python-version-of-findessentialmat/4841>\
**Category:** Python\
**Tags:** calib3d\
**Created:** [August 19, 2021, 1:46pm UTC](https://forum.opencv.org/t/problems-with-python-version-of-findessentialmat/4841 "2021-08-19T13:46:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![b\_stan](https://avatars.discourse-cdn.com/v4/letter/b/898d66/32.png) [@b\_stan](https://forum.opencv.org/u/b_stan)\
**Post date:** [August 19, 2021, 1:46pm UTC](https://forum.opencv.org/t/problems-with-python-version-of-findessentialmat/4841/1 "2021-08-19T13:46:17Z")

</div>

I have a question regarding the function findEssentialMat(). Since I have 2 different intrinsic matrices, I would like to transform the points in normalized image coordinates first and the pass the Identity as a cameraMatrix to the function findEssentialMat(), like I did it in version2. The first implementation yields ok results, but I would like to use the second variant to improve quality. Can somebody please help me find the issue? I furthermore tried with undistortPoints() which yielded the same results as my own implementation.

Help would be really appreciated!

```auto
# Version1
essential_matrix, essential_mask = cv2.findEssentialMat(
    np.array(point_correspondences[0]), np.array(point_correspondences[1]), cameraMatrix=camera_matrices[0],
    method=self._essential_method, prob=0.999, threshold=1. 
)

# Version 2
# get normalize image coords
points1 = np.linalg.inv(camera_matrices[0]) @ np.concatenate((np.array(point_correspondences[0]).T, np.ones((1, len(point_correspondences[0])))), axis=0)
points1 = points1.T[:, :2]
points2 = np.linalg.inv(camera_matrices[1]) @ np.concatenate((np.array(point_correspondences[1]).T, np.ones((1, len(point_correspondences[1])))), axis=0)
points2 = points2.T[:, :2]

essential_matrix, essential_mask = cv2.findEssentialMat(
    points1, points2, cameraMatrix=np.eye(3), method=cv2.RANSAC, prob=0.999, threshold=1.
)

```
