Ch2 Fundamentals
Ch2 Fundamentals
Fundamentals
1
Computer Vision
Computer vision:
Computer vision is concerned with making
computers “understand” what is contained in an
image and other functions of human vision.
It is sometimes considered to be a topic of
artificial intelligence.
However, it is not possible to state exactly where
image processing ends and computer vision begins.
If you compare a digital image processing book
and a computer vision book, you will find a lot of
overlap.
2
Simple questions
What intensity differences can we distinguish?
What is the spatial resolution of our eye?
How accurately we estimate and compare
distances and areas?
How do we sense colors?
By which features can we detect and
distinguish objects?
Human Eye
3
Structure of the Human Eye
Shape is nearly a sphere.
Average diameter = 20 mm.
3 membranes:
Cornea and Sclera
– outer cover
Choroid
optic globe
Choroid :
Lies below the sclera, contains network of blood
4
Structure of the Human Eye
Lens
both infrared and ultraviolet light are absorbed
Receptors
Pattern vision is afforded by the distribution of
discrete light receptors over the surface of the retina.
Receptors are divided into 2 classes:
Cones: 6-7 million, located primarily in the central
10
5
Test images
11
Test images
Test images for distances and area estimation:
a) Parallel lines with up to 5% difference in length.
b) Circles with up to 10% difference in radius.
c) The vertical line appears longer but actually has the
same length as the horizontal line.
d) Deception by perspective: the upper line appears
longer than the lower one but actually have the same
length.
12
6
Test images
13
Test images
14
7
Signals
A signal is a function that carries information.
usually content of the signal changes over some
set of spatiotemporal dimensions.
Signals vary over time:
f(t)
f(t) for example: audio signal may be
thought at one level as a collection various
tones of differing audible frequencies that
vary over time.
15
Spatially-Varying Signals
Signals can vary over space as well. An image
can be thought of as being a function of 2
spatial dimensions:
f(x,y)
for monochromatic images, the value of the
8
Spatiotemporal Signals
What do you think a signal of this form
is?
f(x,y,t)
x and y are spatial dimensions; t is time.
Perhaps, it is a video signal, animation, or
other time-varying picture sequence.
17
Types of Signals
Most naturally-occurring signals are
functions having a continuous domain.
however, signals in a computer have are
discrete samples of the continuous
domain. In other words, signals
manipulated by computer have discrete
domains.
18
9
Analog & Digital
Most naturally-occurring signals also have a
real-valued range in which values occur with
infinite precision. to store and manipulate
signals by computer we need to store these
numbers with finite precision. thus, these
signals have a discrete range.
signal has continuous domain and range = analog
signal has discrete domain and range = digital
19
10
Image Representation
A digital image is an image f(x,y) that has
been digitized both in spatial coordinates
and brightness.
the value of f at any point (x,y) is
proportional to the brightness (or gray
level) of the image at that point.
21
Image Representation
22
11
Image Representation
A digital image can be considered a
matrix whose row and column indices
identify a point in the image and the
corresponding matrix element value
identifies the gray level at that point.
23
Image Representation
24
12
Sampling and Quantization
25
Light-intensity function
image refers to a 2D light-intensity function,
f(x,y) the amplitude of f at spatial coordinates
(x,y) gives the intensity (brightness) of the
image at that point. light is a form of energy
thus f(x,y) must be nonzero and finite.
0< f(x,y)<∞
26
13
Illumination and Reflectance
the basic nature of f(x,y) may be
characterized by 2 components:
the amount of source light incident on the
scene being viewed Illumination, i(x,y)
the amount of light reflected by the objects
in the scene Reflectance, r(x,y)
27
14
Gray level
29
Number of bits
30
15
Resolution
31
Checkerboard effect
32
16
False contouring
33
34
17
Neighbors of a pixel
35
Connectivity
Let V be the set of gray-level values used to defined
connectivity
4-connectivity : 2 pixels p and q with values from V are 4-
connected if q is in the set N4 (p)
8-connectivity :2 pixels p and q with values from V are 8-
connected if q is in the set N8 (p)
m-connectivity (mixed connectivity): 2 pixels p and q with
values from V are m-connected if
q is in the set N4 (p) or
18
Example
m-connectivity eliminates the multiple
path connections that arise in 8-
connectivity.
37
Adjacent
a pixel p is adjacent to a pixel q if they
are connected.
two image area subsets S1 and S2 are
adjacent if some pixel in S1 is adjacent
to some pixel S2.
38
19
Path
a path from pixel p with coordinates (x,y) to
pixel q with coordinates (s,t) is a sequence of
distinct pixels with coordinates
(x0,y0),(x1,y1),…(xn,yn) where
(x0,y0) = (x,y) , (xn,yn) = (s,t) and (xi,yi) is
adjacent to (xi-1,yi-1)
n is the length of the path
we can define 4-,8-, or m-paths depending on
type of adjacency specified.
39
Exercise
e
40
20
Distance Measures
41
Euclidean distance
42
21
City-block distance:
D4 distance
43
Chessboard distance: D8
distance
44
22
D4 and D8 distances
45
m-connectivity’s distance
46
23
Arithmetic Operators
47
Logic operations
48
24
Mask Operation
49
Mask Operation
50
25
Mask operator
51
Mask coefficient
Proper selection of the coefficients and
application of the mask at each pixel position in
an image makes possible a variety of useful
image operations
noise reduction
region thinning
edge detection
26
Image Geometry
Basic Transformations : expressed in 3D
Cartesian coordinate system (x,y,z)
Translation
Scaling
Rotation
Concatenation and inverse transformation
53
Translation
54
27
Geometry General Form
V* = AV
A : 4x4 transformation matrix
V : column vector containing the original
coordinates
V* : column vector whose components
are the transformed coordinates
55
Translation matrix
56
28
Scaling
57
Rotation
58
29
Rotation
59
Rotation
60
30
Concatenation and inverse
transformation
61
31