Processing math: 8%

ABOUT ME

학습한 것을 정리하는 공간입니다. csw3575@snu.ac.kr

Today
Yesterday
Total
  • [19] Epipolar Geometry and the Fundamental Matrix
    Multiple View Geometry 2021. 6. 8. 17:30

    본 포스트는 학습한 것을 정리할 목적으로 작성되었습니다.

     

    해당 포스트의 내용 및 그림, 수식 등은 'Multiple View Geometry in Computer Vision' 책을 참고하였습니다. 

     

    (1) Epipolar geometry

     

    3D 공간상의 한 점 X가 서로 다른 위치에 있는 두 카메라 C,C의 이미지 평면(image plane)에 투영(projection)될 때 X,C,C은 epipolar plane \boldsymbol{\pi}를 형성한다.

     

    그림1. Epipolar geomery

    이 때 그림 1의 (b)에서와 같이 카메라 \textbf{C}, \textbf{C}'을 연결한 직선을 base line이라고 하며 각 카메라의 이미지 평면과 base line의 교점을 epipole 이라고 한다.

     

    (2) Fundamental matrix

     

    Epipolar geometry로 부터 두 카메라 이미지의 대응점 쌍 사이의 transform인 fundamental matrix F를 구할 수 있다. Fundamental matrix를 구하는 방법은 geometric derivation과 algebraic derivation의 두 가지 방법이 있다.

     

    (2-1) Geometric devirvation of fundamental matrix

    그림 2. x에서 x'으로의 mapping H

    그림 2에서와 같이 두 카메라 중심을 지나지 않는 어떤 평면 \boldsymbol{\pi}가 존재할 때 \textbf{C}'의 이미지 상의 점 \textbf{x}'와 그 대응점 \textbf{x}사이에는 homography H_{\pi}가 존재하고 따라서 다음이 성립한다. 

    \textbf{l}'=\textbf{e}\times \textbf{x}' = [\textbf{e}']_\times \textbf{x}'

    \textbf{x}'  = H_{\pi} \textbf{x}

    \textbf{l}'=[\textbf{e}']_\times H_{\pi} \textbf{x} = F\textbf{x}

    F =[\textbf{e}']_\times H_{\pi}

     

    이 때 [\textbf{e}']_\timesH_{\pi}가 각각 rank 2와 3 이므로 F는 rank 2 matrix이다.

     

    (2-2) Algebraic derivation of fundamental matrix

     

    Algebraic derivation에서는 평면에 대한 가정이 필요하지 않다. \textbf{x}의 back-projection을 ray \textbf{X}(\lambda)=P^+\textbf{x}+\lambda C 라고 할 때 다음이 성립한다.

     

    \textbf{l}' = (P'C)\times(P'P^+\textbf{x})

     

    이는 카메라 중심 CP'에 의한 epipole \textbf{e}'이기 때문이다.

     

    따라서 \textbf{l}' = [\textbf{e}']_\times (P'P^+\textbf{x}) 이고 F=[\textbf{e}']_\times P' P^+이다.

     

    (3) Example of algebric derivation of fundamental matrix

     

    첫 번째 카메라의 중심을 world coordinate의 중심과 같다고 가정하고 두 카메라 간의 변환이 R\textbf{t}로 표현된다고 가정하면 다음이 성립한다.

     

    P=K[I|\textbf{0}] \ \ P'=K'[R|\textbf{t}]

    P^+ = \begin{bmatrix} K^{-1} \\ \textbf{0}^T \end{bmatrix} \ \ C=\begin{bmatrix} \textbf{0} \\ 1 \end{bmatrix}

    F=[P'C]_\times P'P^+

    F=[K' \textbf{t}]_\times K'RK^{-1} = K'^{-T}[\textbf{t}]_\times R K^{-1} = K'^{-T} R[R^T \textbf{t}]_\times K^{-1} = K'^{-T} R K^T [KR^T \textbf{t}]_\times

     

    이 때 epipole은 다른 카메라 중심의 이미지 이므로 다음과 같이 정의된다.

    \textbf{e} = P \begin{bmatrix} R^T \textbf{t} \\ 1 \end{bmatrix} = KR^T \textbf{t}

    \textbf{e}' = P' \begin{bmatrix} \textbf{0} \\ 1 \end{bmatrix} = K' \textbf{t}

     

    따라서 아래과 같이 fundamental matrix를 표현할 수 있다.

    F = [\textbf{e}']_\times K' R K^{-1} = K'^{-T}[\textbf{t}]_\times R K^{-1} = K'^{-T} R [R^T \textbf{t}]_\times K^{-1} = K'^{-T}RK^T[\textbf{e}]_\times

     

    댓글

Designed by Tistory.