"Computer Vision 3D Reconstruction" Note 5 - Binocular Vision

Notes for the course "3D Reconstruction of Computer Vision (Sfm and SLAM Core Algorithms)" taught by Beiyou teacher Lu Peng

5. Binocular vision

5.1, Parallel view

insert image description here

引理1 [ a × ] B = B T [ ( B − 1 a ) × ] [a_\times]B=B^T[(B^{-1}a)_\times] [a×]B=BT[(B1a)×]
Lemma 2:e ′ = K ′ T e'=K'Te=KT

Proof:
e ′ e'e' isO 1 O_1O1In camera O 2 O_2O2According to the
camera model: e ′ = K ′ [ R , T ] [ 0 0 0 1 ] = K ′ T e'=K'[R,T]\left[ \begin{array}{c}0\ \0 \\0 \\1 \end{array}\right]=K'Te=K[R,T]0001=KT

Theorem : The fundamental matrix can be written as: F = K ′ − T [ T × ] RK − 1 = [ e × ′ ] K ′ RK − 1 F=K'^{-T}[T_\times] RK^{- 1}=[e'_\times]K'RK^{-1}F=KT[T×]RK1=[e×]KRK1

Proof:
According to Lemma 1,2, [ e × ′ ] K ′ = K ′ T [ ( K ′ − 1 e ′ ) × ] = K ′ T [ ( K ′ − 1 K ′ T ) × ] = K ′ T [ T × ] [e'_\times]K'=K'^T[(K'^{-1}e')_\times]=K'^T[(K'^{-1}K 'T)_\times]=K'^T[T_\times][e×]K=KT[(K1 e)×]=KT[(K1 KT)×]=KT[T×]
∴ [ e × ′ ] K ′ R K − 1 = K ′ T [ T × ] R K − 1 = F \therefore [e'_\times]K'RK^{-1}=K'^T[T_\times]RK^{-1}=F [e×]KRK1=KT[T×]RK1=F

Corollary 1 : Fundamental matrix for parallel views: F = [ e × ′ ] = [ 0 0 0 0 0 − 1 0 1 0 ] F=[e'_\times]=\left[ \begin{array}{c} 0&0&0 \\ 0&0&-1 \\ 0&1&0 \end{array}\right]F=[e×]=000001010

Proof:
In parallel view: K = K ′ , R = I , T = ( T , 0 , 0 ) TK=K',R=I,T=(T,0,0)^TK=K,R=I,T=(T,0,0)Bring T
into the camera model to get:e ′ = ( 1 , 0 , 0 ) T e'=(1,0,0)^Te=(1,0,0)T , that is, the pole is at infinity and the epipolar line is parallel to the X-axis.
Bring it into the theorem:F = [ e × ′ ] KIK − 1 = [ e × ′ ] F=[e'_\times]KIK^{- 1}=[e'_\times]F=[e×]KIK1=[e×]

Deduction 2 : In the parallel view, the image point p = ( pu , pv , 1 ) T , p ′ = ( pu ′ , pv ′ , 1 ) T p=(p_u,p_v,1)^T, p'=(p' _u,p'_v,1)^Tp=(pu,pv,1)Tp=(pu,pv,1)T , thenpv = pv ′ p_v=p'_vpv=pv

Proof:
Bring in p TF p ′ = 0 p^TFp'=0pTFp=0 , we can getpv = pv ′ p_v=p'_vpv=pv

Triangulation problem:

Known p , p ′ , K , K ′ , R , T p,p',K,K',R,Tp,p,K,K,R,T , findPPThe three-dimensional coordinates of P.

Triangulation of parallel views : pu − pu ′ = f B z p_u-p'_u=\frac{fB}{z}pupu=zfB
insert image description here
A depth map can be obtained. Application: 3D Movies
Question :

  1. How to ensure parallel views
  2. How to establish point correspondence

5.2, image correction

For problem 1, image correction can be used to transform the two images into parallel views
. Image correction in 5 steps:

  1. Enclosure pi ↔ pi ′ p_i\leftrightarrow p'_ipipi, more than 8 pairs
  2. Find the fundamental matrix FFF , seeking pointsei , ei ′ e_i,e'_iei,ei

Find FF by 8-point methodF , get epipolar lineli = FT pi ′ l_i=F^Tp'_ili=FTpi, solve the system of equations { li T e = 0 l_i^Te=0 liTe=0 } get poleeee , similarly, e ′ e'can be obtainede

  1. Transformation H ′ = T − 1 GRT H'=T^{-1}GRTH=T1 GRT, pute ′ e'e maps to infinity( f , 0 , 0 ) (f,0,0)(f,0,0)

T = [ 1 0 − w i d t h / 2 0 1 − h e i g t h / 2 0 0 1 ] , w i d t h 、 h e i g h t T=\left[\begin{array}{c}1&0& -width/2\\ 0&1&-heigth/2\\ 0&0&1 \end{array}\right],width、height T=100010width/2heigth/21,w i d t h , he i g h t are the width and height of the image
afterTTe ′ e'after T changee coordinates are marked as( e 1 ′ , e 2 ′ , 1 ) (e'_1,e'_2,1)(e1,e2,1 )
R = [ α e 1 ′ e 1 ′ 2 + e 2 ′ 2 α e 2 ′ e 1 ′ 2 + e 2 ′ 2 0 − α e 2 ′ e 1 ′ 2 + e 2 ′ 2 α e 1 ′ e 1 ′ 2 + e 2 ′ 2 0 0 0 1 ] R=\left[\begin{array}{c} \alpha\frac{e'_1}{\sqrt{e_1'^2+e_2'^2} }& \alpha\frac{e'_2}{\sqrt{e_1'^2+e_2'^2}}& 0\\ -\alpha\frac{e'_2}{\sqrt{e_1'^2+e_2 '^2}}& \alpha\frac{e'_1}{\sqrt{e_1'^2+e_2'^2}}& 0\\ 0&0&1 \end{array}\right]R=ae12+e22 e1ae12+e22 e20ae12+e22 e2ae12+e22 e10001
where α = sign ( e 1 ′ ) \alpha=sign(e'_1)a=sign(e1) , afterRRR changede ′ e'e The coordinates are:( f , 0 , 1 ) (f,0,1)(f,0,1)
G = [ 1 0 0 0 1 0 − 1 f 0 1 ] G=\left[\begin{array}{c} 1&0&0\\ 0&1&0\\ -\frac{1}{f}&0&1\\ \end{array}\right] G=10f1010001
through GGG changede ′ e'e The coordinates are:( f , 0 , 0 ) (f,0,0)(f,0,0)

  1. Solve for HHH min ⁡ ∑ i d ( H p i , H ′ p i ′ ) \min\sum_{i}d(Hp_i,H'p'_i) minid(Hpi,Hpi)
  2. with H , H ′ H,H'H,H' Transform the image to a parallel view
    insert image description here

3. Corresponding point search

After image rectification, parallel views are obtained, and matching points are found on the scanning line;
correlation matching/normalized correlation matching, the effect is average, and existing problems: occlusion, perspective shortening, baseline selection, homogeneous area, repeated pattern Constraints
:

  • uniqueness
  • monotonicity
  • smoothness

Guess you like

Origin blog.csdn.net/dragonchow123/article/details/125466624