Revision cf6ced9550e80482518fde20ae6393a433aebf1f (click the page title to view the current version)

Pre- and co-image

Changes from cf6ced9550e80482518fde20ae6393a433aebf1f to 7dbeb503c67377c308aa8694bb3d3f66d863af5a

---
title: Pre- and co-image
categories: lecture
title: Pre- and Co-Image (Session 2022)
categories: session
---

# Lecture Notes

## Linear objects in 2D

+ The most important linear object is the line through the origin.
    + These are subspaces of dimension one.
+ The object is a set $\ell\subset\mathbb{R}^2$
+ Three descriptions
    + **functions**
      $$\ell = \{ \vec{x}=(x,y) | y = a\cdot x, x\in\mathbb{R} \}$$
      for some $a\in\mathbb{R}$
        + Exception: The vertical line would have $a=\infty$,
          for infinitely steep
    + **equations**
      $$\ell = \{ \vec{x}=(x,y) | \vec{x}\cdot\vec{x}^\bot \}$$
      for some $\vec{x}^\bot\in\mathbb{R}^2$
        + Note that for $c\neq0$, $\vec{x}^\bot$ and $c\vec{x}^\bot$
          define the same line.
    + **span**
      $$\ell = \{ \vec{x}=(x,y) | a\cdot \vec{x}_0, a\in\mathbb{R} \}$$
      for some $\vec{x}_0\in\mathbb{R}^2$
        + Exception: The vertical line would have $a=\infty$,
          for infinitely steep

If we normalise $\vec{x}^\bot$, we can write $\vec{x}^\bot=(a,1)$
for $a\in\mathbb{R}$ unless we describe the vertical line, which has
$\vec{x}^\bot=(1,0)$, which we could imagine writing $(\infty,1)$.

+ We can normalise $\vec{x}_0$ in the same way.
+ The set of lines through origo is equivalent to $\mathbb{R}\cup\{\infty\}$,
  which can be seen in either representation.
  
## Linear objects in 3D

We have the same situation in 3D, but we have more objects of interest.

+ In 2D, the line is defined by **one** function or **one** equation.
+ In 3D we have
    + the line $\ell= \{(x,y,z) | z = ax + by, (x,y)\in\mathbb{R}\}$
    + the plane $\mathcal{P}= \{(x,y,z) | z = ax, y = bx, x\in\mathbb{R}^2\}$
      (two function)
+ Using equations to define it
    + The plane needs **one** equation
       $$\mathcal{P}=\{\vec{x} | \vec{x}\cdot\vec{x}^\bot=0 \}$$
        + $\vec{x}^\bot$ is the dual space $\mathcal{P}$
    + The line needs **two** equation
       $$\ell=\{\vec{x} | \vec{x}\cdot\vec{y}_1=0, \vec{x}\cdot\vec{y}_1=0\}$$
        + The space spanned by  $\vec{y}_1$ and $\vec{y}_2$ is the
          dual space $\ell^\bot$
+ What does it look like as **spans**?
+ An object needs
    + one function per dimension; or
        + Each adds one degree of freedom 
    + one equation per *codimension* 
        + Each equation removes one degree of freedom
    
## Projections from 3D to 2D

+ Recall that each point $x$ in the image plane is the image of any point on
  a line through $O$ 
    + Correspondence between lines through $O$ and point in the image.
    + This line is called the **pre-image** of $x$.

Draw frontal model with image at $Z=1$.  This gives projective
image co-ordinage $(x,y,1)$ embedded in 3D.

+ What about a line $l$ in the image plane?  What is the pre-image?
    + Plane $P$ through the origin.  The line $l$ is the intersection
      of $P$ and the image plane
+ What is the image of a line $L$ in 3D?
    + if $O\in L$ we have a point, whose pre-image is $L$
    + if $P\not\in L$, we have a line $l$ whose pre-image is a plane $P\ni O$
    + $P$ is described by an orthogonal vector, the dual space $P^\bot$,  
      which we call the **co-image** of $l$

# Notes from the text book

*The following notes were made 2021 based on a textbook.
This exposition is not recommended because it is driven
by the definitions which only gain meaning later in the course.*

## Image and Image Plane

+ Image Plane is the universe where the image lives
The format today will differ somewhat from the norm.
Instead of having one debrief the very end, we will try to do two
exercises with a shorted debrief after each one.

$$ \text{image}\subset\text{image plane} $$
Feel free to look at the debrief notes as hints to solving the
exercises; just take a couple of minutes first to try to make
sense of the question and make a sketch.

+ The Image Plane is a 2D World
+ The Image Plane exists in a 3D World
+ **Briefing** [Pre- and co-image Lecture]()
+ Exercise 3.9 are from Ma 2004 page 62ff.
+ Exercise 3.10 are from Ma 2004 page 62ff.

## Pre-image
# First Exercise (3.9)

+ Preimage is the set of points in 3D projecting onto the Image Plane
+ What is projection?
    + draw a line through the 3D point and origo (the pinhole)
    + the projection is the intersection with the image plane.
+ Thus
    + $\text{preimage} = \mathsf{span}(\text{image})$
    + $\text{image} = \text{preimage}\cap\text{image plane}$
+ The **span** of a set of points is the smallest linear subspace
  containing all the points
Exercise 3.9 are from Ma 2004 page 62ff.

## Points and Lines
## Debrief Notes

| Image object | Pre-Image | 
| :- | :- | 
| Point (dimension 0) | Line through origo (dimension 1) | 
| Line (dimension 1) | Plane through origo (dimension 2) | 
### Part 1

+ Preimage is a linear subspaces, i.e. includes origo
+ A single point projects onto a point
    + any other point on the same line through origo projects onto the same
      point
+ A line projects onto a line if it does not pass through origo
You should first find the pre-image of the image of $L$.

## Co-image
+ What kind of object is the pre-image?  
    + How did we describe  such an object previously?
+ What is the relationship between this pre-image and a point $x\in L$?
+ What is the relationship between the pre-image and and the vector $\ell$?

+ Coimage is the set of points (space) orthogonal on the preimage
### Part 2

$$\text{coimage} = \text{preimage}^\bot$$
+ If you read the points $x^1$ and $x^2$ as vectors in 3D, what do 
  they look like?
+ Can you describe the pre-image in terms of $x^1$ and $x^2$?
    + maybe as a span?
+ What then is the relationship between $\ell$ and $x^1,x^2\in L$?

$$\text{preimage} = \text{coimage}^\bot$$
How do you find a vector which is orthogonal on two known vectors in 3D?

## Points and Lines
### Part 3

| Image object | Pre-Image | Co-Image |
| :- | :- | :- |
| Point (dimension 0) | Line through origo (dimension 1) | Plane (co-dimension 1) |
| Line (dimension 1) | Plane through origo (dimension 2) | Line (co-dimension 2) |
+ Note that $x$ is an image point.
+ $\ell^1$ and $\ell^2$ are vectors in 3D, and co-images of two image lines 
+ If you view $x$ as a 3D vector instead of a point, what does it look like?
+ What would be the relationship between this vector $x$ and
  $\ell^1$ and $\ell^2$?
+ How do we find vector $x$ with the right relationship with $\ell^1$ and
  $\ell^2$?
+ How do we make sure that the vector $x$ is an image point $x$?

+ Preimage and coimage are linear subspaces
    + origo is in both the pre- and co-image
# Second Exercise (3.10)

# Notation
Exercise 3.10 are from Ma 2004 page 62ff.

+ Recall $\hat u$ is a skew-symmetric matrix associated with $u$
+ $\mathsf{span}(\hat u) = u^\bot$
+ Associate an image point $x$ with either its pre-image or co-image
## Debrief Notes

# Systems of Equations and Orthogonal Vectors
1.  Here, it is necessary to look at the pre-images of the two lines.
    + What does the pre-images look like?
    + What is the intersection of the pre-images?  Could it be empty?
    + What is the intersection between the image plane and the pre-images?  
2.  Here, you need to look at the co-images.
    + What can you say about co-images of parallel lines?
    + What can you say about the relationship between the co-images
      and the images?  Is there are relationship between one line and the
      co-image of the other line?
    + Now return to Part 3 of the previous exercise (3.9).
3.  Because the two lines are parallel, they lie in the same plane 
    (not necessarily through the origin).
    Consider the orientation of this plane.
    + Suppose first that it intersects the image plane close to the centre
      (image origin).  Where is the vanishing point?
    + Suppose you turn the plane.  Where does the vanishing point go?
    + At the extremity, the plane is parallel to the image plane.
      Where is the vanishing point now?

+ $\ell^Tx=0$ is an equation in three unknowns
    + This defines a plane (two unknowns)
    + e.g. $x_1+ax_2+bx_3$
+ If you have two points, say, $\ell^TL=0$, you have two equations
    + This defines a line (one unknowns)
    + e.g. $x_1+ax_2$
+ If you have two points $x_1$ and $x_2$ on a line 
    + $x_1\times x_2$ is orthogonal on both of them
    + and on any other point on the line
# Debrief