[CV] Intersection and Ideal Point; Homogeneous Coordinate and Cross Product

2024. 6. 16. 13:04·.../Math
728x90
728x90

Intersection and Ideal Point

이 글에서는
homogeneous coordinates(동차 좌표)와 cross product(교차곱)을 이용하여 두 직선의 교점을 찾는 방법을 다룸.

https://visionbook.mit.edu/homogeneous_coordinates.html?utm_source=perplexity


또한, 평행한 직선의 경우에 ideal point(이상점)이 나오는 경우도 다룸.


두 직선의 교점을 구하는 방법 - 단계별 설명:

1. Homogeneous Coordinates(동차 좌표):

주어진 두 직선을 동차 좌표 $\mathbf{l}_1 = \begin{bmatrix}a_1 & b_1 & c_1\end{bmatrix}^\top$와 $\mathbf{l}_2 = \begin{bmatrix} a_2& b_2 & c_2\end{bmatrix}^\top$로 표현함.


2. Cross Product Calculation(교차곱 계산):

두 직선의 cross product 계산하여 교점 $\mathbf{p} = \mathbf{l}_1 \times \mathbf{l}_2$을 구함.
이는 다음과 같이 계산됨:
$$\mathbf{p} = \mathbf{l}_1 \times \mathbf{l}_2 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
a_1 & b_1 & c_1 \\
a_2 & b_2 & c_2
\end{vmatrix}$$

 

계산 결과는 $\mathbf{p} = (b_1c_2 - b_2c_1)\mathbf{i}+ (c_1a_2 - c_2a_1)\mathbf{j} + (a_1b_2 - a_2b_1)\mathbf{k}$임.


3. Conversion to Cartesian Coordinates(데카르트 좌표계로 변환):

동차 좌표 $\mathbf{p} = (x_h, y_h, w_h)$를 데카르트 좌표계로 변환하여 교점을 얻음.
이는 다음과 같이 변환됨:
$$(x, y) = \left( \frac{x_h}{w_h}, \frac{y_h}{w_h} \right)$$


예제

주어진 두 직선의 동차 좌표가 다음과 같다고 가정함:

$$\mathbf{l}_1 = (1, -1, 2)^\top \\
\mathbf{l}_2 = (2, 1, -3)^\top$$

 

이제, 두 직선의 cross product(or vector product)을 계산함:

$$\mathbf{p} = \mathbf{l}_1 \times \mathbf{l}_2 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
1 & -1 & 2 \\
2 & 1 & -3
\end{vmatrix}$$

 

위의 determinant(행렬식)을 계산하면:

$$\mathbf{p} = ( (-1) \cdot (-3) - 2 \cdot 1) \mathbf{i}+ (2 \cdot 2 - (-3) \cdot 1)\mathbf{j}+ (1 \cdot 1 - (-1) \cdot 2 )\mathbf{k}$$

 

단순화하면:

$$\mathbf{p} = (3 - 2, 4 + 3, 1 + 2) \\
\mathbf{p} = (1, 7, 3)$$

 

이제, 동차 좌표 $\mathbf{p} = ( 1, 7, 3 )$를 데카르트 좌표계로 변환함:

$$(x, y) = \left( \frac{1}{3}, \frac{7}{3} \right)$$

 

따라서, 직선 $\mathbf{l}_1 = \begin{bmatrix}1& -1& 2\end{bmatrix}^\top과 \mathbf{l}_2 = \begin{bmatrix}2 & 1 & -3\end{bmatrix}^\top$의 교점은:

$$\left( \frac{1}{3}, \frac{7}{3} \right)$$

 

이 예제는 동차 좌표계에서 교차곱(cross product)을 사용하여 두 직선의 교점을 구하고 이를 데카르트 좌표계로 변환하는 방법을 보여줌.


평행한 경우 (Parallel Lines)의 교점 (사영기하학 ideal point)

두 직선이 평행한 경우에도 cross product 통해 교점을 구할 수 있음.

 

하지만 평행한 경우 교차곱의 결과가 ideal point(이상점)을 나타냄.

ideal pointg은 동차 좌표계에서 $(x_h, y_h, 0)$ 형태로 나타나며, 이는 직선이 교차하지 않는 경우를 의미함.

 

예를 들어, 두 평행한 직선 $\mathbf{l}_3 = (1, -1, 2)^\top$과 $\mathbf{l}_4 = (1, -1, -1)^\top$를 고려하면:

$$\mathbf{p} = \mathbf{l}_3 \times \mathbf{l}_4 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
1 & -1 & 2 \\
1 & -1 & -1
\end{vmatrix}$$

 

계산하면:

$$\mathbf{p} = ( (-1) \cdot (-1) - 2 \cdot (-1))\mathbf{i}+ (2 \cdot 1 - (-1) \cdot 1)\mathbf{j}+ (1 \cdot (-1) - (-1) \cdot 1 )\mathbf{k} $$

 

단순화하면:

$$\mathbf{p} = (1 + 2, 2 + 1, -1 + 1)$$
$$ \mathbf{p} = (3, 3, 0)$$

이 결과는 ideal point(이상점)을 나타내며, 이는 두 직선이 Euclidean Geometry에서는 평행하여 교차하지 않음을 의미함.


같이 보면 좋은 자료

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

 

https://visionbook.mit.edu/homogeneous_coordinates.html?utm_source=perplexity

 

38  Representing Images and Geometry – Foundations of Computer Vision

Introduction Before we dive into the material of this chapter, let’s start by questioning the way in which we have been representing images up to now. In most of the chapters, we have represented images as ordered arrays of pixel values, each pixel descr

visionbook.mit.edu

 


 

728x90

'... > Math' 카테고리의 다른 글

[Math] Geometry (기하학) : Euclidean, Projective, Non-Euclidean  (0) 2024.06.16
[Math] Homogeneous Coordinate and Projective Geometry  (1) 2024.06.16
[Math] Weighted Least Square  (1) 2024.06.13
[ML] Bootstrap Sampling  (2) 2024.06.05
[Math] Importance of Continuous and Smooth Functions in Optimization Problems  (1) 2024.06.01
'.../Math' 카테고리의 다른 글
  • [Math] Geometry (기하학) : Euclidean, Projective, Non-Euclidean
  • [Math] Homogeneous Coordinate and Projective Geometry
  • [Math] Weighted Least Square
  • [ML] Bootstrap Sampling
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (785)
      • Private Life (15)
      • Programming (55)
        • DIP (116)
        • ML (34)
      • Computer (119)
        • CE (53)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (368)
        • Signals and Systems (115)
        • Math (176)
        • Linear Algebra (33)
        • Physics (43)
        • 인성세미나 (1)
      • 정리필요. (61)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (7)
        • PET Study 2009 (1)
        • 방사선 장해방호 (5)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    math
    SS
    signals_and_systems
    cv2
    Python
    linear algebra
    opencv
    인허가제도
    SIGNAL
    random
    ML
    fourier transform
    Vector
    Optimization
    numpy
    Probability
    Term
    signal_and_system
    function
    Programming
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[CV] Intersection and Ideal Point; Homogeneous Coordinate and Cross Product
상단으로

티스토리툴바