Professional Documents
Culture Documents
Chapter 2:
Digital Image Fundamentals
Lecturer: Wanasanan Thongsongkrit
Email : wanasana@eng.cmu.ac.th
Office room : 410
Simple questions
Test images
Test images
Cornea :
Sclera :
Opaque membrane,
encloses the remainder of
the optic globe
Choroid :
Lens
both infrared and ultraviolet light are absorbed
appreciably by proteins within the lens structure
and, in excessive amounts, can cause damage to the
eye.
Retina
Innermost membrane of the eye which lines inside
of the walls entire posterior portion. When the eye
is properly focused, light from an object outside
the eye is imaged on the retina.
9
Receptors
Cones
Rods
10
Cones
Rods
Brightness adaptation
and discrimination
Contrast sensitivity
I+Ic
B Ic/I is large.
Weber ratio
Good
discrimination
rods
cones
Poor
Low
brightness discrimination is
poor (the Weber ratio is
large) at low levels of
illumination and improves
significantly (the ratio
decreases) as background
illumination increases.
hard to distinguish the
discrimination when it is
bright area but easier when
the discrimination is on a
dark area.
16
Brightness vs.Function of
intensity
Brightness is not a
simple function of
intensity.
visual system tends to
undershoot or overshoot
around the boundary of
regions of different
intensities.
the intensity of the
stripes is constant but
we actually perceive a
brightness pattern is
strongly scalloped near
17
the boundaries.
Note: it was named for Ernst Mach who discovered the phenomenon in 1865.
18
Simultaneous contrast
20
10
Signals
Vocabulary:
spatiotemporal
: existing
in both
space andduration
time;
having both spatial
extension
and temporal
21
Time-Varying Signals
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.
22
11
Spatially-Varying Signals
f(x,y)
f(x,y,z)
23
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,
or
other time-varying
pictureanimation,
sequence.
24
12
Types of Signals
13
Sampling
Quantization
Quantization = spacing of discrete values in
the range of a signal.
usually thought of as the number of bits per
sample of the signal. e.g., 1 bit per pixel (b/w
images), 16-bit audio, 24-bit color images, etc.
f(t)
8 levels = 23 : uses 3
bits
represent
the
valuetoof
the function.
28
14
f(x,y)
x
15
CAMERA
DIGITIZER
A set of number
in 2D grid
31
Continuous image
projected onto a
sensor array
Result of image
sampling and
quantization
32
16
Light-intensity function
0 < f ( x, y ) <
33
34
17
f ( x, y ) = i ( x , y ) r ( x, y )
0 < i ( x, y ) <
0 < r ( x, y ) < 1
determined by the nature of the objects in
a
scene
bounded from total absorption to
total
reflectance.
35
Gray level
Lmin l Lmax
0 = black , L = white
36
18
Number of bits
L = 2k
Number of bits
required to store a
digitized image
b=MxNxk
M
37
Resolution
19
Checkerboard effect
a
(a) 1024x1024
(b) 512x512
(c) 256x256
(d) 128x128
(e) 64x64
(f) 32x32
False contouring
(a) Gray level = 16
(b) Gray level = 8
(c) Gray level = 4
(d) Gray level = 2
(a)
(b)
(c)
(d)
20
Nonuniform sampling
Example
42
21
Example
background
Nonuniform quantization
22
Neighbors of a pixel
Connectivity
Labeling of Connected Components
Relations, Equivalences, and Transitive
Closure
Distance Measures
Arithmetic/Logic Operations
45
Neighbors of a pixel
N4(p) : 4-neighbors of p
x p x
(x+1, y), (x-1,y),(x,y+1), (x,y-1)
x
x
x x
p x
x x
46
23
Connectivity
8-connectivity :
Example
0 1 1
0 1 0
0 1 1
0 1 1
0 1 0
0 0 1
0 1 0
0 0 1
0 0 1
arrangement
of pixels
8-neighbors
of
the
center pixel
m-neighbors
of
the
center pixel
24
Adjacent
49
Path
50
25
Exercise
4-connected
8-connected
m-connected
51
Labeling of Connected
Components
52
26
Labeling of Connected
Components
53
if p is 0, move on.
if p is 1
27
Distance Measures
55
Euclidean distance
between p and q
De ( p, q ) = ( x s ) + ( y t )
r
q(s,t)
t-y
p(x,y)
s-x
28
City-block distance:
D4 distance
2
2 1 2
2 1 0 1 2
2 1 2
2
D4 ( p, q ) = x s + y t
57
Chessboard distance: D8
distance
D8 ( p, q ) = max( x s + y t )
2 2 2 2 2
2 1 1 1 2
2 1 0 1 2
2 1 1 1 2
2 2 2 2 2
58
29
D4 and D8 distances
m-connectivitys distance
p1
p
p2
0 1
1
distance = 2
0 1
1
distance = 3
1 1
1
distance = 4
60
30
Arithmetic Operators
Division : pq
Logic operations
AND : p AND q
(pq)
OR : p OR q
(p+q)
COMPLEMENT : NOT q ( q )
logic operations apply only to binary images.
arithmetic operations apply to multivalued
pixels.
logic operations used for tasks such as
masking, feature detection, and shape analysis.
logic operations perform pixel by pixel.
62
31
Mask Operation
Z1
Z2
Z3
Z4
Z5
Z6
Z7
Z8
Z9
63
Mask Operation
Z=
1
(Z 1 + Z 2 + Z 3 + K + Z 9 )
9
64
32
Mark operator
In general term:
1
1
1
1
Z 1 + Z 2 + Z 3 + K + Z9
9
9
9
9
= w 1 Z1 + w 2 Z 2 + w 3 Z 3 + K w 9 Z 9
Z =
w Z
i =1
W=
w1 w2 w3
w4 w5 w6
w7 w8 w9
65
Mask coefficient
noise reduction
region thinning
edge detection
33
Image Geometry
Translation
Scaling
Rotation
Concatenation and inverse transformation
67
x* = x + x0
y* = y + y0
z* = z + z0
Translation
Z
x * 1
y * 0
=
z * 0
1 0
(x*,y*,z*)
(x,y,z)
0 x 0 x
0 y 0 y
=
1 z0 z
0 1 1
x0
X
z0
0
1
0
0
y0
68
34
V* = AV
A
V
V*
Translation matrix
1
0
T =
0
0
1
0
0
0
0
1
0
x0
y0
z0
V * = TV
70
35
Scaling
0 0
z* = Szz
y
S=
0
0
0
Sz
0
71
x* = x cos + y sin
y* = -x sin + y cos
z* = z
Rotation
cos
sin
R =
0
sin
cos
0
0
0 0
0 0
1 0
0 1
72
36
Rotation
0
1
0 cos
R =
0 sin
0
0
0
sin
cos
0
0
0
0
1
73
Rotation
cos
0
R =
sin
0 sin
1
0
0
cos
0
0
0
37
cos
sin
R =
0
Exercise
sin
cos
0
0
0 0
0 0
1 0
0 1
75
V * = R ( S (TV ))
= AV
Order is important!!!
76
38