IAP Chapter1 2012
IAP Chapter1 2012
IAP Chapter1 2012
DIP2012
DHT, HCMUT
Outline
1.
2.
3.
Image Compression
4.
5.
Image Segmentation
6.
7.
DIP2012
DHT, HCMUT
References
[1] R. C. Gonzalez, R. E. Woods, Digital Image
Processing, Addison Wesley, 2nd edition (2002), 3rd
edition (2008).
[2] R. C. Gonzalez, R. E. Woods, S. L. Eddins, Digital
Image Processing Using Matlab, Gatesmark
Publishing, 2nd edition (2009)
DIP2012
DHT, HCMUT
Chapter 1:
Digital Image Fundamentals
DIP2012
DHT, HCMUT
1. Digital Image
DIP2012
DHT, HCMUT
Imaging
systems
object
observe
Sample and
quantize
Digital
storage
(disk)
Digital
computer
On-line
buffer
digitize
store
process
Refresh
/store
Display output
Record
DIP2012
DHT, HCMUT
DIP2012
DHT, HCMUT
6464
DIP2012
DHT, HCMUT
255
255
255
255
255
255
255
255
DIP2012
DHT, HCMUT
1. Quantization (2)
256256, 32 gray-levels
10
DIP2012
DHT, HCMUT
1. Quantization (3)
256256, 256 gray-levels
256256, 2 gray-levels
11
DIP2012
DHT, HCMUT
1. Colour Image
12
DIP2012
DHT, HCMUT
1. Gray-level Image
13
DIP2012
DHT, HCMUT
1. Binary Image
14
DIP2012
DHT, HCMUT
15
DIP2012
DHT, HCMUT
1. Image Transforms
Original Image
Fourier Transform
Magnitude
Phase
16
DIP2012
DHT, HCMUT
1. Image Enhancement
High Pass Filtering
Original Image
17
DIP2012
DHT, HCMUT
1. Image Compression
Encoder
g ( x, y )
f ( x, y )
Compressed
Representation
Decoder
g ( x, y )
18
f ( x, y )
DIP2012
DHT, HCMUT
1. Image Analysis
19
DIP2012
DHT, HCMUT
1. Applications
Image processing (medical image processing, satellite/astronomy
image processing, radar image processing, etc.)
Image analysis - computer vision (character/face/hand/gesture
recognitions, content-based browsing and retrieval, medical image
analysis, industrial automation, remote sensing, forensics, robotics,
radar imaging, cartography, etc.)
Virtual reality (applications in manufacturing, medicine,
entertainment, etc.)
Multimedia communication/storage (video processing, digital TV,
video over networks, etc.)
20
DIP2012
DHT, HCMUT
1. Image Model
Image: 2-D light-intensity function, f(x,y): value of f at spatial
coordinates (x,y) gives intensity of image at that point.
(2.1)
0 < f ( x, y ) <
(2.2)
f ( x, y ) = i ( x, y ) r ( x, y )
where i(x,y): illumination (amount of source light incident on the
scene), r(x,y): reflectance (amount of light reflected by the objects in
the scene).
0 < i ( x, y ) <
(2.3)
0 < r ( x, y ) < 1
0 (total absorption), 1 (total reflectance)
In digital image processing, f called gray level G, Lmin < G < Lmax.
Interval [Lmin, Lmax]: gray scale.
In practice, shifting gray scale to [0, L], G = 0: black, G = L: white.
Dept. of Telecomm. Eng.
Faculty of EEE
21
DIP2012
DHT, HCMUT
f ( N 1,0)
f (0,1)
f (1,1)
f ( N 1,1)
f (0, M 1)
f (1, M 1)
=A
f ( N 1, M 1)
(2.4)
22
DIP2012
DHT, HCMUT
Digitizing the
coordinate
values
Digitizing the
amplitude
values
23
DIP2012
DHT, HCMUT
24
DIP2012
DHT, HCMUT
25
DIP2012
DHT, HCMUT
26
DIP2012
DHT, HCMUT
27
DIP2012
DHT, HCMUT
28
DIP2012
DHT, HCMUT
1. Image Interpolation
Interpolation: Process of using known data to estimate unknown values.
E.g., zooming, shrinking, rotating, and geometric correction.
Interpolation (sometimes called resampling): an imaging method to
increase (or decrease) the number of pixels in a digital image.
Some digital cameras use interpolation to produce a larger image than the
sensor captured or to create digital zoom
(http://www.dpreview.com/learn/?/key=interpolation)
29
DIP2012
DHT, HCMUT
30
DIP2012
DHT, HCMUT
31
DIP2012
DHT, HCMUT
32
DIP2012
DHT, HCMUT
33
DIP2012
DHT, HCMUT
0 1 1
0 2 0
0 0 1
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
0 1 1
0 2 0
0 0 1
0 1 1
0 2 0
0 0 1
8-adjacent
m-adjacent
34
DIP2012
DHT, HCMUT
35
DIP2012
DHT, HCMUT
36
DIP2012
DHT, HCMUT
37
DIP2012
DHT, HCMUT
Array
product
operator
Matrix
product
operator
a11
A=
a21
a11b11
A .* B =
a21b21
a11b11 + a12b21
A*B=
a21b11 + a22b21
b11 b12
B=
b21 b22
a12
a22
a12b12
a22b22
a11b12 + a12b22
a21b12 + a22b22
38
Array product
Matrix product
DIP2012
DHT, HCMUT
H [ f ( x, y ) ] = g ( x, y )
H ai fi ( x, y ) + a j f j ( x, y )
Additivity
= H [ ai fi ( x, y ) ] + H a j f j ( x, y )
= ai H [ fi ( x, y ) ] + a j H f j ( x, y )
Homogeneity
= ai gi ( x, y ) + a j g j ( x, y )
H is said to be a linear operator;
H is said to be a nonlinear operator if it does not meet the above
qualification.
39
DIP2012
DHT, HCMUT
p1 p2 p3
w1 w2 w3
p4 p5 p6
w4 w5 w6
p7 p8 p9
w7 w8 w9
p = wi pi p5
i =1
40
DIP2012
DHT, HCMUT
41
DIP2012
DHT, HCMUT
The union of two gray-scale images (sets) A and B is defined as the set:
=
A B {max(a, b) | a A, b B}
z
42
DIP2012
DHT, HCMUT
43
DIP2012
DHT, HCMUT
44
DIP2012
DHT, HCMUT
45
DIP2012
DHT, HCMUT
x' = x + x0
y ' = y + y0
z ' = z + z0
x' 1 0 0
y ' = 0 1 0
z ' 0 0 1
x
x0
y
y0
z
z0
1
x' 1
y ' 0
=
z ' 0
1 0
0 0
1 0
0 1
0 0
x0 x
y0 y
z0 z
1 1
0
Sy
0
0
46
0
0
Sz
0
0
0
0
DIP2012
DHT, HCMUT
sin
cos
0
0
0
0
1
0
0
0
0
0
0
47
0
sin
cos
0
0
0
0
DIP2012
DHT, HCMUT
0 sin
1
0
0
cos
0
48
0
0
0
DIP2012
DHT, HCMUT
M 1
T (u , v) = r ( x, y, u , v) f ( x, y )
x =0
M 1 N 1
49
DIP2012
DHT, HCMUT
M 1 N 1
1
F (u , v) =
MN
f ( x, y )e j 2 (ux / M + vy / N )
x =0 y =0
M 1 N 1
f ( x, y ) = F (u , v)e j 2 ( ux / M +vy / N )
u =0 v =0
Properties:
Separability:
1
F (u , v) =
N
N 1
( j 2ux / N )
x =0
N 1
f ( x, y )e ( j 2vy / N )
y =0
1
f ( x, y ) =
N
N 1
e
u =0
( j 2ux / N )
N 1
F (u, v)e(
j 2vy / N )
v =0
50
DIP2012
DHT, HCMUT
1
F (u , v) =
N
with
N 1
F ( x, v )e (
1
F ( x, v ) = N
N
j 2ux / N )
x =0
N 1
f ( x, y )e
y =0
( j 2vy / N )
51
DIP2012
DHT, HCMUT
Original Image
Magnitude of
Fourier transform
52
Phase of
Fourier transform
DIP2012
DHT, HCMUT
Magnitude
of Fourier
transform
Original
image
Reconstructed
image
Low pass
filter used
53
DIP2012
DHT, HCMUT
High pass
filter used
Reconstructed
image
54
DIP2012
DHT, HCMUT
55
DIP2012
DHT, HCMUT
2 N
2N
x =0 y =0
N 1 N 1
(2 x + 1)u
(2 y + 1)v
f ( x, y ) = (u ) (v)C (u , v) cos
cos
2 N
2N
u =0 v =0
N 1 N 1
1
,
u=0
(u ) = N
2 , u = 1,2,..., N 1
N
56
DIP2012
DHT, HCMUT
F (u , v) = T ( x, y, u , v) f ( x, y )
x =0 y =0
M 1 N 1
f ( x, y ) = I ( x, y, u , v) F (u , v)
u =0 v =0
57
DIP2012
DHT, HCMUT
u
0
58
DIP2012
DHT, HCMUT
59
DIP2012
DHT, HCMUT
60
DIP2012
DHT, HCMUT
61
DIP2012
DHT, HCMUT
Original
DCT
Dept. of Telecomm. Eng.
Faculty of EEE
FFT
62
DIP2012
DHT, HCMUT
63
DIP2012
DHT, HCMUT
Original
64
DIP2012
DHT, HCMUT
L 1
p( z ) =1
k
k =0
m=
z
k =0
p ( zk )
= ( z k m) 2 p ( z k )
2
k =0
65
DIP2012
DHT, HCMUT
un ( z ) =
n
(
)
z
m
p ( zk )
k
k =0
= 31.6
= 14.3
Dept. of Telecomm. Eng.
Faculty of EEE
= 31.6
66
= 49.2
DIP2012
DHT, HCMUT