[CV] Image Plane to Image Sensor Mapping

2024. 7. 6. 10:56·Programming/DIP
728x90
728x90

Image Plane to Image Sensor Mapping

Image Plane에서의 coordinate $x_i, y_i$는

  •  $\text{mm}$ 단위를 가지며 
  •  "결과 image"의 coordinate라고 생각할 수 있다.

하지만 계산의 용이성 때문에 $x_i, y_i$ 보다는

normalized image plane의 coordinate $x_n, y_n$ 이 많이 사용된다.


또한, 현재 카메라는

  • pixel로 구성된 plane sensor를 사용하고,
  • 결과 이미지들도 digital image로 pixel기반이기 때문에, 

실제 우리가 image에서 사용하는 coordinate 는 거의 대부분

pixel 기반의 u-v coordinate (or pixel coordinate) 가 된다.


다음 그림은 image plane coordinate와 sensor coordinate 를 나타냄: 같은 plane을 대상으로 다르게 표현한 것! 

 

위의 image plane으로부터 normalized image plane을 거친 sensor plane의 각 coordinate간의 관계는 다음과 같음. 

$$ u = m_x x_i +u_o= m_x f x_n + u_o= m_x f \frac{x_c}{z_c} + u_o\\ v = m_y y_i + v_o= m_y f y_n +v_o = m_y f \frac{y_c}{z_c} +v_o \\ u_o = o_x = m_x f \hat{x}_i, v_o = o_y = m_y f \hat{y}_i$$

  • $u, v$ : 카메라의 sensor 의 index라고도 볼 수 있는 sensor coordinate (or image sensor coordinate)
  • $m_x, m_y$ : the pixel density (pixel/mm) in x and y direction, respectively.
    • camera sensor가 항상 square라는 보장이 없기 때문에 $m_x, m_y$를 따로 지정.
    • 오늘날 대부분의 경우 unit asepct ratio를 가져서 $m_x = m_y$임.
    • $f_x = m_x f, f_y = m_y f$로 간략하게 표기하는 경우가 많고,  
      이들은 Camera의 intrinsic parameters에 속함.
  • $\hat{x}_i, \hat{y}_i$ : image plane의 전체넓이와 높이의 1/2.
  • $o_x, o_y, u_o, v_o$ : sensor coordinate에서의 센터 
  • $x_n, y_n$ : x and y coordinate on the normalized image plane.
  • $x_c, y_c, z_c$ : the camera coordinates

analog film image를 digitization한 것과도 비슷하다고 볼 수 있음.

 

위의 관계에서 camear coordinate와 image coordinate와의 관계는 perspective projection 으로 설명됨

2024.07.06 - [Programming/DIP] - [CV] Perspective Projection (원근 투영법): Camera to Image

 

[CV] Perspective Projection (원근 투영법): Camera to Image

Perspective Projection3D 물체를 2D 평면에 투영하는 방법 중 하나를 의미함.이는 컴퓨터 그래픽스, 디자인, 건축 등에서 주로 사용됨.기술적 정의:Perspective Projection은 원근법을 적용하여 3D 공간에 있는

dsaint31.tistory.com


주의할 점은

optical axis가 통과하는 $o_x,o_y$를 image plane에서는 origin으로 사용하지만,

u-v coordinate에서는 left-top의 pixel을 origin으로 삼는다는 차이점이 있다.

 

optical axis가 통과하는 principal point $o_x, o_y$의 pixel coordinate인 $u_o, v_o$는 camera의 intrinsic parameters 중 하나이며, Camera Calibration을 통해 구해짐.

 

위의 식은 transition이 있어서 linear equaiton이 아니지만,

  • homogeneous coordinate을 사용하여
  • matrix equation (=linear equation)으로 바꾸고,
  • Camera의 intrincis parameters를 matrix $K$로 다루게 됨.

$$ \begin{bmatrix}u \\ v \\ 1 \end{bmatrix} = \begin{bmatrix} f_x &0 & u_o \\ 0 & f_y  & v_o \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}\frac{x_c}{z_c} \\ \frac{y_c}{z_c} \\ \frac{z_c}{z_c} \end{bmatrix} = K \begin{bmatrix} x_n \\ y _n \\ 1 \end{bmatrix}$$


같이 보면 좋은 자료들

2024.06.29 - [Programming/DIP] - [CV] Coordinate Systems

 

[CV] Coordinate Systems

이 글은 Computer Vision에서의 Coordinate Systems 을 다룬다.종류 및 정의World Coordinate (월드 좌표계):$\begin{bmatrix}x_w& y_w & z_w & 1\end{bmatrix}^T$카메라 외부에 존재하는 객체(object)의 위치를 전역적인 좌표계

dsaint31.tistory.com

2024.06.22 - [Programming/DIP] - [CV] Geometric Camera Model

 

[CV] Geometric Camera Model

Geometric Camera Model (or Camera Model)은 real world 와  camera의 pose에 따라,real world 와  camera의 image 간의 관계를approximation 함. 이 문서에서는 기본적인 Pinhole Camera Model에 기반하여 설명함.Pinhole Camera Model

dsaint31.tistory.com

 


 

'Programming > DIP' 카테고리의 다른 글

[Math] Euler Angles and Rotation Matrix  (0) 2024.07.07
[CV] Perspective Projection (원근 투영법): Camera to Image  (0) 2024.07.06
[CV] Triangulation: Simple Version  (1) 2024.07.04
[CV] Triangulation : Linear Triangulation [작성중]  (1) 2024.06.30
[CV] Stereo Vision: Stereo Matching, Triangulation, Depth Map  (0) 2024.06.29
'Programming/DIP' 카테고리의 다른 글
  • [Math] Euler Angles and Rotation Matrix
  • [CV] Perspective Projection (원근 투영법): Camera to Image
  • [CV] Triangulation: Simple Version
  • [CV] Triangulation : Linear Triangulation [작성중]
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (742)
      • Private Life (13)
      • Programming (188)
        • DIP (106)
        • ML (26)
      • Computer (119)
        • CE (53)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (351)
        • Signals and Systems (103)
        • Math (172)
        • Linear Algebra (33)
        • Physics (42)
        • 인성세미나 (1)
      • 정리필요. (54)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (1)
        • PET Study 2009 (1)
        • 방사선 장해방호 (4)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

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

  • 태그

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

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[CV] Image Plane to Image Sensor Mapping
상단으로

티스토리툴바