基本矩阵的投影矩阵 [英] Projection matrix from Fundamental matrix
问题描述
我已经获得了两个相机之间的基本矩阵.我也将它们的内部参数放在我之前通过棋盘获得的 3 X 3
矩阵中.使用基本矩阵,我得到了 P1
和 P2
by
I have obtained fundamental matrix between two cameras. I also, have their internal parameters in a 3 X 3
matrix which I had obtained earlier through chess board. Using the fundamental matrix, I have obtained P1
and P2
by
<代码>P1 = [我 |0] 和 P2 = [ [e']x * F |e']
这些投影矩阵在获取准确的 3D 位置方面并没有真正的用处.因为,我有内部参数 K1
和 K2
,我将 P1
和 P2
更改为
These projection matrices are not really useful in getting the exact 3D location.
Since, I have the internal parameters K1
and K2
, I changed P1
and P2
as
<代码>P1 = K1 * [I |0] 和 P2 = K2 * [ [e']x * F |e']
- 这是获取真实投影矩阵的正确方法吗?它给出了 3D 世界和图像之间的实际关系?
- 如果没有,请帮助我了解正确的方法以及我哪里出错了.
- 如果这是正确的方法,我该如何验证这些矩阵?
推荐答案
Hartley 和 Zisserman 的《计算机视觉中的多视图几何》是一本很好的参考书.首先,您的 P 公式是错误的.如果你想要里面有K的公式,那就是
A good reference book is "Multiple View Geometry in Computer Vision" from Hartley and Zisserman. First, your formula for P is wrong. If you want the formula with K inside, it is rather
P = K * [R | t]
或
P = [ [e']x * F | e']
但不是两者兼而有之.
如果您通过 8 点算法计算 F,那么您只能将射影几何恢复到 3D 单应性(即 4x4 变换).
If you computed F from the 8 points algorithm, then you can recover only projective geometry up to a 3D homography (i.e. a 4x4 transformation).
要升级到欧几里得空间,有两种可能性,都从计算本质矩阵开始.
To upgrade to euclidian space, there are 2 possibilities, both starting by computing the essential matrix.
第一种可能性是从 F 计算基本矩阵:E = transpose(K2)*F*K1.
First possibility is to compute the essential matrix from F: E = transpose(K2)*F*K1.
第二种可能性,是直接估计这两个视图的本质矩阵:
Second possibility, is to estimate directly the essential matrix for these 2 views:
- 通过预乘每张图像的 K 倒数来标准化您的 2D 点(标准化图像坐标")
- 对这些归一化点应用(与 F 相同)8 点算法
- 通过 SVD 分解和强制对角值,强制基本矩阵的 2 个奇异值等于 1,最后一个为 0.
一旦你有了基本矩阵,我们就可以计算投影矩阵的形式
Once you have the essential matrix, we can compute the projection matrix in the form
P = K * [R | t]
由于 E 的 SVD 的元素,可以找到 R 和 t(参见前面提到的书).但是,您将有 4 种可能性.其中只有一个在两个摄像头前面投射点,因此您应该测试一个点(如果您确定的话)以消除 4 个之间的歧义.在这种情况下,您将能够在 3D 场景中放置相机及其方向(投影的 R 和 t).
R and t can be found thanks to the elements of the SVD of E (cf the previously mentioned book). However, you will have 4 possibilities. Only one of them projects points in front of both cameras, so you shall test a point (if you are sure of it) to remove the ambiguity among the 4. And in this case you will be able to place the camera and its orientation (with R and t of the projection) in your 3D scene.
确实不那么明显……
这篇关于基本矩阵的投影矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!