OpenCV(Python)中cv2.findHomography的输出 [英] Output of cv2.findHomography in OpenCV (Python)

查看:2111
本文介绍了OpenCV(Python)中cv2.findHomography的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Python中使用OpenCV的findHomography函数(带有RANSAC)来查找两组点之间的转换.

I'm using OpenCV's findHomography function (with RANSAC) in Python to find the transformation between two sets of points.

查看文档,输出是一个掩码和一个变换矩阵.

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

文档尚不清楚掩码代表什么以及矩阵的结构.

The documentation is not clear about what the mask represents, and how the matrix is structured.

输出掩码中的1是适合找到的变换的点还是被忽略的点? 您能解释一下3x3输出转换矩阵的构成吗?

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

在此先感谢您,如果我错过了一些解释此问题的文档,则对不起.

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

推荐答案

那么您需要使用口罩做什么?因为不需要该字段,所以您不必戴任何面具.

Well what do you need to do with the mask? Because that field is not needed so you don't have to put any mask.

至于所得矩阵.它称为homography矩阵或H矩阵,它表示一个图像平面中的一个点到另一个图像平面中的同一点的转换.

As for the resulting matrix. It is called a homography matrix, or H matrix and it represents the transformation of one point in an image plane to the same point in another image plane.

 X1 = H * X2

X1是不同平面中的同一点(X2).

The point X1 is the same point (X2) in a different plane.

因此,H矩阵基本上是图像1点与图像2中1点匹配的描述.

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

这篇关于OpenCV(Python)中cv2.findHomography的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆