# Camera Intrinsics

These are calculated as part of the Camera Calibration process. Parameters through the Calibration Matrix.

At NVIDIA, I saw that these can be obtained from the camera manufacturer through an EEPROM.

Distinction with Cyrill Stachniss

In my Cyrill Stachniss Camera Calibration notes, I have an extra coordinate system, the sensor plane. In there, the image plane represents the idealized projection, whereas the sensor plane represents the actual measurements (corrects for Principal Point).

Below, these directly go to the sensor plane.

### Copy Pasted from Pinhole Camera Geometry

Below, I derive how we go from world $β$ image coordinate for camera intrinsics. In my Camera Calibration, we go from world $β$ image $β$ sensor coordinate system.

- This is the Optical Frame, the drawing on the right is a bird-eye view

Let $Oβxβyβz$ be the camera coordinate system.

The 3D point $P$, after being projected through the hole $O$, falls on the physical imaging plane $O_{β²}βx_{β²}βy_{β²}$ and produces the image point $P$.

We define the following:

- the 3D point $P=[X,Y,Z]_{T}$
- the image point $P_{β²}=[X_{β²},Y_{β²},Z_{β²}]_{T}$
- $f$ is the physical distance from the imaging plane to camera plane is $f$ (focal length)

Then, according to the similarity of the triangles,

$fZβ=βX_{β²}Xβ=βY_{β²}Yβ$The negative sign indicates that the image is inverted. We can equivalently place the imaging plane symmetrically in front of the camera.

This removes the negative sign in the formula to make it more compact: $fZβ=X_{β²}Xβ=Y_{β²}Yβ$ So we get $X_{β²}=fZXβ,Y_{β²}=fZYβ$

#### Pixel Coordinates

To describe how the sensor converts the perceived light into image pixels, we set a pixel plane $oβuβv$ fixed on the physical imaging plane

Between the pixel coordinate system and the imaging plane, there is an apparent zoom and a translation of the origin:

- pixel coordinates scales $Ξ±$ times on the $u$ axis and $Ξ²$ times on $v$
- origin is translated by $[c_{x},c_{y}]_{T}$

Then, the relationship between the coordinates of $P_{β²}$ and the pixel coordinate $[u,v]_{T}$ is:

u=\alpha X' + c_x\\ v=\beta Y' + c_y \end{matrix}We then replace $X_{β²}$ and $Y_{β²}$ with the values found previously:

\left\{ \begin{matrix} u=f_x\frac{X}{Z} + c_x\\ v=f_y\frac{Y}{Z} + c_y \end{matrix} \right. , \end{equation}$$ - $f$ is the focal length in meters - $\alpha$ and $\beta$ is in pixels/meter, so $f_x, f_y$ and $c_x, c_y$ are in pixels. We can write this as a matrix. Let's put $Z$ to the left side as in most books: $$\begin{equation} Z \begin{pmatrix} u\\ v\\ 1 \end{pmatrix}= \begin{pmatrix} f_x & 0&c_x \\ 0& f_y& c_y\\ 0&0 & 1 \end{pmatrix}\begin{pmatrix} X\\ Y\\ Z \end{pmatrix} \buildrel \Delta \over = \mathbf{K} \mathbf{P} \end{equation}$$ - Notice that LHS is a [[notes/Homogeneous Coordinate|Homogeneous]] 2D coordinate, while RHS is non-homogeneous (Cartesian coordinates) - $\mathbf{K}$ denotes the camera's **inner parameter matrix**, so there are 4 parameters: $f_x, f_y, c_x, c_y$ ### Related - [[notes/Camera Extrinsics|Camera Extrinsics]]