Cv2.findHomography output in OpenCV (Python)

I am using OpenCV findHomography (with RANSAC) in Python to find a conversion between two sets of points.

Looking at the documentation , the output is a mask and transformation matrix.

It is not clear in the documentation what the mask is and how the matrix is ​​structured.

Is the 1 in the output mask the point that matches the transformation found or the point that was ignored? And could you explain the composition of the 3x3 transformation matrix?

Thanks in advance and sorry if I missed some documentation that explains this.

+3


source to share


1 answer


What do you need to do with the mask? Since this field is not required, so you don't need to mask.

As for the resulting matrix. It is called a matrix homography

or H

and represents the transformation of one point in the image plane to the same point in another image plane.

 X1 = H * X2

      



A point X1

is the same point ( X2

) in a different plane.

So the matrix H is basically a description of how one point in, say, image 1 matches 1 point in image2.

+2


source







All Articles