# Single-view Metrology
<style>
figure {
padding: 4px;
margin: auto;
text-align: center;
}
figcaption {
background-color: black;
color: white;
font-style: italic;
padding: 1px;
text-align: center;
}
</style>
:::success
Recover 3D structure with a single image.
:::
## 2D Points and Lines at Infinity
### 2D Line
<figure>
<img src="https://hackmd.io/_uploads/BJPmvO6Y6.png" width="500">
</figure>
$$
x \in l \ \Longleftrightarrow \ x^{T}l = l^{T}x = 0
$$
### 2D Line Intersection
<figure>
<img src="https://hackmd.io/_uploads/rk4___Ttp.png" width="200">
</figure>
$$
x = l \times l'
$$
### 2D Infinity Point
<figure>
<img src="https://hackmd.io/_uploads/HJBEK_aF6.png" width="300">
</figure>
$$
l \times l' \propto
\begin{bmatrix}
b \\
-a \\
0
\end{bmatrix}
= x_{\infty}
$$
### 2D Infinity Line
2D Infinity Points form a line at infinity.
<figure>
<img src="https://hackmd.io/_uploads/HJPR4r156.png" width="500">
</figure>
## Vanishing Point
- Any two parallel lines have the same vanishing point.
- The ray from camera center $C$ through point $v$ is parallel to the lines.
- An image may have more than one vanishing point.

## Vanishing Line
2D vanishing points form a line at infinity.
<figure>
<img src="https://hackmd.io/_uploads/ByGm47k5T.png" width="400">
</figure>
$$
v = (p_{1} \times q_{1}) \times (p_{1} \times q_{1})
$$
## Height Measurement
### Cross Ratio
A projective invariant. As long as the transformation is "linear", maping line to line, the ratio before and after transformation would be the same.

### Height Measurement without a Ruler
With cross ratio invariant and vanishing line, we can measure the height of object in the image.

## Supplement
- Interesting question: which one is higher? The camera or the man in the parachute?

Ans: Camera, because the parachutist is below the horizon (vanishing line).
## Reference
- https://web.stanford.edu/class/cs231a/course_notes/02-single-view-metrology.pdf
- https://www.cis.upenn.edu/~cis580/Spring2015/Lectures/cis580-04-singleview.pdf