카메라 projection

2023. 2. 22. 19:05Devcorse/Visual SLAM(02.20~3.31)

Camera

Light control

- Hardware-level pre-processing: Exposure, aperture

- Electronic post-processing: ISO gain, normalization 

 

Focal point

- Lens

 

Camera projection

X=3D world coordinate points, P=Projection matrix, x=2D image coordinate points 일때

x = PX

 

projection steps

world coordinate system(3D) -> camera coordinate system(3D) -> image coordinate system(2D)

 

world coordinage system(3D) -> camera coordinate system(3D)

Rigid body motion

- Rotation -3x3 matrix(SO(3))

- Translation - 3x1 Vector

- Transformation - 4x4 Matrix(SE(3))

$X_{c} = TX_{w} = \begin{bmatrix} R & t \\ 0^{T} & 1 \\ \end{bmatrix} X_{w}$ 로 표현이 된다.

 

camera coordinate system(3D) -> image coordinate system(2D)

3D object와 camera coordinate system의 원점을 지나는 직선 혹은 벡터가 image plane을 지나는 점을 의미

실제 이미지는 핀홀 같이 위아래가 뒤집힌 것이 맞지만 CV에서는 변환하여 image plane에 상을 그림

수식화하면

$x_{im} = KX_{C} \begin{bmatrix} f_{x} & 0 & c_{x} \\ 0 & f_{y} & c_{y} \\ 0 & 0 & 1 \\ \end{bmatrix} \begin{bmatrix} X \\ Y \\ Z \\ \end{bmatrix}  = \begin{bmatrix} f_{x}X + c_{x}Z \\ f_{y}Y + c_{y}Z \\ Z \\ \end{bmatrix} = Z\begin{bmatrix} f_{x}X/Z + c_{x} \\ f_{y}Y/Z + c_{y} \\ 1 \\ \end{bmatrix}$ 이다.

K = Intrinsic matric이다.

 

world coordinate system(3D) -> camera coordinate system(3D) -> image coordinate system(2D)

두 수식을 정리하면

$x_{im} = KX_{C} = K\begin{bmatrix} R & t \\ 0^{T} & 1 \\ \end{bmatrix} X_{w}$ 이며 간단하게 표현하면

$x_{im} = KX_{C} = \begin{bmatrix} R|t\\ \end{bmatrix} X_{w}$ 이다.

Intrinsic matrix = K

Extrinsic matrix = [R\t] matrix이다.

 

수식을 보다 이해 쉽게 표현하면

$S \begin{bmatrix} u \\ v \\ 1 \end{bmatrix} =$ $\begin{bmatrix} f_{x} & 0 & c_{x} \\ 0 & f_{y} & c_{y} \\ 0 & 0 & 1 \\ \end{bmatrix}$  $\begin{bmatrix} r_{11} & r_{12} & r_{13} t_{1} \\ r_{21} & r_{22} & r_{23} t_{2} \\ r_{31} & r_{32} & r_{33} t_{3}  \end{bmatrix}$  $\begin{bmatrix} X \\ Y \\ Z \\ 1 \end{bmatrix}$

 

 

 

'Devcorse > Visual SLAM(02.20~3.31)' 카테고리의 다른 글

Feature detector  (0) 2023.02.23
카메라 센서 구조 및 좋은 카메라 고르기  (0) 2023.02.22
동차 좌표계  (0) 2023.02.22
3D rotation, translation  (0) 2023.02.22
선형대수  (0) 2023.02.21