1. Computer Vision
DR. MOMINA MOETESUM
P R O F I L E : L I N K E D I N P R O F I L E
E M A I L : r e a c h . m o m i n a @ g m a i l . c o m
2. Week 2: Image Formation
• Geometric Primitives and Transformations
• Photometric Image Formation
• Digital Cameras and Image Representations
Computer Vision Week 2: Image Formation 2
3. What we see What a computer sees
3
Computer Vision Week 2: Image Formation
4. Computer Vision is Making sense of these numbers
4
Computer Vision Week 2: Image Formation
255
255
255
255
239
238
247
252
255
232
248
255
255
240
255
255
5. 3D to 2D Conversion implies information loss
graphics
vision
Computer Graphics vs. Computer Vision
5
Computer Vision Week 2: Image Formation
6. Geometric Primitives and Transformations
• Basic building blocks used to describe the projection of 3D features into 2D features.
• Points
• Lines
• Planes
• Projections
6
Computer Vision Week 2: Image Formation
7. Points
• 2D points (pixel coordinates in an image) can be denoted using
a pair of values, x = (x, y) ∈ R2 , or alternatively, a column
vector x ∈ R2x1 :
• 3D points (coordinates in three dimensions) can be written
using x = (x, y, z) ∈ R3
7
Computer Vision Week 2: Image Formation
8. Lines
• The general equation of a straight 2D line is given below, where
m is the gradient, and Y is the value where the line cuts the y-
axis.
L = mx + Y
• 3D Lines can be represented by using two points on the line,
(P, X). Any other point on the line can be expressed as a linear
combination of these two points.
L : (x – x1)/l = (y – y1)/m = (z – z1)/n
8
Computer Vision Week 2: Image Formation
9. 3D Lines - Proof
Consider a line which passes through the point P(x1, y1, z1), and has
direction vector d⃗=(l, m, n) , where l , m, and n are non-zero real
numbers. Let X=(x, y, z) be a random point on the line. Then the
vector PX ⃗, which is the red arrow in the figure, will be parallel
to d⃗. Hence, we have:
9
Computer Vision Week 2: Image Formation
10. 3D Lines - Example
Example 1: If a straight line is passing through the two fixed points in the 3-dimensional plane whose
position coordinates are P (2, 3, 5) and Q (4, 6, 12) then find its cartesian equation using the two-point
form.
Solution:
l = (4 – 2), m = (6 – 3), n = (12 – 5)
l = 2, m = 3, n = 7
Choosing the point P (2, 3, 5)
The required equation of the line
L : (x – 2) / 2 = (y – 3) / 3 = (z – 5) / 7
1 0
Computer Vision Week 2: Image Formation
11. 3D Lines - Example
Example 1: If a straight line is passing through the two fixed points in the 3-dimensional whose
position coordinates are X (2, 3, 4) and Y (5, 3, 10) then find its cartesian equation using the two-
point form.
Solution:
l = (5 – 2), m = (3 – 3), n = (10 – 4)
l = 3, m = 0, n = 6
Choosing the point X (2, 3, 4)
The required equation of the line
L : (x – 2) / 3 = (y – 3) / 0 = (z – 4) / 6
L : (x - 2) / 3 = (z – 4) / 6 and y = 3
1 1
Computer Vision Week 2: Image Formation
12. Image Formation in the Human Eye
1 2
Computer Vision Week 2: Image Formation
• When the eye is properly focused, light from an object
outside the eye is imaged on the retina
• Retina consists of two types of light receptors: rods and
cones
• Rods
Cover all of retina
75-150 Million
Several rods connected to one optical nerve (low-resolution)
Sensitive to small light intensities (dim-light vision)
Equal response to all colours
13. Image Formation in the Human Eye
1 3
Computer Vision Week 2: Image Formation
• When the eye is properly focused, light from an object outside
the eye is imaged on the retina
• Retina consists of two types of light receptors: rods and
cones
• Cones
Concentrated at fovea
6-7 Million
One cone connected to one optical nerve (high-resolution)
Sensitive to bright light
(bright-light vision)
Sensitive to colours
14. Image Formation in Human Eye
1 4
Computer Vision Week 2: Image Formation
16. Trichromatic Vision
1 6
Computer Vision Week 2: Image Formation
• Cone cells are of three types, each containing a
photosensitive pigment that responds to a
particular wavelength of light
• S-cones are sensitive to “short” wavelengths,
corresponding to the blue colour
• M-cones are sensitive to “medium” wavelengths,
corresponding to the green colour
• L-cones are sensitive to “long” wavelengths,
corresponding to the red colour
17. Capturing Images
• Pinhole Cameras
• Lenses
• Digital Cameras
The first photograph on record, “la table
servie”, obtained by Nicephore Niepce in
1822
1 7
Computer Vision Week 2: Image Formation
21. Introducing Lens
• Smaller the pinhole sharper the
images but also darker
• Larger the pinhole brighter the
image but also more blurry
• Most cameras use a converging lens
to allow light to enter the device.
• Zoom lenses found in cameras
utilize a combination of convex and
concave lenses to produce different
types of images.
2 1
Computer Vision Week 2: Image Formation
22. Optical Geometry
• Snell’s law, if r1 is the ray incident to the interface
between two transparent materials with indices of
refraction n1 and n2, and r2 is the refracted ray,
then r1, r2, and the normal to the interface are
coplanar, and the angles α1 and α2 between the
normal and the two rays are related by:
n1 sin α1 = n2 sin α2
2 2
Computer Vision Week 2: Image Formation
23. Reflection
2 3
Computer Vision Week 2: Image Formation
• Incident light is reflected in two main
forms
1. Diffuse reflection: light scattered
isotropically in all directions (shows
true colour of the object)
2. Specular reflection: Incident light
reflected in a specific direction
(mirror-like effect)
• Most materials exhibit a mixture of
diffuse and specular reflections
24. Thin Lens Phenomena
The thin lens equation defines the
relationship between the focal length of a
lens, the distance of an object from that
lens, and the distance of the image formed
by the lens.
2 4
Computer Vision Week 2: Image Formation
25. Focal Length of a Lens
2 5
Computer Vision Week 2: Image Formation
26. Focal Length
Focal length, usually represented in millimeters
(mm).
It is a calculation of an optical distance from the point where
light rays converge to form a sharp image of an object to the
digital sensor at the focal plane in the camera.
The focal length of a lens is determined when the lens
is focused at infinity.
Lens focal length tells us the angle of view—how much of the
scene will be captured—and the magnification—how large
individual elements will be.
The longer the focal length, the narrower the angle of
view and the higher the magnification.
The shorter the focal length, the wider the angle of
view and the lower the magnification.
2 6
Computer Vision Week 2: Image Formation
27. Digital Cameras
• Image sensing
pipeline,
• Various sources of
noise
• Typical digital post-
processing steps
2 7
Computer Vision Week 2: Image Formation
28. Capturing Digital Images
• Light falling on an imaging sensor is
usually picked up by an active sensing
area
• Charge-Coupled Device (CCD)
• Complementary Metal Oxide on Silicon
(CMOS)
• CCDs are prone to “Blooming”
• CCD sensors outperformed CMOS in
quality-sensitive applications
2 8
Computer Vision Week 2: Image Formation
35. Image formation is an analog
to digital conversion of an
image with the help of 2D
Sampling and Quantization
techniques that is done by the
capturing devices like
cameras.
Computer Vision Week 2: Image Formation 3 5
36. Sampling
• Sampling is a spatial
resolution of the digital
image.
• The rate of sampling
determines the quality of
the digitized image.
3 6
Computer Vision Week 2: Image Formation
37. Spatial Resolution
• The spatial resolution of an image is
determined by how sampling was carried
out.
• There are 3 measures which we see often
relating to Image Size/Resolution
a. Pixel count - e.g., 3000x2000 pixels
b. Physical size - e.g., 8" x 10"
c. Resolution - e.g., 240 pixels per inch (PPI)
3 7
Computer Vision Week 2: Image Formation
38. Quantization
• The transition of the continuous values
from the image function to its digital
equivalent is called quantization.
• Quantization is the number of grey levels
in the digital image.
• It is related to the intensity values of the
image.
• 8-bit quantization: 28 =256 gray levels
(0: black, 255: white)
• 1-bit quantization: 2 gray levels
(0: black, 1: white) – binary
3 8
Computer Vision Week 2: Image Formation
39. Intensity Resolution
• Intensity level resolution refers to
the number of intensity levels used
to represent the image
• The more intensity levels used, the
finer the level of detail in an image
• Intensity level resolution is usually
given in terms of the number of bits
used to store each intensity level
3 9
Computer Vision Week 2: Image Formation
41. Digital Image is an approximation of a real world scene
4 1
Computer Vision Week 2: Image Formation
42. Image as a Function
• Consider image as a function f or I, from
R2 to RM:
f(x, y) gives intensity or value at position (x, y)
• Digital image is defined over some bound:
f : [a, b]x [c, d]y → [min, max] gives
intensity or value at position (x, y) where: x
ranges from a to b, and y ranges from c to d and
intensity from min to max.
4 2
Computer Vision Week 2: Image Formation
43. Image Representations
Image is a collection of light intensities at different locations.
4 3
Computer Vision Week 2: Image Formation
52. Factors Affecting Performance of Digital Cameras
• Shutter Speed – Under exposed vs Over-Exposed
5 2
Computer Vision Week 2: Image Formation
53. Factors Affecting Performance of Digital Cameras
• Sampling Pitch - Physical spacing between adjacent sensor cells
5 3
Computer Vision Week 2: Image Formation
54. Factors Affecting Performance of Digital Cameras
• Fill Factor - active sensing area size as a fraction of the theoretically available sensing area
5 4
Computer Vision Week 2: Image Formation
55. Factors Affecting Performance of Digital Cameras
• Chip Size- having a larger chip size is preferable, since each sensor cell can be more photo-
sensitive
• Analog Gain - a higher gain allows the camera to perform better under low light conditions
(less motion blur due to long exposure times when the aperture is already maxed out).
• Sensor Noise - noise is added from various sources, which may include fixed pattern noise,
dark current noise, shot noise, amplifier noise, and quantization noise
• ADC Resolution - how many bits it yields and its noise level (how many of these bits are useful
in practice)
5 5
Computer Vision Week 2: Image Formation