직선의 vector representation:
- 직선의 시작점 $\mathbf{P}_0$ 에서 방향벡터 $\mathbf{D}$ 로 직선 뻗어나가는 모습을 나타냄.
- 직선 위의 임의의 점은 $\mathbf{P}(t) = \mathbf{P}_0 + t\mathbf{D}$ 임.
homogeneous coordinates로 표시됨:
2024.06.16 - [.../Math] - [Math] Homogeneous Coordinate and Projective Geometry
[Math] Homogeneous Coordinate and Projective Geometry
Homogeneous Coordinates (동차 좌표)와 Projective Geometry (사영 기하학):1. 개요:1-1. Homogeneous Coordinates의 정의와 특성:Homogeneous Coordinates (동차 좌표)는 Euclidean Coordinates (유클리드 좌표) 시스템을 확장하여 Pr
dsaint31.tistory.com
직선은 ideal point at infinity (무한점)으로의 converge
다음은 직선 상의 점 $\mathbf{P}(t)$를 homogeneous coordinates 로 나타냄:
$$\mathbf{P}(t) = \begin{bmatrix} P_X + tD_X \ P_Y + tD_Y \ P_Z + tD_Z \ 1 \end{bmatrix}^\top$$
이를 $t$로 나눈 형태로 바꾸면 다음과 같음:
$$\mathbf{P}(t) \equiv \begin{bmatrix} \frac{P_X}{t} + D_X \ \frac{P_Y}{t} + D_Y \ \frac{P_Z}{t} + D_Z \ \frac{1}{t} \end{bmatrix}^\top$$
여기서 $t \to \infty$ 로 처리하면, 각 항의 $P/t$들은 모두 0 으로 수렴.
$$\boxed{\mathbf{P}_\infty \equiv \begin{bmatrix} D_X \ D_Y \ D_Z \ 0 \end{bmatrix}^\top}$$
바로 위의 $\mathbf{P}_\infty$가 직선의 orientation이 결정하는 ideal point at infty (무한점)임.
Vanishing Point는 Ideal Point의 Image Plane에 투영된 것
Vanising Point $\textbf{v}$는 이 $\mathbf{P}_\infty$ 를 이미지 평면에 투영한 결과임.
즉, Projection Matrix (투영행렬) $\text{Proj}$ 적용
카메라 투영행렬은 다음과 같음:
$$\text{Proj}=K[R|\mathbf{T}]$$
여기서,
- $\mathbf{P}_\infty$는 마지막 좌표가 0이므로
- translation(병진) $\mathbf{T}$의 영향을 받지 않음
때문에 다음이 성립함.
$$\mathbf{v} \sim KR\mathbf{D}$$
위의 식이 image plane 상의 소실점 $\mathbf{v}$임.
카메라좌표계와 월드좌표계가 일치할 경우
$R =I$ 로, 즉 월드 좌표계와 카메라 좌표계의 축이 perfectly aligned 되어 있는 상황임.
앞서의 일반식은 다음과 같음
$$\boxed{\mathbf{v} \sim KR \mathbf{D}}$$
여기서 $R=I$라고 하면 다음과 같이 단순화됨.
$$\mathbf{v} \sim K \mathbf{D}$$
* 방향벡터 $\mathbf{D} = [D_X, D_Y, D_Z]^\top$는 이미 카메라 좌표계와 같은 축을 사용한다고 가정 (별도의 회전이 필요 없음)
* 즉, ideal point at infinity는 intrinsic matrix $K$로만 변환.
다음 글에서 intrinsic matrix와 extrinsic matrix로 perspective projection이 이루어지는 방식을 참고할 것:
2024.06.22 - [Programming/DIP] - [CV] Geometric Camera Model and Camera Calibration: Pinhole Camera
[CV] Geometric Camera Model and Camera Calibration: Pinhole Camera
Geometric Camera Model (or Camera Model)은 real world 의 scene 과 camera의 pose (= orientation + location) 에 따라,real world 의 scene 과 camera의 image 간의 기하학적 관계(geometrical relation)를approximation 함.참고: 2D image를 3D s
dsaint31.tistory.com
Homogeneous Coordinates로 계산
intrinsic matrix $K$는 다음과 같음:
$$K = \begin{bmatrix}
f_x & s & c_x \\
0 & f_y & c_y \\
0 & 0 & 1
\end{bmatrix}$$
- 보통 skewed 왜곡이 없으면 $s=0$
- isotropic sensor 인 경우 $f_x=f_y=f$
- $c_x,c_y$는 principal point: 실제 image sensor plane에 optical axis가 교차하는 점.
- 이상적인 경우엔 optical point와 일치하나 lens의 오차 등으로 어긋날 수 있음.
즉, ideal point 의 projection 은 다음이 됨:
$$\mathbf{v} = K \mathbf{D} = \begin{bmatrix}
f_x D_X + s D_Y + c_x D_Z \\
f_y D_Y + c_y D_Z \\
D_Z
\end{bmatrix}$$
2D 이미지 좌표로 정규화
최종적으로 이미지 평면상의 vanishing point의 좌표는 다음과 같이 homogeneous coordinates로 정규화:
$$\boxed{
(v_x, v_y) = \left(\frac{f_x D_X + s D_Y + c_x D_Z}{D_Z},; \frac{f_y D_Y + c_y D_Z}{D_Z}\right),
}$$
같이보면 좋은 자료들
2024.06.29 - [Programming/DIP] - [CV] Coordinate Systems
[CV] Coordinate Systems
이 글은 Computer Vision에서의 Coordinate Systems 을 다룬다.종류 및 정의World Coordinates (월드 좌표계):$\begin{bmatrix}x_w& y_w & z_w & 1\end{bmatrix}^\top$카메라 외부에 존재하는 객체(object)의 위치를 전역적인 좌표
dsaint31.tistory.com
2024.06.16 - [.../Math] - [Math] Homogeneous Coordinate and Projective Geometry
[Math] Homogeneous Coordinate and Projective Geometry
Homogeneous Coordinates (동차 좌표)와 Projective Geometry (사영 기하학):1. 개요:1-1. Homogeneous Coordinates의 정의와 특성:Homogeneous Coordinates (동차 좌표)는 Euclidean Coordinates (유클리드 좌표) 시스템을 확장하여 Pr
dsaint31.tistory.com
2024.07.06 - [Programming/DIP] - [CV] Perspective Projection (원근 투영법): Camera to Image
[CV] Perspective Projection (원근 투영법): Camera to Image
Perspective Projection 3D 물체를 2D 평면에 투영하는 방법 중 하나를 의미함. 이는 컴퓨터 그래픽스, 디자인, 건축 등에서 주로 사용됨.기술적 정의:Perspective Projection은 원근법을 적용하여 3D 공간에 있
dsaint31.tistory.com
'Programming > DIP' 카테고리의 다른 글
Image Synthesis (1) | 2025.07.04 |
---|---|
[DIP] Discrete Wavelet Transform: Wavelet Decomposition (0) | 2025.06.30 |
[DIP] Wavelet Transform: PyWavelet (0) | 2025.06.29 |
Raster Graphics vs. Vector Graphics (0) | 2025.06.28 |
[DIP] Digital Image 란? (0) | 2025.06.28 |