单应矩阵中的元素是什么意思? [英] What do the elements in a homography matrix mean?

查看:397
本文介绍了单应矩阵中的元素是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是图像处理的新手,但是我正在使用EMGU进行C#图像分析.但是,我知道单应性矩阵并不是EMGU独有的,因此也许知道另一种语言的人可以更好地进行解释.

I'm new to image processing, but I'm using EMGU for C# image analysis. However, I know the homography matrix isn't unique to EMGU, and so perhaps someone with knowledge of another language can explain better.

请(尽可能简化)有人可以解释每个元素的作用.我已经在网上查找了此信息,但找不到我可以正确理解的答案(正如我所说,我对这一切还是有点陌生​​!)

Please (in as simplified as can be) can someone explain what each element does. I've looked this up online but can't find an answer that I can properly understand (as I said, I'm kinda new to all this!)

我分析2个二维图像.因此,需要一个3x3的矩阵来说明图像的旋转/平移.如果未检测到运动,则单应性矩阵为: 100, 010, 001

I analyse 2 images, both 2 dimensional. Therefore a 3x3 matrix is needed to account for the rotation / translation of the image. If no movement is detected, the homography matrix is: 100, 010, 001

我从研究中知道(例如, OpenCV同源技术,转换一点,这段代码在做什么?)表示: 10Tx, 01Ty, XXX

I know from research (eg OpenCV Homography, Transform a point, what is this code doing?) that: 10Tx, 01Ty, XXX

10,01位是x和y坐标的旋转. Tx和Ty位是平移运动,但是XXX位是什么?这是我不明白的吗?与仿射变换有关吗?请有人可以解释一下: 1.如果我目前对我所说的话是正确的. 2. XXX位是什么意思

The 10,01 bit is the rotation of the x and y coordinates. The Tx and Ty bits are the translational movement, but what is the XXX bit? This is what I don't understand? Is it something to do with affine transformations? Please can someone explain: 1. If I'm currently right in what I say above. 2. what the XXX bit means

推荐答案

掌握矩阵乘法并不难理解.假设您指出x

It's not that difficult to understand if you have a grasp of matrix multiplication. Assume you point x is

/a\
\b/,

,您想将坐标系旋转A:

/3 4\
\5 6/

,然后通过t

/2\
\2/.

后面的矩阵是仿射变换的组成部分,用于获得新点y:

The latter matrices are the components of the affine transformation to get the new point y:

y = A*x + t = <a'; b'>T //(T means transposed).

如您所知,可以构建一个3d矩阵B和一个向量x',如下所示:

As you know, to get that, one can construct a 3d matrix B and a vector x' looking like

    /3 4 2\         /a\
B = |5 6 2| ,  x' = |b|
    \0 0 1/         \1/

如此

     /a'\
y' = |b'| = B*x'
     \ 1/ 

,您可以从中提取y.让我们看看它是如何工作的.在原始转换中(使用加法),第一步是执行乘法,即.旋转部分y_r:

from which you can extract y. Let's see how that works. In the original transformation (using addition), the first step would be to carry out the multiplication, ie. the rotating part y_r:

y_r = A*x = <3a+4b; 5a+6b>T

然后添加绝对"部分:

y = y_r + t = <3a+4b+2; 5a+6b+2>T

现在看看B的工作方式.我将逐行计算y':

Now look at how B works. I'll calculate y' row by row:

1) a' = 3*a + 4*b + 2*1

2) b' = 5*a + 6*b + 2*1

3) the rest: 0*a + 0*b + 1*1 = 1

正是我们所期望的.首先,要计算旋转部分-加法和乘法.然后,将平移部分的x部分相加并乘以1,它保持不变.第二行也一样.

Just what we expected. First, the rotation part gets calculated--addition and multiplication. Then, the x-part of the translational part gets added, multiplied by 1--it stays the same. The same thing for the second row.

在第三行中,删除ab(乘以0).最后一部分保持不变,恰好是1.因此,关于最后一行的所有操作都是删除"该点的值并保留1.

In the third row, a and b are dropped (multiplied by 0). The last part is kept the same, and happens to be 1. So, all about that last line is to "drop" the values of the point and keep the 1.

那么,可以说2x3的矩阵就足够了.这是部分正确的做法,但有一个重大缺点:您失去了可组合性.假设您对B基本满意,但想镜像一个坐标.然后,您可以选择另一个变换矩阵

It could be argued, then, that a 2x3 matrix would be enough for that. That's partially true, but has one significant disadvantage: you loose composability. Suppose you are basically satisfied with B, but want to mirror one coordinate. Then you can choose another transformation matrix

    /-1 0 0\
C = | 0 1 0|
    \ 0 0 1/

得出结果

y'' = C*B*x' = <-3a+4b+2; 5a+6b+2; 1>T

仅由于矩阵乘法的特性,使用2x3矩阵无法轻松完成这种简单乘法.

This simple multiplication could not be done that easily with 2x3 matrices, simply because of the properties of matrix multiplication.

原则上,在上面,最后一行(XXX)也可以是其他任何形式的<0;0;x>.在那里只是删除点值.但是,通过乘法运算进行合成是完全必要的.

In principle, in the above, the last row (the XXX) could also be anything else of the form <0;0;x>. It was there just to drop the point values. It is however necessary exactly like this to make composition by multiplication work.

最后,在这种情况下,维基百科对我来说似乎很有帮助.

Finally, wikipedia seems quite informative to me in this case.

这篇关于单应矩阵中的元素是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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