image basics - uvic.caaalbu/computer vision 2010/l4. image... · 2010-01-12 · image basics . 2...
Post on 21-May-2020
1 Views
Preview:
TRANSCRIPT
1
Image Basics
2
Outline
Image formation and camera models Calibration and recovery of the world scene Lenses
Image formation: sensing illuminated objects
Reading: textbook: 2.1, 2.2 Additional reading on perspective geometry
posted
3
Lenses
Useful for : 1. Gathering light. Under ideal pinhole projection, a single ray of light will
reach each point in the image plane. 2. Sharpening the image The trade-off between 1 and 2 is possible only if using
lenses.
4
Lenses behave according to the laws of geometric optics
- Light travels in straight lines (light rays) in homogeneous media - Reflection law - Refraction law : the incident ray, the refracted ray and the normal at the refraction surface are coplanar. Angles obey Snell’s law. Snell’s law n1 sin α1 = n2 sin α2
5
Thin Lenses: a ray entering the lens and refracted at its right boundary is immediately refracted again at the left boundary.
All rays passing through P are focused by the thin lens on point P’ (x’, y’, z’) along PO.
6
Thin lenses
Key points: - For a point P located at a distance –z in front
of a thin lens, the distance z’ of the image plane is determined by the geometry of the lens (the focal distance f).
- Conversely, a given geometric arrangement of a pinhole camera + lens can focus only on objects located at the same distance.
7
Thin lenses – depth of field When a lens focuses on an object at a given distance, all
objects at the same distance are sharply focused. Objects located at different distances are out of focus
and theoretically not sharp. Is it possible to reduce the size of the circle of
confusion?
8
Spherical Aberration
Blue region : paraxial zone (small angles), where P corresponds to P’ (called paraxial image)
If the image plane is Π’, then the image of P is a circle of confusion of diameter d’.
The focus plane (dashed) leads to a circle of confusion of minimal diameter.
9
Distortion changes the shape of the image as a whole. Straight lines are transformed into curves : curvilinear distortion.
Barrel distortion is associated with wide angle (or minimal zoom) lenses.
Pincushion distortion is associated with telephoto (or maximum zoom) lenses.
Initial image : fronto-parallel square
Distortion
pincushion distortion
barrel distortion
10
Distortion (cont’d)
Modifying the aperture for correcting the circle of confusion may lead to either barrel or pincushion distortion.
Wide-angle (minimal zoom) lens
Telescopic (maximal zoom) lens.
From Paul van Walree: Distortion.
11
Barrel or pincushion?
12
Chromatic aberration
• white light is composed of multiple wavelengths (Newton). • simple lenses will refract (bend) light differently as a function of wavelength. The refraction index is a function of wavelength. n=n(λ) • short (blue appearing) wavelengths are refracted more than long (red appearing) wavelengths. • longitudinal chromatic aberration: refracted rays corresponding to different image wavelengths intersect the optical axis at different points • transverse chromatic aberration: circles of confusion in the same image plane
13
initial scene
Detail : chimney pot The chromatic aberration: a distinct purple border at the left and upper side and a less pronounced green border at the right and down side
From Paul van Walree, Chromatic aberrations.
Last lecture
14
€
˜ w = P ˜ X where
P =
p11 p12 p13 p14
p21 p22 p23 p24
p31 p32 p33 p34
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
The projection of a scene point of homogeneous coordinates X to an image point of homogeneous coordinates w is given by a linear mapping.
Camera calibration
15
The camera calibration process allows us to compute the matrix P using a minimum of 6 point correspondences between a controlled 3D scene and its projected image.
Recovery of world position
Given P and w, retrieve X. The matrix P is non-square, thus the
mapping from the world scene to the image plane is many-to-one; all scene points onto a ray correspond to a single image point.
16
€
˜ w = P ˜ X where
P =
p11 p12 p13 p14
p21 p22 p23 p24
p31 p32 p33 p34
⎡
⎣
⎢ ⎢ ⎢
⎤
⎦
⎥ ⎥ ⎥
When are calibration and recovery of world position necessary?
These problems belong to the 3D geometric vision.
The task is described as inferring 3D scene properties from 2D image representations.
Examples: reconstruction of the 3D shape of an
object from an image or set of images (bottom-up approach)
17
18
Sensing illuminated objects
Light reaches surfaces in 3D
Surfaces reflect Sensor element
receives light energy
What counts: Light intensity Angles Surface
material
19
The perception of an object’s brightness and colour depends on:
The amount of energy and its spectral distribution (various wavelengths) illuminating the object surface
The spectral reflectance of the object surface (i.e. how the surface changes the received spectrum into the radiated spectrum)
The spectral sensitivity of the sensor (human eye, CCD array etc) irradiated by the light energy from the object’s surface
20
Non-white light sources
(Left) a ‘warm’ light source: it enhances reds and oranges while dulling blues and greens; (Middle) a neutral light source; (Right) a ‘cool’ source: it enhances blues and greens while dulling reds and oranges.
21
Light Sources General light sources are difficult to
work with. We must integrate light coming from all points on the source.
22
Light source models
Ambient light Directional light Point light Etc.
Important for computer vision but also for computer graphics;
Computer Vision: known light sources allows for shadow detection and removal
Computer Graphics: source light for realistic scene rendering (shadow and specularity modeling) and for facilitating 3D data visualization
23
Ambient light
Objects not directly lit are typically still visible ceilings, undersides of desks etc.
This is the result of indirect illumination from emitters, undergoing multiple reflections from intermediate surfaces
The ambient light source model illuminates all surfaces equally amount reflected depends only on surface
properties is the preferred model in Computer Vision
24
Ambient light (cont’d)
The ambient light reflected from a surface depends on:
- The surface properties, kambient
- The intensity of the ambient light source (constant for all points on all surfaces)
Ireflected = kambient Iambient
The ambient light is not necessarily white!
All object points have the same intensity in the image!
Adapted from David Luebke,
Lecture notes, Introduction to Computer Graphics
25
Directional Light Sources
Simplifying assumption: all rays of light from the source are parallel As if the source were
infinitely far away from the surfaces in the scene
A good approximation to sunlight
The direction from a surface to the light source is important in lighting the surface
Adapted from David Luebke,
Lecture notes, Introduction to Computer Graphics
26
Directional Light Sources
The same scene lit with a directional and an ambient light source
Adapted from David Luebke,
Lecture notes, Introduction to Computer Graphics
27
Point Light Sources A point light source emits light
equally in all directions from a single point
The direction to the light from a point on a surface thus differs for different points: we need to calculate a
normalized vector to the light source for every point we light:
p Adapted from David Luebke,
Lecture notes, Introduction to Computer Graphics
top related