Photogrammetry

From McCwiki
Jump to: navigation, search

General Solution

<math>\LARGE\begin{align} s\underbrace{\left[\begin{matrix} u\\ v\\ 1 \end{matrix}\right]}_{3\times{}1} &= K\left[R|t\right]M\\ &= \underbrace{\underbrace{\underbrace{ \underbrace{\overbrace{\left[\begin{matrix} f_x & 0 & c_x\\ 0 & f_y & c_y\\ 0 & 0 & 1 \end{matrix}\right]}^{\small{\text{camera projection}}}}_{3\times{}3} \underbrace{\overbrace{\left[\begin{matrix} i_x & i_y & i_z\\ j_x & j_y & j_z\\ k_x & k_y & k_z \end{matrix}\right]}^{\small{\text{camera rotation}}}}_{3\times{}3}}_{3\times{}3} \underbrace{\overbrace{\left[\begin{matrix} 1 & 0 & 0 & X_c\\ 0 & 1 & 0 & Y_c\\ 0 & 0 & 1 & Z_c \end{matrix}\right]}^{\small{\text{camera translation}}}}_{3\times{}4}}_{3\times{}4} \underbrace{\left[\begin{matrix} X_s\\ Y_s\\ Z_s\\ 1 \end{matrix}\right]}_{4\times{}1}}_{3\times{}1} \end{align} </math>

  • <math>\left(u,v\right)</math> is an image coordinate (pixels)
  • <math>s</math> is a scale factor (scalar?)
  • <math>\left(f_x,f_y\right)</math> are camera focal lengths in pixels
  • <math>\left(c_x,c_y\right)</math> is the center of interest in pixels (usually the center of the image, but not always)
  • <math>R</math> is the world-to-camera rotation matrix (i.e. inverse of the camera's own world space rotation matrix)
  • <math>t</math> is the world-to-camera translation matrix (i.e. inverse of the camera's own world space translation matrix)
  • <math>\left(X,Y,Z\right)</math> are world coordinates corresponding to the image coordinate

The above is equivalent to the following when <math>z \neq{} 0</math>:

<math>\LARGE\begin{align} \left[\begin{matrix} x\\ y\\ z \end{matrix}\right] &= R \left[\begin{matrix} X\\ Y\\ Z\\ \end{matrix}\right] + t\\ x^\prime{} &= \frac{x}{z}\\ y^\prime{} &= \frac{y}{z}\\ u &= f_x\times{}x^\prime{}+c_x\\ v &= f_y\times{}y^\prime{}+c_y \end{align}</math>

Deeper Articles