Goal : How a 3D point is Mapped to a 2D Pixel Coordinate
[3D => 2D Pixel mapping]
위의 식 matrix로 표현
Coordinate Systems
[Notation]
Transformation
Extrinsic & Intrinsic Parameters
- Extrinsic parameters 카메라가 3D 공간에서 어디에 위치하고, 어떤 방향을 보는지를 정의
- Intrinsic parameters 카메라 내부에서 이미지 평면의 위치를 픽셀 좌표로 변환하는 내부 보정 요소들
Extrinsic parameters
- 카메라의 위치(Position)와 방향(Orientation 또는 Heading)을 나타냄 => 즉, 카메라의 Pose = position + heading → 이것이 카메라가 3D 세계에서 어디에 있고, 어디를 보는지를 설명함 position: 위치(x,y,z) / heading: 방향(R-roll, pitch, yaw)
- Invertible transformation
# 6 parameter = 3 for the position + 3 for the heading
[Translation] camera 좌표계의 원점 / camera의 위치를 world coordinate기준으로 나타낸것[Rotation] camera 좌표계로 변환된 point[Transformation] Homogeneous Coordinates로 변환
- kH는 Extrinsic Transformation Matirx이며 DOF = 6
Q) 왜 Homogeneous Coordinates를 쓰는가?
A) 선형 변환으로 표현할 수 있기 때문에 행렬 곱으로 여러 변환(회전+이동+투영)을 하나의 행렬로 표현 가능
Intrinsic parameters
- 카메라 내부에서 일어나는 좌표계 변환 => 즉, 카메라 좌표계(c)→이미지 평면(s)→센서 좌표계(s)로 변환하는 과정 - Invertible transformations: image plane to sensor / model deviations - Not invertible: perspective projection
[Mapping as a 3 step process] 1. Perspective projection to the image plane : 3D 점을 카메라 좌표계 기준으로 중심 투영 (pinhole model) 2. Mapping to the sensor coordinate system : 실제 센서(pixel) 좌표로 변환하기 위한 calibration matrix 적용 3. Compensation for the fact that the two previous mappings are idealized : 현실 세계 카메라는 이상적이지 않다. 오차 보정 진행
Ideal(= Linear) Perspective Projection
[조건] 1. Distortion-free lens : 왜곡 없는 렌즈 2. All rays are straight lines and pass through the projection center : 모든 광선은 Projection center를 통과하며, 이 중심은 카메라 좌표계의 원점 3. Focal point and principal point lie on the optical axis : focal point와 principal point는 축 상에 일직선으로 위치 4. The distance to the image plane is constant c : Image plane은 항상 일정 거리 f(focal length)만큼 떨어져 있다.
- k: calibration matrix
Calibration Matrix(= Camera Matrix)
f: focla length
- 가장 단순한 카메라를 위한 내부 파라미터 행렬
다음과 같이 표현할 수 있다.
- P는 3x4 행렬이며, 3D world point => 2D image point 변환을 수행
Linear Errors : 보정 사항들
Conversion to pixel coordinate
- Sensor 원점은 principal point가 아니다. => 원점 이동
Skewness and Scale Difference
- Skew(Θ) : Sensor가 optical axis에 대해 완전히 수직하지 않을 경우 보정 - Scale Difference(k,l) : X,Y축의 pixel 간격 차이 보정
위 보정 사항들 통합 과정
Affine transformation
# 5 parameters - focal length (f) - principal point (Cx,Cy) - scale difference (k,l) - skewness (Θ)
Non-Linear Errors
- 기존의 Affine / Perspective Projection은 이상적인 경우에만 설명이 된다. - 실제 카메라는 렌즈의 왜곡 등으로 인해 비선형적인 위치 편차가 발생한다. => 마지막 단계에서 비선형 오차를 보정한다. => Location-dependent shift (픽셀마다 다른 보정을 적용)
위 과정 통합
General Calibration Matirx
Mapping as a Two step process
1. Projection of the affine camera
: 기존의 linear 카메라 모델에 의한 projection
2. Consideration of non-linear effects
: 각 pixel 위치 x에 따라 비선형 왜곡 보정 (일반적으로 radial, tangential distortion 보정)
=> Individual mapping for each point : 포인트마다 서로 다른 보정이 필요하다!
Summary
parameter 수 확인
Calibration Camera: 내부 파라미터 K가 알려져 있다.
Uncalibration Camera: 내부 파라미터 K를 모른다.
Camera Calibration: 이를 추정하는 과정
Summary of the Mapping
Estimating the Parameters of P
X와 x 주어져 있을 때 P를 구하겠다.
DLT(Direct Linear Transformation)
- 11개의 intrinsic and extrinsic parameter를 계산해야 한다.