Revision 90cfd8fba5857c69ab00ed761765a3514da7246f (click the page title to view the current version)

Image Formation

Changes from 90cfd8fba5857c69ab00ed761765a3514da7246f to current

---
title: Image Formation
categories: session
---

> Vision is the inverse problem of image formation

This session is prepared for **self-study**.
However, the room is available, and you should meet up
and take advantage of collaboration.

- perspective
Use the **first hour** to watch and listen to the lectures
(videos and slideshows with audio).  See under [Briefing](#briefing).
Use the **rest of the time** to solve the 
[Exercises](#exercises) as group work.
You should discuss possible solutions between yourselves **before**
you review the [Solutions](Solutions/Image Formation).
Remember that communicating and arguing solutions to your peers is
one of the most important learning outcomes of the module.

# Briefing
# Briefing {#briefing}

## Image Representation 
The actual briefing will extensively use blackboard drawings and
improvisation.  Hence the lecture notes below are **not complete**.

![Eye Model from *Introduction to Psychology* by University of Minnesota](Images/eye.jpg)
+ [Image Formation Lecture]() 
+ Rudimentary notes from 2022: [Image Formation Notes]() and
  [Slides](http://www.hg.schaathun.net/talks/maskinsyn/camera.html)

+ Eye model 
+ Viewpoints
    + 2D matrix
    + light intensity values
    + `image'
+ Sampling of the image
    + finite resolution
## Learning Outcomes

## Thin Lens Model
During this session, the goal is to learn to master the following
concepts and models:

### The Focus Point
+ The image as a sampled function
+ Projection from 3D to 2D, as it occurs in a camera
+ thin lens equation
+ vanishing point
+ The thin lens model
+ aperture, focus
+ The pinhole model

![Burning Glass from *College Physics* by OpenStax College](Images/sun.jpg)
# Exercises {#exercises}

![Diagram of Lens Focus Point from *College Physics* by OpenStax College](Images/lens.jpg)
Exercises are from Ma 2004 page 62ff.

+ A convex lens collect, or focus, parallel rays into a single focus point.
+ This works as a burning glass.
    - The sun is so far away that the sun rays are parallel for all 
      practical purposes.
+ Definitions
    - **Optical Axis** is the line perpendicular on the lens,
      through its centre.
    - The **Focus** is a point on the Optical Axis.  Rays which enter the
      lense parallel to the optical axis are deflected so that they intersect
      at the Focus.
    - **Focal Length** is the distance between the lens and the Focus.
      (We ignore the thickness of the lens.)
    - The **Focal Plane** is a plane through the Focus, perpendicular
      on the Optical Axis.
I recommend to discuss the following problems in small groups.
Use figures and diagrams as basis for your discussion where possible.

If you prefer, you may consult the 
[Solutions](Solutions/Image Formation) after each individual exercise.

## Equivalence of Points (Based on Exercise 3.1.)

### The Image Plane
> Show that any point on the line through $o$ (optical centre) and
> $p$ projects onto the same image co-ordinates as $p$.

+ The image plane
    - non-parallel rays
+ The thin lens equation
+ Points further away
+ The aperture
1.  Start by drawing the lens, image, the points $p$ and $o$,
    and the image point.
2.  What does the drawing tell you about the problem?
    Add details to the drawing as required.
3.  Recall the equations which relate the $(x,y)$ co-ordinates of the
    image point to the $(X,Y,Z)$ co-ordinates of $p$.
    (Write it down.)
4.  Consider a different point $p'$ on the same line, and add it
    to your drawing.  Where is its image point?
5.  How does do the co-ordinates $(X',Y',Z')$ of $p'$ relate to $(X,Y,Z)$ and $(x,y)$?
5.  From the above, you should have two arguments solving the
    problem, one geometric and one algebraic.
    Each deserves attention.
    Are these arguments convincing?
    Complete any details as required.
6.  Reflect on the relationship between the algebraic and the
    geometric argument.

## The pinhole model
##  (Exercise 3.2)

+ Reference frame
+ Co-ordinates
> Consider a thin lens imaging a plane parallel to the lens at a distance
> $z$ from the focal plane.
> Determine the region of this plane that contributes to the image $I$
> at the point $x$.
> (Hint: consider first a one-dimensional imaging model, then extend to a
> two-dimensional image.)

## Geometry of Image Formation
**Note** 
The question makes sense if you assume that the
plane is out of focus, which is not possible in the pinhole model but
is in a more generic thin lens model.

# Exercises
1. Always start by making a drawing of the model.
2. Add all concepts mentioned in the problem text to the figure
   (as far as possible).
3. Add any additional concepts that you find important.
4. Identify the concept in question, that is the region contributing
   to the point $x$ in this case.

# Debrief
## Scale Ambiguity  (Exercise 3.8).

# Credits
> It is common sense that with a perspective camera, one cannot
> tell an object from another object that is exactly twice
> as big but twice as far.
> This is a classic ambiguity introduced by the perspective projection.
> Use the ideal camera model to explain why this is true.
> Is the same also true for the orthographic projection? Explain.

[Introduction to Psychology](https://open.lib.umn.edu/intropsyc)
by University of Minnesota is licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/), except where otherwise noted.
1. You can start with the problem you drew above for Exercise 1 (Ma:3.1).
   Consider an object extending between two points $p_1$ and $p_2$ in a
   plane parallel to the lens.  Draw this situation.
2. Imagine that both points move on a line through the optical centre $o$,
   as you did in Exercise 1.  What happens to the image?
   What happens to the object extending between $p_1$ and $p_2$?
3. Write up an argument based on the above reflections.

*College Physics*. Authored by: OpenStax College.
Located at: http://cnx.org/contents/031da8d3-b525-429c-80cf-6c8ed997733a/College_Physics.
License: 
[CC BY: Attribution](https://creativecommons.org/licenses/by/4.0/).
License Terms: Located at License
## Field of View (based on Exercise 3.3 Part 1)

> How can describe the area (in 3D) observed by a camera?

Consider a camera with focal length 24 mm, and a retinal plane
(CCD array) (16 mm x 12 mm).

1.  As always, start with a drawing.  Draw the pinhole module.
    Consider only the $x$-direction where the sensor is 16 mm.
    (You can do the $y$-direction (12mm) afterwards.)
2.  Write the known lengths into the figure.
2.  Where are the points which are observable to the camera?
    Reflect on the question.
3.  You should find that the observable points fall betweeen two
    lines through the focus (pinhole).  Calculate the angle
    $\theta$ between these two lines.
    + Note that the optical axis, through the focus, is orthogonal
      and centred on the sensor array.  It may be easier to calculate
      the angle $\theta/2$ between the optical axis and one of the edge 
      lines.
4.  The angle $\theta$ is known as the field of view (FoV). 
    Once you have calculated FoV for the specific camera,
    give an expression of FoV as a function of the focal length $f$
    and the radius of the sensor $r$.

## Real World and Imavge Co-ordinates (based on Exercise 3.3 Part 2)

> Given a point $(X,Y,Z)$ in 3D, what is the co-ordinates $(x,y)$ of
  the image point?

Consider the same camera system and model as you used in the previous 
exercise.
Consider first a point with co-ordinates $(X,Y,Z)=(6m,4m,8m)$.

1.  Draw first the pinhole model in the $x$-direction and find the
    $x$-co-ordinate corresponding to $X=6m$.
1.  Then draw the $xy$-direction and find the
    $y$-co-ordinate corresponding to $X=4m$.

# Debrief {#debrief}

See  [Solutions](Solutions/Image Formation)
<!--
1.  Questions and Answers
2.  Recap as required
-->