-
[3] Projective Transformation(Homography)Multiple View Geometry 2021. 4. 2. 08:24
본 포스트는 학습한 것을 정리할 목적으로 작성되었습니다.
해당 포스트의 내용 및 그림, 수식 등은 'Multiple View Geometry in Computer Vision' 책을 참고하였습니다.
(1) Definition of projective transformation
Projective transform은 $\mathbb{P}^2$에서 $\mathbb{P}^2$로의 invertible mapping $h$이며 다른 용어로 homography라고도 한다. 이 transform은 몇 가지 종류로 나누어 지고 각 종류마다 변환 이후 보존되는 값들이 존재하며 이는 다음의 표와 같이 정리된다.
(2) Calculation
Projective transform은 $3 \times 3$ 행렬로 scale factor를 제외한 나머지 변수에 의해 정의되므로 degree of freedom이 8이다. 이는 두 이미지 간의 projective transform을 구할 때 4개의 점으로 transform을 정의할 수 있음을 의미한다.
예를 들어, 위 그림과 같이 왼쪽 그림에서 perspective distortion의 제거를 위해 오른쪽 그림과 같이 변환하고자 할 때 즉, $\textbf{x}' = H \textbf{x}$의 $H$를 알고자 할 때 그림에서와 같이 4개의 점 pair의 좌표를 알면 된다. 이는 다음과 같이 각 점들의 pair에서 2개의 방정식을 유도할 수 있기 때문이다.
$$ \begin{equation} \textbf{x} = \begin{bmatrix} x_1 & x_2 & x_3 \end{bmatrix}^T \end{equation} $$
$$ \begin{equation} \textbf{x}' = \begin{bmatrix} x_1' & x_2' & x_3' \end{bmatrix}^T \end{equation} $$
$$ x' = \frac{x_1'}{x_3'} = \frac{h_{11}x+h_{12}y+h_{13}}{h_{31}x+h_{32}y+h_{33}} $$
$$ y' = \frac{x_2'}{x_3'} = \frac{h_{21}x+h_{22}y+h_{23}}{h_{31}x+h_{32}y+h_{33}} $$
(3) Transform of line and conic
점 $\textbf{x}$가 $H$에 의해 $\textbf{x}'$로 transform될 떄, 이 점을 지나는 직선 $\textbf{l}$과 conic $C$는 다음과 같이 변환된다.
$$ \textbf{l}' = H^{-T}\textbf{l} $$
$$ C' = H^{-T}CH^{-1} $$
'Multiple View Geometry' 카테고리의 다른 글
[6] Absolute Conic (0) 2021.04.04 [5] Circular Point and Similarity (0) 2021.04.04 [4] Line at Infinity and Affine Rectification (0) 2021.04.02 [2] Duality and Conic (0) 2021.04.01 [1] 2D Projective Plane (0) 2021.03.31