1. 程式人生 > >計算機視覺基礎5——本質矩陣與基本矩陣(Essential and Fundamental Matrices)

計算機視覺基礎5——本質矩陣與基本矩陣(Essential and Fundamental Matrices)

回顧本質矩陣的定義

image

 image

本質矩陣的基本性質:

image

結合成像的幾何關係

      image

Longuet-Higgins equation

image

注意大小寫的區別哦,大小表示物點向量,小與表示像點向量。

像平面上的一點可以看作:

• (u,v) 2D film point(侷限於像平面上來考慮)

• (u,v,f) 3D point on film plane(相機座標系中來考慮)

• k(u,v,f) viewing ray into the scene(透過像點和原點射線上點的像,相機座標系中來考慮)

• k(X, Y, Z) ray through point P in the scene(在世界座標系中來考慮)

ll為像平面上的一直線:au+bv+c=0au+bv+c=0

由點線結合關係可得:

image

因此有

image

這樣就可以用幾何的觀點來解釋上述方程:左像平面上的一點plpl乘以本質矩陣EE,結果為一條直線,該直線就是plpl的極線,且過plpl在右像平面上的對應點prpr。這個結論十分喜人。

同理有

image

• Remember: epipoles belong to the epipolar lines

image

• And they belong to all the epipolar lines

image

關於本質矩陣的關係總結如下:

image

本質矩陣採用的是相機的外部引數,也就是說採用相機座標(The essential matrix uses CAMERA coordinates),如果要分析數字影象,則要考慮座標(u,v),此時需要用到內部引數(To use image coordinates we must consider the INTRINSIC camera parameters)

image

從畫素級來考慮,有如下關係

image

short version: The same equation works in pixel coordinates too!

矩陣FF稱為基本矩陣:F=MTrRSM1lF=Mr−TRSMl−1

• has rank 2

• depends on the INTRINSIC and EXTRINSIC Parameters (f, etc ; R & T)

Analogous to essential matrix. The fundamental matrix also tells how pixels (points) in each image are related to epipolar lines in the other image.

例子:

image image

image image

image image

Fel=0F∗el=0,並根據下圖,where is the epipole? vector in the right nullspace of matrix FF,即FF的右零空間。當然elel是非零向量,也就是說Fel=0F∗el=0有非零解,說明矩陣FF不是滿秩的,或者說它是奇異的,However, due to noise,F may not be singular.So instead, next best thing is eigenvector associated with smallest eigenvalue of F。

image

>> [u,d] = eigs(F’ * F)
u =
-0.0013 0.2586 -0.9660
0.0029 -0.9660 -0.2586
1.0000 0.0032 -0.0005
d = 1.0e8*
-1.0000 0 0
0 -0.0000 0
0 0 -0.0000
eigenvector associated with smallest eigenvalue
>> uu = u(:,3)
uu = ( -0.9660 -0.2586 -0.0005)
>> uu / uu(3) : to get pixel coords
(1861.02 498.21 1.0)

where is the epipole?

image

image