You are on page 1of 17

1

Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 1
Digital Image Processing
Dr.-Ing. Tuan Do-Hong

Department of Telecommunications Engineering
Faculty of Electrical and Electronics Engineering
HoChiMinh City University of Technology

E-mail: do-hong@hcmut.edu.vn
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 2
Outline
1. Digital Image Fundamentals

2. Image Enhancement and Restoration

3. Image Compression

4. Morphological Image Processing

5. Image Segmentation

6. Image Representation and Description

7. Introduction to Object (Pattern) Recognition



Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 3
References

[1] R. C. Gonzalez, R. E. Woods, Digital Image
Processing, Addison Wesley, 2
nd
edition (2002), 3
rd

edition (2008).
[2] R. C. Gonzalez, R. E. Woods, S. L. Eddins, Digital
Image Processing Using Matlab, Gatesmark
Publishing, 2
nd
edition (2009)


Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 4
Chapter 1:
Digital Image Fundamentals

2
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 5
1. Digital Image
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 6
1. Analog to Digital (1)
Record
output Display
object observe
Imaging
systems
digitize
Sample and
quantize
store
Digital
storage
(disk)
process
Digital
computer
Refresh
/store
On-line
buffer
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 7
1. Analog to Digital (2)
 Computers work with numerical (rather than pictorial) data.

 An image must be converted to numerical form before processing by
computer.







• Picture elements or pixels.

• Rectangular sampling grid.

• (Intensity) Brightness of the image.

Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 8
1. Sampling (Digitization of Spatial Coordinates)
256×256 64×64
3
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 9
1. Quantization (Intensity Digitization) (1)
0 0 0
0 0
0 0
0 0
0
0 0
0 0
0 0
0
255 255
255
255
255
255 255 255
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 10
1. Quantization (2)
256×256, 256 gray-levels 256×256, 32 gray-levels
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 11
1. Quantization (3)
256×256, 2 gray-levels 256×256, 256 gray-levels
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 12
1. Colour Image
4
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 13
1. Gray-level Image
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 14
1. Binary Image
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 15
1. Digital Image Processing
 Manipulation of multidimensional signals
• Image (photo):
• Video:
• CT, MRI:

 Coding/compression

 Enhancement, restoration, reconstruction

 Analysis, detection, recognition, understanding

 Visualization

) , ( y x f
) , , ( t y x f
) , , , ( t z y x f
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 16
1. Image Transforms
Original Image Fourier Transform
Magnitude Phase
5
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 17
1. Image Enhancement
Original Image High Pass Filtering
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 18
1. Image Compression
) , ( y x f
H
) , ( y x g
Compressed
Representation
Decoder
1
H
÷
) , (
ˆ
y x f
) , ( y x g
Encoder
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 19
1. Image Analysis
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 20
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.)


6
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 21
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.




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 (total absorption), 1 (total reflectance)

 In digital image processing, f called gray level G, L
min
< G < L
max
.
Interval [L
min
,

L
max
]: gray scale.
In practice, shifting gray scale to [0, L], G = 0: black, G = L: white.

· < < ) , ( 0 y x f (2.1)
) , ( ) , ( ) , ( y x r y x i y x f =
(2.2)
1 ) , ( 0
) , ( 0
< <
· < <
y x r
y x i
(2.3)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 22
1. Image Sampling & Quantization (1)
 f(x,y) approximated by equally spaced samples in the form of (N×M)-
matrix:




 Matrix A is called digital image, each element of A is called image
element, pixel, or pel.
 Sampling: partitioning xy-plane into grid, coordinates of center of each
grid are (x,y); x,y: integer. Quantization: f is assigned a gray-level value
G (real or integer numbers).
 In practice, N = 2
n
, M = 2
k
, G = 2
m
. Total number of bits required to
store a digital image: N×M×m
 Resolution: degree of discernible detail (how good approximation in
(2.4)), depending on the number of samples (spatial resolution) and
gray-levels (intensity resolution).
A =
(
(
(
(
¸
(

¸

÷ ÷ ÷ ÷
÷
÷
~
) 1 , 1 ( ) 1 , 1 ( ) 0 , 1 (
) 1 , 1 ( ) 1 , 1 ( ) 0 , 1 (
) 1 , 0 ( ) 1 , 0 ( ) 0 , 0 (
) , (
M N f N f N f
M f f f
M f f f
y x f

  


(2.4)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 23
1. Image Sampling & Quantization (2)
Digitizing the
coordinate
values
Digitizing the
amplitude
values
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 24
1. Image Sampling & Quantization (3)
7
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 25
1. Image Sampling & Quantization (4)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 26
1. Image Sampling & Quantization (5)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 27
1. Image Sampling & Quantization (6)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 28
1. Image Sampling & Quantization (7)
8
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 29
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)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 30
1. Relationships Between Pixels (1)
 Neighbors of a pixel: consider a pixel p at (x,y)







o 4-neighbors of p, N
4
(p): neighbors at (x+1,y), (x-1,y), (x,y+1), (x,y-1).

o 4-diagonal neighbors of p, N
D
(p): (x+1,y+1), (x+1,y-1), (x-1,y+1),
(x-1,y-1).

o 8-neighbors of p, N
8
(p): N
4
(p) and N
D
(p).

p
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 31
1. Relationships Between Pixels (2)
 Connectivity: Two pixels are connected if they are adjacent (e.g. 4-
neighbors) and their gray levels satisfy specified criterion of similarity
(e.g. they are equal).

Let V set of gray levels used to define connectivity (e.g. V={1}: binary
image; V={32,33,…,63,64}: gray-scale image).
• 4-connectivity (4-adjacent): p and q are 4-connected if their
values from V and q is in N
4
(p).
• 8-connectivity (8-adjacent): p and q are 8-connected if their
values from V and q is in N
8
(p).
• m-connectivity (m-adjacent, mixed connectivity): p and q are m-
connected if their values from V and
 q is in N
4
(p), or
 q is in N
D
(p) and set S=N
4
(p) · N
4
(q) is empty (pixels e S
are 4-neighbors of both p and q, and whose values are
from V).


Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 32
1. Relationships Between Pixels (3)
• m-connectivity introduced to eliminate ambiguity in path
connections (resulted from allowing 8-connectivity)

0 1 1 0 1 1

0 1 0 0 1 0

0 0 1 0 0 1
8-neighbors of center pixel m-neighbors of center pixel

9
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 33
1. Relationships Between Pixels (4)
 Path
• A (digital) path (or curve) from pixel p with coordinates (x
0
, y
0
) to
pixel q with coordinates (x
n
, y
n
) is a sequence of distinct pixels
with coordinates:
(x
0
, y
0
), (x
1
, y
1
), …, (x
n
, y
n
)

where (x
i
, y
i
) and (x
i-1
, y
i-1
) are adjacent for 1 ≤ i ≤ n. Here n is
the length of the path.

• If (x
0
, y
0
) = (x
n
, y
n
), the path is closed path.

• We can define 4-, 8-, and m-paths based on the type of
connectivity used.

Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 34
1. Relationships Between Pixels (5)
Examples: Connectivity and Path, V = {1, 2}


01,1 11,2 11,3 0 1 1 0 1 1
02,1 22,2 02,3 0 2 0 0 2 0
03,1 03,2 13,3 0 0 1 0 0 1

8-adjacent m-adjacent

The 8-path from (1,3) to (3,3):
(i) (1,3), (1,2), (2,2), (3,3)
(ii) (1,3), (2,2), (3,3)
The m-path from (1,3) to (3,3):
(1,3), (1,2), (2,2), (3,3)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 35
1. Relationships Between Pixels (6)
 Connected in S
Let S represent a subset of pixels in an image. Two pixels p with
coordinates (x
0
, y
0
) and q with coordinates (x
n
, y
n
) are said to be
connected in S if there exists a path:
(x
0
, y
0
), (x
1
, y
1
), …, (x
n
, y
n
)
where

Let S represent a subset of pixels in an image
• For every pixel p in S, the set of pixels in S that are connected to p
is called a connected component of S.
• If S has only one connected component, then S is called
connected set.
• We call R a region of the image if R is a connected set.
• Two regions, R
i
and R
j
are said to be adjacent if their union forms
a connected set.
• Regions that are not to be adjacent are said to be disjoint.




, 0 , ( , )
i i
i i n x y S ¬ s s e
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 36
1. Relationships Between Pixels (7)
 Boundary (or border)
• The boundary of the region R is the set of pixels in the region that
have one or more neighbors that are not in R.
• If R happens to be an entire image, then its boundary is defined as
the set of pixels in the first and last rows and columns of the
image.

 Foreground and background
An image contains K disjoint regions, R
k
, k = 1, 2, …, K. Let R
u
denote
the union of all the K regions, and let (R
u
)
c
denote its complement.

All the points in R
u
is called foreground;
All the points in (R
u
)
c

is called background.

10
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 37
1. Relationships Between Pixels (8)
 Distance measures
Given pixels p, q and z with coordinates (x, y), (s, t), (u, v)
respectively, the distance function D has following properties:
a. D(p, q) ≥ 0 [D(p, q) = 0, iff p = q]
b. D(p, q) = D(q, p)
c. D(p, z) ≤ D(p, q) + D(q, z)

The following are the different distance measures:
a. Euclidean distance:
D
e
(p, q) = [(x - s)
2
+ (y - t)
2
]
1/2

b. City block distance:
D
4
(p, q) = |x - s| + |y - t|
c. Chess board distance:
D
8
(p, q) = max(|x - s|, |y - t|)


Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 38
1. Relationships Between Pixels (9)
 Array vs. Matrix operation
11 12
21 22
b b
B
b b
(
=
(
¸ ¸
11 12
21 22
a a
A
a a
(
=
(
¸ ¸
11 11 12 21 11 12 12 22
21 11 22 21 21 12 22 22
*
a b a b a b a b
A B
a b a b a b a b
+ + (
=
(
+ +
¸ ¸
11 11 12 12
21 21 22 22
.*
a b a b
A B
a b a b
(
=
(
¸ ¸
Array product
Matrix product
Array
product
operator
Matrix
product
operator
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 39
1. Relationships Between Pixels (10)
 Linear vs. Nonlinear operation
| | ( , ) ( , ) H f x y g x y =
| |
| |
( , ) ( , )
( , ) ( , )
( , ) ( , )
( , ) ( , )
i i j j
i i j j
i i j j
i i j j
H a f x y a f x y
H a f x y H a f x y
a H f x y a H f x y
a g x y a g x y
( +
¸ ¸
( = +
¸ ¸
( = +
¸ ¸
= +
Additivity
Homogeneity
H is said to be a linear operator;
H is said to be a nonlinear operator if it does not meet the above
qualification.

Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 40
1. Relationships Between Pixels (11)
 Arithmetic operation
• Arithmetic operations between 2 pixels p and q: addition,
subtraction, multiplication, division (carry out pixel by pixel).
• Mask (window) operation:







with proper selection of coefficients, the operation is used for noise
reduction, region thinning, edge detection.

p
7
p
4
p
1
p
6
p
3
p
8
p
5
p
2
p
9
w
7
w
4
w
1
w
6
w
3
w
8
w
5
w
2
w
9
5
9
1
p p w p
i
i i
÷ =
¿
=
11
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 41
1. Relationships Between Pixels (12)
Example of average window:
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 42
1. Relationships Between Pixels (13)
 Set and Logical operations
Let A be the elements of a gray-scale image.
The elements of A are triplets of the form (x, y, z), where x and y are
spatial coordinates and z denotes the intensity at the point (x, y).


The complement of A is denoted A
c




The union of two gray-scale images (sets) A and B is defined as the set:



{( , , ) | ( , )} A x y z z f x y = =
{( , , ) | ( , , ) }
2 1; is the number of intensity bits used to represent
c
k
A x y K z x y z A
K k z
= ÷ e
= ÷
{max( , ) | , }
z
A B a b a A b B = e e
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 43
1. Relationships Between Pixels (14)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 44
1. Relationships Between Pixels (15)
12
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 45
1. Relationships Between Pixels (16)
Logic operations: used for feature detection, shape analysis, binary
image processing.

Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 46
1. Imaging Geometry (1)
 Translation: A point (x, y, z) is shifted to new position at (x’, y’, z’) by
using displacements (x
0
, y
0
, z
0
):





¬ Matrix form: v’=Tv.

 Scaling: by factors S
x
, S
y
, S
z
along the x, y, z axes given by



0
0
0
'
'
'
z z z
y y y
x x x
+ =
+ =
+ =
(
(
(
(
¸
(

¸

(
(
(
¸
(

¸

=
(
(
(
¸
(

¸

1
1 0 0
0 1 0
0 0 1
'
'
'
0
0
0
z
y
x
z
y
x
z
y
x
¬ ¬
(
(
(
(
¸
(

¸

(
(
(
(
¸
(

¸

=
(
(
(
(
¸
(

¸

1 1 0 0 0
1 0 0
0 1 0
0 0 1
1
'
'
'
0
0
0
z
y
x
z
y
x
z
y
x
(
(
(
(
¸
(

¸

=
1 0 0 0
0 0 0
0 0 0
0 0 0
z
y
x
S
S
S
S
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 47
1. Imaging Geometry (2)
 Rotation:
• Rotation of a point about z-coordinate by an angle u :





• Rotation of a point about x-coordinate by an angle o:

(
(
(
(
¸
(

¸

÷
=
1 0 0 0
0 1 0 0
0 0 cos sin
0 0 sin cos
u u
u u
u
R
(
(
(
(
¸
(

¸

÷
=
1 0 0 0
0 cos sin 0
0 sin cos 0
0 0 0 1
o o
o o
o
R
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 48
1. Imaging Geometry (3)
• Rotation of a point about y-coordinate by an angle | :








(
(
(
(
¸
(

¸
÷
=
1 0 0 0
0 cos 0 sin
0 0 1 0
0 sin 0 cos
o |
| |
|
R
13
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 49
1. Image Transforms: General Form




1
0
( , ) ( , , , ) ( , )
M
x
T u v r x y u v f x y
÷
=
=
¿
1 1
0 0
( , ) ( , , , ) [ ( , )]
M N
u v
g x y s x y u v R T u v
÷ ÷
= =
=
¿¿
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 50
1. Image Transforms: 2-D Fourier Transform (1)
 Definition:





 Properties:
• Separability:



for u, v = 0, 1…., N-1.



for x, y = 0, 1…., N-1.
¿¿
÷
=
÷
=
+ ÷
=
1
0
1
0
) / / ( 2
) , (
1
) , (
M
x
N
y
N vy M ux j
e y x f
MN
v u F
t
¿ ¿
÷
=
÷
=
+
=
1
0
1
0
) / / ( 2
) , ( ) , (
M
u
N
v
N vy M ux j
e v u F y x f
t
( ) ( )
¿ ¿
÷
=
÷
÷
=
÷
=
1
0
/ 2
1
0
/ 2
) , (
1
) , (
N
y
N vy j
N
x
N ux j
e y x f e
N
v u F
t t
( ) ( )
¿ ¿
÷
=
÷
=
=
1
0
/ 2
1
0
/ 2
) , (
1
) , (
N
v
N vy j
N
u
N ux j
e v u F e
N
y x f
t t
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 51
1. Image Transforms: 2-D Fourier Transform (2)
Advantage of separability property: F(u,v) or f(x,y) can be
obtained in 2 steps by successive applications of the 1-D Fourier
transform or its inverse:



with



• Others: translation, periodicity and conjugate symmetry, rotation,
scaling….
( )
¿
÷
=
÷
=
1
0
/ 2
) , (
1
) , (
N
x
N ux j
e v x F
N
v u F
t
( )
(
¸
(

¸

=
¿
÷
=
÷
1
0
/ 2
) , (
1
) , (
N
y
N vy j
e y x f
N
N v x F
t
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 52
1. Image Transforms: 2-D Fourier Transform (3)
Examples of 2-D Fourier transform:
Original Image Magnitude of
Fourier transform
Phase of
Fourier transform
14
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 53
1. Image Transforms: 2-D Fourier Transform (4)
Original
image
Magnitude
of Fourier
transform
Low pass
filter used
Reconstructed
image
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 54
1. Image Transforms: 2-D Fourier Transform (5)
High pass
filter used
Reconstructed
image
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 55
1. Image Transforms: 2-D Fourier Transform (6)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 56
1. Image Transforms: 2-D DCT (1)
 DCT (Discrete Cosine Transform):



for u, v = 0, 1…., N-1, and



for x, y = 0, 1…., N-1.
where


(
¸
(

¸
+
(
¸
(

¸
+
=
¿¿
÷
=
÷
=
N
v y
N
u x
y x f v u v u C
N
x
N
y
2
) 1 2 (
cos
2
) 1 2 (
cos ) , ( ) ( ) ( ) , (
1
0
1
0
t t
o o
(
¸
(

¸
+
(
¸
(

¸
+
=
¿¿
÷
=
÷
=
N
v y
N
u x
v u C v u y x f
N
u
N
v
2
) 1 2 (
cos
2
) 1 2 (
cos ) , ( ) ( ) ( ) , (
1
0
1
0
t t
o o
¦
¦
¹
¦
¦
´
¦
÷ =
=
=
1 ,..., 2 , 1 ,
2
0 ,
1
) (
N u
N
u
N
u o
15
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 57
1. Image Transforms: 2-D DCT (2)
 2-D general transform:






where T(x,y,u,v) and I(x,y,u,v) are forward and inverse transform
kernel (basis functions), respectively. The basis function depends
only on the indexes u, v, x, y, not on the values of image or its
transform.
¿¿
÷
=
÷
=
=
1
0
1
0
) , ( ) , , , ( ) , (
M
x
N
y
y x f v u y x T v u F
¿¿
÷
=
÷
=
=
1
0
1
0
) , ( ) , , , ( ) , (
M
u
N
v
v u F v u y x I y x f
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 58
1. Image Transforms: 2-D DCT (3)
Example of basis functions of 2-D DCT, N=4:
0
1
2
3
0 1 2 3
u
v
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 59
1. Image Transforms: 2-D DCT (4)
Example of basis functions of 2-D DCT, N=8:

Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 60
1. Image Transforms: 2-D DCT (5)
• DCT is a real transform.
• There are fast algorithms to compute the DCT similar to the FFT.
• DCT has excellent energy compaction properties.


16
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 61
1. Image Transforms: 2-D DCT (6)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 62
1. Image Transforms: 2-D DCT (7)
DCT FFT
Original
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 63
1. Image Transforms: 2-D DCT (8)
Transform (DCT) Transform (DCT)
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 64
1. Image Transforms: 2-D DCT (9)
Original Reconstructed from IDCT, (J < 5)
Reconstructed from IDCT, (J < 10) Reconstructed from IDCT, (J < 20)
17
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 65
1. Probabilistic Methods (1)
Let , 0, 1, 2, ..., -1, denote the values of all possible intensities
in an digital image. The probability, ( ), of intensity level
occurring in a given image is estimated as

i
k
k
z i L
M N p z
z
=
×
( ) ,
where is the number of times that intensity occurs in the image.
k
k
k k
n
p z
MN
n z
=
1
0
( ) 1
L
k
k
p z
÷
=
=
¿
1
0
The mean (average) intensity is given by
= ( )
L
k k
k
m z p z
÷
=
¿
1
2 2
0
The variance of the intensities is given by
= ( ) ( )
L
k k
k
z m p z o
÷
=
÷
¿
Dept. of Telecomm. Eng.
Faculty of EEE

DIP2012
DHT, HCMUT 66
1. Probabilistic Methods (2)
14.3 o =
th
1
0
The moment of the intensity variable is
( ) = ( ) ( )
L
n
n k k
k
n z
u z z m p z
÷
=
÷
¿
31.6 o =
Example: Comparison of standard deviation values
49.2 o = 31.6 o =