Revision 0e3da782cd22c69f9d2247a04f71e4b8ba732947 (click the page title to view the current version)

Relative Pose

Changes from 0e3da782cd22c69f9d2247a04f71e4b8ba732947 to 72e2bb1d193234f0fb9bac631d4c3b7c0479511e

---
title: Relative Pose
categories: session
---

**Reading** Ma 2004 Chapter 5

# The Epipolar Constraint
**Briefing** [Relative Pose Lecture]()

![Epipolar constraint due to Hamidur Rahman](Images/epipolar.jpg)
# Exercises

![Epipolar constraint due to Arne Nordmann (norro) - CC BY-SA 3.0](Images/epipolar2.svg)
## Exercise 5.5

+ Two cameras, two co-ordinate frames
+ Relative Pose: transformation $(R,T)$ from Camera Frame 1 to Camera Frame 2.
+ Consider a point $p$ in 3D, it has
    + co-ordinates $\mathbf{X}_i$ in Camera Frame $i$
+ The projection of $\mathbf{X}_i$ in homogeneous co-ordinates is
  called $\mathbf{x}_i$
    + $\mathbf{X}_i = \lambda_i\mathbf{x}_i$
    + Note $\mathbf{x}_i$ is 3D co-ordinates if the image plane
      is normalised to $z=1$
+ Combining this with the relation $\mathbf{X}_2=R\mathbf{X}_1+T$, we get
  $$\lambda_2\mathbf{x}_2 = R\lambda_1\mathbf{x}_1 + T$$
+ To simplify, we multiply by $\hat T$ to get
  $$\lambda_2\hat T\mathbf{x}_2 = \hat TR\lambda_1\mathbf{x}_1 + \hat TT$$
+ The last term is zero because $T\times T=0$
  $$\lambda_2\hat T\mathbf{x}_2 = \hat TR\lambda_1\mathbf{x}_1$$
+ Now $\mathbf{x}_2$ is perpendicular on $T\times\mathbf{X}_2$ so
  $$0=\mathbf{x}_2^T\lambda_2\hat T\mathbf{x}_2 = \mathbf{x}_2^T\hat TR\lambda_1\mathbf{x}_1$$
+ Since $\lambda_1$ is a scalar, we can simplify
  $$0= \mathbf{x}_2^T\hat TR\mathbf{x}_1$$
  This is the **epipolar constraint**
+ $E=\hat TR$ is called the **essential matrix**
> Explain under what conditions the family of epipolar lines in at least
  one of the image planes will be parallel to each other.
  Where is the corresponding epipole 
  (in terms of is homogeneous co-ordinates)?

## Some Jargon
To make sense of the question, you have two draw the situation.

+ For each point $p$, we have
    + a *epipolar plane* $\langle o_1,o_2,p\rangle$
    + *epipolar line* $\ell_i$ as the intersection of the epipolar plane
      and the image plane
+ The *epipoles* $\mathbf{e}_i$ is the projection of origo onto
  the image plane of the other camera.
+ Note that the epipoles are on the line $\langle o_1,o_2\rangle$, and
  hence in the epipolar plane
1.  Draw the two origins and the two image planes.
    Where are the epipoles?
2.  Draw two or three separate object points (3D) and the corresponding
    epipolar planes.  (Avoid object points in the same epipolar plane.)
    Where are the corresponding epipolar lines?
3.  If you have now identified different epipolar planes within one
    fixed camera configuration, you will have a *family of epipolar lines*
    in each image plane.
    Where do these lines intersect?
4.  Try to rotate one of the cameras.
    - Can you rotate it so that the epipolar lines become parallel?
    - How does this come about?
    - Where is the epipole when this happens?
5.  Review the original exercise text.  Does it make sense in terms
    of the thought experiment that you have just conducted?

## Some properties
## Exercise 5.8

**Proposition 5.3(1)**
> Given two images $x_1$, $x_2$ of a point $p$ together with the
  relative camera motion $(R,T)$, $\mathbf{X}_2=R\mathbf{X}_1+T$:

$$\mathbf{e}_2^TE = E\mathbf{e}_1=0$$
  1. express the depth
  1. express the depth

+ This is because
    1. $\mathbf{e}_2\sim T$ and $\mathbf{e}_1\sim R^TT$
    2. $E=\hat TR$
    3. $T\hat T = T\times T=0$
## Exercise 5.9

**Proposition 5.3(2)**

**Proposition 5.3(3)**

+ Both the image point and the epipole lie on the epipolar line

# Eight-Point Algorithm

$$\mathbf{x}_2^TE\mathbf{x}_1 = 0$$

Kronecker product: $\bigotimes$

Serialisation of a matrix: $(\cdot)^s$

$$(\mathbf{x}_1\bigotimes\mathbf{x}_2)^TE^s = 0$$

$$\mathbf{a} = \mathbf{x}_1\bigotimes\mathbf{x}_2$$
## Optional exercises

$$\chi = [\mathbf{a}_1, \mathbf{a}_2, \ldots, \mathbf{a}_n]$$
+ Exercise 5.3
+ Exercise 5.4
+ Exercise 5.2 (1)

We can solve $\chi E^s = 0$ for $E^s$.
With eight points, we have unique solutions up to a scalar factor.
# Debrief

The solution is not necessarily a valid essential matrix, but we can
project onto the space of such matrices and correct the sign to 
get positive determinant.