Camera Parameters: Difference between revisions
No edit summary  | 
				|||
| Line 15: | Line 15: | ||
M_{int} =    | M_{int} =    | ||
\begin{bmatrix}  | \begin{bmatrix}  | ||
f/s_x & s & o_x\\  | |||
0 &   | 0 & f/s_y & o_y\\  | ||
0 & 0 & 1    | 0 & 0 & 1    | ||
\end{bmatrix}  | \end{bmatrix}  | ||
| Line 27: | Line 27: | ||
M_{int} =    | M_{int} =    | ||
\begin{bmatrix}  | \begin{bmatrix}  | ||
128/256 & 0 & 128/256\\  | |||
0 &   | 0 & 128/256 & 128/256\\  | ||
0 & 0 & 1    | 0 & 0 & 1    | ||
\end{bmatrix}  | \end{bmatrix}  | ||
Revision as of 13:11, 23 September 2020
Camera Parameters
Intrinsics
The is the projection matrix which turns camera coordinates to image coordinates.
It consists of the following:
- Focal Length \(f\)
 - Image Center \(\mathbf{o} = (o_x, o_y)\)
 - Size of pixels \(\mathbf{s} = (s_x, s_y)\)
 - Axis skew \(s\) typically 0
 
The formula for this matrix is: \[ \begin{equation} M_{int} = \begin{bmatrix} f/s_x & s & o_x\\ 0 & f/s_y & o_y\\ 0 & 0 & 1 \end{bmatrix} \end{equation} \]
E.g. if your camera has a 90 deg FOV on each side and outputs a resolution of \(\displaystyle 256 \times 256\), then the intrinsic matrix should project \(\displaystyle (1,0,1)\) to \(\displaystyle (256, 0)\): \[ \begin{equation} M_{int} = \begin{bmatrix} 128/256 & 0 & 128/256\\ 0 & 128/256 & 128/256\\ 0 & 0 & 1 \end{bmatrix} \end{equation} \]
Extrinsics
This is the view matrix which encodes the camera's position and rotation.
Suppose the camera position is \(\mathbf{C}\) and rotation \(\mathbf{R}_c\).
\[ \begin{equation} M_{ext}= [\mathbf{R} | \mathbf{t}] = [\mathbf{R}_c^T | -\mathbf{R}_c^T \mathbf{C}] \end{equation} \]