0% found this document useful (0 votes)
21 views

Module 4

Uploaded by

abdul.azeez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Module 4

Uploaded by

abdul.azeez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 131

MODULE-4

RBT Level:- L1, L2, L3


• Color Image Processing: Color Fundamentals, Color Models, Pseudocolor Image
Processing.
• Wavelets: Background, Multiresolution Expansions.
• Morphological Image Processing: Preliminaries, Erosion and Dilation, Opening
and Closing, The Hit-or-Miss Transforms, Some Basic Morphological Algorithms.

[Text: Chapter 6: Sections 6.1 to 6.3,


Chapter 7: Sections 7.1 and 7.2,
Chapter 9: Sections 9.1 to 9.5]

1
Preview

 Motive
- Color is a powerful descriptor that often simplifies
object identification and extraction from a scene.
- Human can discern thousands of color shades and
intensities, compared to about only two dozen
shades of gray.

2
Preview
 Color image processing is divide into two major area:
 Full-Color Processing
 Pseudo-Color Processing

 In Full Color Processing the image in question typically are acquired


with a Full-Color sensor e.g. Color TV camera or Color Scanner

 In Pseudo-color Processing the problem is of assigning a color to a


particular monochrome intensity or a range of intensities

3
Color Fundamentals

• In The human brain in perceiving and interpreting color is a


physiopsychological phenomenon .
• this is not fully understood,
• The physical nature of color can be expressed on a formal basis by
experimental and theoretical results.

4
Color Fundamentals (con’t)

• Color spectrum may be divided into 6 broad regions: violet,


blue, green, yellow, orange and red.
• But when viewed in full color, no color in the spectrum ends
abruptly rather each color blends smoothly into next.
• The colors that humans and some animals
perceive in an object are determined by the
nature of light reflected from the object

5
Color Fundamentals (con’t)

6
Physical Background

• Visible light: a narrow band of


electromagnetic radiation →
380nm (blue) - 780nm
(red)

• Wavelength: Each physically


distinct colour corresponds to
at least one wavelength in this
band.

7
Achromatic vs Chromatic Light

• Characterization of light is central to the science of color.

• Achromatic (void of color) Light: Its only attribute is its


‘Intensity’ or amount

• Chromatic Light: spans the electromagnetic spectrum from


approximately 400 to 700nm

8
Quantities for description of Chromatic Source of
Light

• Three basic quantities are used to describe the quantity of a


chromatic source of light:

• Radiance

• Luminance

• Brightness

9
Radiance

• The total amount of Energy that flows from a Light Source

• It is measured in Watts

10
Luminance

• Luminance gives a measure of amount of energy an observer perceives from


a light source (measured in Lumens(lm) )

• For example light emitted from a source operating in Infrared region of


Spectrum could have significant energy (Radiance) but a human observer will
hardly perceive it so luminance is zero.

11
Brightness

• It is a subjective measure

• It embodies the achromatic notion of intensity and is one of the key


factors in describing color sensation

12
Human Perception

• Cones are the sensors in the eye responsible for color vision.

• Detailed experimental evidences has established that the 6


to 7 million cones in the human eye can be divided into
three principal sensing categories, corresponding roughly to
red, green and blue

• Approximately 65% of all cones are sensitive to Red Light,


33% are sensitive to Green Light and about 2% are
sensitive to Blue Light (most sensitive)

13
Human Perception

• In 1931, International commission on illumination


designated the following wavelengths values to 3
primary colors:
blue=435.8nm
green= 546.1 nm
red= 700nm

14
Absorption of Light by red, green and blue
cones in Human Eye
Standard wavelength values for the
primary colors

• Mixing the three primaries or a secondary with its


opposite primary colors in the right intensities produces
white light
15
Human Perception

• Due to these absorption characteristic of Human Eye


colors are seen as variable combinations of the so-
called ‘Primary Colors’ Red, Green and Blue
• In 1931, International commission on illumination
designated the following wavelengths values to 3
primary colors:
blue=435.8nm
green= 546.1 nm
red= 700nm
• The primary colors can be added to produce secondary
colors of Light

• Magenta (Red+Blue)
• Cyan (Green+Blue)
• Yellow (Red+Green)

16
Primary Color of Light vs Primary Color of Pigments

• Red, Green and Blue Colors are Primary Colors of Light

• In Primary Color of Pigments a primary color is defined as


the one that subtracts or absorbs a primary color of Light and
reflects or transmits the other two

• Therefore the Primary Colors of Pigments are Magenta, Cyan


and Yellow and secondary colors are Red, Green and Blue

• A proper combination of three pigment primaries or a


secondary with its opposite primary produces Black

• Color Television Reception is an example of the additive nature


of Light Colors

17
Color Fundamentals (con’t)

18
19
Color Fundamentals (con’t)

e characteristics generally used to


 Th
distinguish one color from another
are
Hue
Saturation.
 Brightness,

20
 Hue:
 It is a Attribute
 It is having dominant wavelength
 Represents dominant color as perceived by an
observer.
 red,
 orange
 yellow it means we are refering to its hue.

21
 Saturation: Relative purity or the amount of white light
mixed with a hue.

 colors such as pink(red+ white),


 lavender(violet + white) are less saturated.
 Degree of saturation is inversely proportional to the
amount of white light added.
 Hue and saturation taken together are called Chromaticity,
and therefore, a color may be characterized by its
Brightness and Chromaticity

22
Brightness

• It is a subjective descriptor
• It Not possible to measure
• It embodies the achromatic notion of
intensity and
• It is one of the key factors in describing
color sensation

23
Color Fundamentals (con’t)

 Tri-stimulus values: The amount of Red, Green and Blue


needed to form any particular color
Denoted by: X, Y and Z respectively
A color is then specified by its “Tri-chromatic
Coefficients”

 Tri-chromatic coefficient:

X Y Z
x y z
X Y  Z X Y  Z X Y  Z

x  y  z 1

24
Chromaticity Diagram

• Another approach for specifying colors is to use chromaticity diagram

• Shows color compositions as a function of x(red) and y(green)

• For any x and y the corresponding value of z(blue) can be obtained as

z=1-x-y
Green Point =
62% green,
25% red,
13% blue.
25
Chromaticity Diagram

Chromaticity Diagram

26
Chromaticity Diagram

 To determine the range of


colors that can be obtained
from the 3 given colors in the
CD, we simply draw
connecting lines to each of
the three color points.
 The result is a triangle and
any color inside a triangle is
produced by various
combinations of the three
initial colors.
 The triangle shows a
typical range of colors
(called the color gamut)
produced by RGB monitor
27
Chromaticity Diagram(con’t)

Color Gamut
produced by RGB
monitors

Color Gamut
produced by high
quality color printing
device

28
Color Models

The purpose of a color model (also called Color


Space or Color System) is to facilitate the
specification of colors in some standard way

A color model is a specification of a coordinate


system and a subspace within that system where
each color is represented by a single point

• Color Models
RGB (Red, Green, Blue)
CMY (Cyan, Magenta, Yellow)
CMYK (CMY, black) model for color printing.
HSI (Hue, Saturation, Intensity)
YIQ (Luminance,In phase, Quadrature)
YUV (Y' stands for the luma component (the brightness)
and U and V are the chrominance (color) components )
29
RGB Model

• Each color is represented


in its primary color
components Red, Green
and Blue

• This model is based on


Cartesian Coordinate
System

30
RGB Model

• In this model, the primary colors are red, green, and blue. It is
an additive model, in which colors are produced by adding
components, with white having all colors present and black
being the absence of any color.

• This is the model used for active displays such as television


and computer screens.

• The RGB model is usually represented by a unit cube with one


corner located at the origin of a three-dimensional color
coordinate system, the axes being labeled R, G, B, and having
a range of values [0, 1]. The origin (0, 0, 0) is considered
black and the diagonally opposite corner (1, 1, 1) is called
white. The line joining black to white represents a gray scale
and has equal components of R, G, B.

31
• In RGB color model, a color image is represented
as 3 separate sub images.
• Each of RGB sub image is monochromatic. The sub
image are combined on phosphor screen to
produce a composite color image.
• The no. of bits used to represent each pixel in RGB
space is called as the pixel depth.

32
The RGB Color Models
(con’t)

If each of RGB images


are 8 bits ,pixel is said to
have a depth of= 3x 8
bits=24 bits.

24 bit RGB color image


is often called as full
color image.

 total no. of colors =


2 
8 3
 16,777 ,216 Colors
33
The RGB Color Models (con’t)

34
The RGB Color Models (con’t)
Safe RGB Colors (Safe Web colors)

35
The RGB Color Models (con’t)

36
The CMY and CMYK Color Models

 Cyan, Magenta and Yellow are the secondary colors


of light
 Most devices that deposit colored pigments on
paper, such as color printers and copiers, require CMY
data input.

37
CMY and CMYK Color Model
• Cyan, magenta, and yellow are the secondary colors with respect to the
primary colors of red, green, and blue. However, in this subtractive model,
they are the primary colors and red, green, and blue, are the secondaries.
In this model, colors are formed by subtraction, where adding different
pigments causes various colors not to be reflected and thus not to be seen.
Here, white is the absence of colors, and black is the sum of all of them.
This is generally the model used for printing.

• Most devices that deposit color pigments on paper (such as Color Printers
and Copiers) requires CMY data input or perform RGB to CMY conversion
internally

C 1.00 R

M = 1.00
- G

Y 1.00 B

38
CMY and CMYK Color Model

• CMY is a Subtractive Color Model

• Equal amounts of Pigment primaries (Cyan, Magenta and Yellow) should


produce Black

• In practice combining these colors for printing produces a “Muddy-Black” color

• So in order to produce “True-Black” a fourth color “Black” is added giving rise


to CMYK model

39
CMY Color Model

40
CMY Color Model

41
HSI Color Model

• Hue (dominant colour seen)


• Wavelength of the pure colour observed in the signal.
• Distinguishes red, yellow, green, etc.
• More the 400 hues can be seen by the human eye.

• Saturation (degree of dilution)


• Inverse of the quantity of “white” present in the signal.
A pure colour has 100% saturation, the white and grey
have 0% saturation.
• Distinguishes red from pink, marine blue from royal
blue, etc.
• About 20 saturation levels are visible per hue.

• Intensity
• Distinguishes the gray levels.
42
HSI Color Model

• Separates out intensity I from the coding

• Two values (Hue & Saturation) encode chromaticity

• Intensity encode monochrome part.

• Hue and saturation of colors respond closely to the way


humans perceive color, and thus this model is suited for
interactive manipulation of color images .

43
The HSI Color Models

44
The HSI Color Models

45
The HSI Color Models

46
The HSI Color Models
 Converting colors from RGB to HSI

1
I  ( R  G  B)
3
47
The HSI Color Models

 Converting colors from HIS to RGB


 RG sector :
0   H  120 

B  I (1  S )

G  3I  ( R  B )

48
The HSI Color Models

 Converting colors from HIS to RGB


 GB sector :
120   H  240 

H  H  120
R  I (1  S )

B  3I  ( R  G )

49
The HSI Color Models

 Converting colors from HIS to RGB


 BR sector :
240   H  360 

H  H  240
G  I (1  S )

R  3I  (G  B)

50
The HSI Color Models

51
The HSI Color Models
RGB H H S

S I I RGB

52
Pseudocolor Image Processing

 Pseudo color (also called false color) image processing consists of assigning
colors to gray values based on a specified criterion.

 The principal use of pseudo color is for human visualization and interpretation
of gray-scale events in an image or sequence of images.

53
Contd…

• Generally, the eye cannot distinguish more than


about 50 gray levels in an image. Thus subtle
detail can easily be lost in looking at gray scale
images. To enhance variations in gray level and
make them more obvious, gray scale images are
frequently pseudo-colored, where each gray scale
(generally at least 256 levels for most displays) are
mapped to a color level through a LUT. The eye is
extremely sensitive to color and can distinguish
thousands of color values in a picture.

54
Pseudo-Coloring using LUT

• CLUT(Color lookup table):: A mapping of a pixel


value to a color value shown on a display device.

 For example, in a grayscale image with levels 0, 1, 2, 3,


and 4, pseudocoloring is a color lookup table that maps
0 to black, 1 to red, 2 to green, 3 to blue, and 4 to white.

55
Intensity Slicing

The technique of intensity slicing or density slicing or color


coding is one of the simplest example of Pseudo-color image
processing

56
Intensity Slicing (con’t)

57
Gray Level to Color Transformations

Perform three independent transformations on the gray


level of any input pixel.

The three results can then serve as the red, green, and
blue components of a color image

This method produces a composite image whose color


content is modulated by the nature of the transformation
functions.

Note that these are transformation on the gray-leve values


of an image and are not function of position.
58
Gray Level to Color Transformations

59
Gray Level to Color Transformations

60
Gray Level to Color Transformations

61
Gray Level to Color Transformations

62
Gray Level to Color Transformations

63
Basics of Full Color Image Processing

• Full color image processing fall into 2 categories.


• In 1st category we process each component image
individually and then form a composite processed color
image from the individually processed component.
• In 2nd category we work with color pixels directly. Because
full color images have at least three components, color
pixels are really vectors.

64
Basic of Full Color Image Processing
Let c represent an arbitrary vector in RGB color space

For an image of size M*N,

65
COLOR IMAGE PROCESSING
PRIVIOUS QUESTIONS PAPER QUESTIONS

 DESCRIBE RGB COLOR MODEL WITH THE HELP OF NEAT


DIAGRAM. WRITE EQUATIONS TO CONVERT RGB TO CMY.....?

 WHAT IS PSEUDO COLOR ...?

EXPLAIN ANY ONE TYPE OF PSEUDO COLOUR PROCESSING


WITH A NEAT BLOCK DIAGRAM....?

 EXPLAIN WITH BLOCK DIAGRAM OF FULL COLOR IMAGE


PROCESSING....?

66
MODULE 4
RBT Level:- L1, L2, L3
• Color Image Processing: Color Fundamentals, Color Models,
Pseudocolor Image Processing.
• Wavelets: Background, Multiresolution Expansions.
• Morphological Image Processing: Preliminaries, Erosion and
Dilation, Opening and Closing, The Hit-or-Miss Transforms,
Some Basic Morphological Algorithms.

[Text: Chapter 6: Sections 6.1 to 6.3,


Chapter 7: Sections 7.1 and 7.2,
Chapter 9: Sections 9.1 to 9.5]

67
Digital Image Processing

Wavelets and Multiresolution Processing


(Background)

68
Contents
• Image pyramids
• Subband coding
• The Haar transform
• Multiresolution analysis
• Series expansion
• Scaling functions
• Wavelet functions
• Wavelet series
• Discrete wavelet transform (DWT)
• Fast wavelet transform (FWT)
• Wavelet packets

69
Introduction
Unlike the Fourier transform, which decomposes a
signal to a sum of sinusoids, the wavelet transform
decomposes a signal (image) to small waves of varying
frequency and limited duration.
The advantage is that we also know when (where) the
frequency appear.
Many applications in image compression, transmission,
and analysis.
We will examine wavelets from a multiresolution point
of view and begin with an overview of imaging
techniques involved in multiresolution theory.
70
Introduction (cont...)
Small objects are viewed
at high resolutions.

Large objects require only


a coarse resolution.

Images have locally


varying statistics resulting
in combinations of edges,
abrupt features and
homogeneous regions.

71
Image Pyramids
Originally devised for machine vision and image
compression.
It is a collection of images at decreasing resolution levels.
Base level is of size 2Jx2J or NxN.
Level j is of size 2jx2j.

72
Image Pyramids (cont…)
Approximation pyramid:
At each reduced resolution level we have a filtered and
downsampled image.

f2 (n)  f (2n)

73
Image Pyramids (cont…)
Prediction pyramid:
A prediction of each high resolution level is obtained by
upsampling (inserting zeros) the previous low resolution
level (prediction pyramid) and interpolation (filtering).

 f (n / 2) if n is even
f 2 (n)  
 0 otherwise

74
Image Pyramids (cont…)
Prediction residual pyramid:
At each resolution level, the prediction error is retained along with
the lowest resolution level image.
The original image may be reconstructed from this information.

75
Image Pyramids (cont…)

Approximation pyramid

Prediction residual pyramid

76
Subband Coding
An image is decomposed to a set of
bandlimited components (subbands).

The decomposition is carried by filtering and


downsampling.

If the filters are properly selected the image


may be reconstructed without error by
filtering and upsampling.

77
Subband Coding (cont…)

78
Subband Coding (cont…)
A two-band subband coding

Approximation filter
(low pass)

Detail filter (high pass)

79
Subband Coding (cont…)
The goal of subband coding
is to select the analysis and
synthesis filters in order to
have perfect reconstruction
of the signal.

It may be shown that the


synthesis filters should be
modulated versions of the
analysis filters with one (and
only one) synthesis filter
being sign reversed of an
analysis filter.
80
Subband Coding (cont…)
The analysis and synthesis
filters should be related in
one of the two ways:

g 0 (n)  (1) n h1 (n)


g1 (n)  (1) n 1 h0 (n)
or
g 0 (n)  (1) n 1 h1 (n)
g1 (n)  (1) n h0 (n)
These filters are called cross-modulated.
81
Subband Coding (cont…)
Also, the filters should be biorthogonal:
hi (2n  k ), g j (k )   (i  j ) (n), i, j  {0,1}

Of special interest in subband coding are filters that move


beyond biorthogonality and require to be orthonormal:
gi (n), g j (n  2m)   (i  j ) (m), i, j  {0,1}

In addition, orthonormal filters satisfy the following conditions:


gi (n)  (1) n g 0 ( K even  1  n)
hi (n)  gi ( K even  1  n), i  {0,1}

where the subscript means that the size of the filter should be
82
even.
Subband Coding (cont…)
gi (n)  (1) n g 0 ( K even  1  n)
hi (n)  gi ( K even  1  n), i  {0,1}

Synthesis filters are related by order reversal and


modulation.
Analysis filters are both order reversed versions of the
synthesis filters.
An orthonormal filter bank may be constructed around
the impulse response of g0 which is called the prototype.
1-D orthonormal filters may be used as 2-D separable
filters for subband image coding.

83
Subband Coding (cont…)
Approximation
subband

Vertical subband

Horizontal
subband

Diagonal
subband

84
Subband Coding (cont…)
The subbbands may be subsequently split into
smaller subbands.
Image synthesis is obtained by reversing the
procedure.

85
Subband Coding (cont…)
The wavy lines are due to aliasing of the barely discernable
window screen. Despite the aliasing, the image may be
perfectly reconstructed.

86
The Haar Transform
It is due to Alfred Haar [1910].
Its basis functions are the simplest known
orthonormal wavelets.
The Haar transform is both separable and
symmetric:
T=HFH,
F is a NxN image and H is the NxN
transformation matrix and T is the NxN
transformed image.
Matrix H contains the Haar basis functions.
87
The Haar Transform (cont…)
The Haar basis functions hk(z) are defined for in
0≤ z ≤1, for k=0,1,…, N-1, where N=2n.

To generate H:
• we define the integer k=2p+q-1, with 0≤ p ≤N-1.
• if p=0, then q=0 or q=1.
• if p≠0, 1≤q ≤2p

For the above pairs of p and q, a value for k is


determined and the Haar basis functions are
computed. 88
The Haar Transform (cont…)
1
h0 ( z )  h00 ( z )  , z  [0,1]
N

 2p/2 (q  1) / 2 p  z  (q  0.5) / 2 p
1  p/2
hk ( z )  hpq ( z )  ,  2 (q  0.5) / 2 p  z  q / 2 p
N 
 0 otherwise, z  [0,1]

The ith row of a NxN Haar transformation


matrix contains the elements of hk(z) for z=0/N,
1/N, 2/N,…, (N-1)/N. 89
The Haar Transform (cont…)
For instance, for N=4, p,q and k have the following
values: k p q
0 0 0
1 0 1
2 1 1
3 1 2

and the 4x4 transformation matrix is:


 1 1 1 1 
 1 1 1 1 
1 
H4 
4 2  2 0 0 
 
 0 0 2  2 
90
The Haar Transform (cont…)
Similarly, for N=2, the 2x2 transformation matrix is:

1 1 1 
H2   
2 1 1

The rows of H2 are the simplest filters of length 2


that may be used as analysis filters h0(n) and h1(n) of
a perfect reconstruction filter bank.
Moreover, they can be used as scaling and wavelet
vectors (defined in what follows) of the simplest and
oldest wavelet transform.
91
An introductory example to wavelet analysis
Combination of the key
features examined so far:
• pyramids,
• subband coding,
• the Haar transform.

The decomposition is called


the discrete wavelet
transform and it will be
developed later in the
course.
92
An introductory example to wavelet analysis
(cont…)
With the exception of the
upper left image, the
histograms are very similar
with values close to zero.
This fact may be exploited
for compression purposes.

The subimages may be


used to construct coarse
and fine resolution
approximations.
93
An introductory example to wavelet analysis
(cont…)
The decomposition was obtained
by subband coding in 2-D.

After the generation of the four


subbands, the approximation
subband was further decomposed
into four new subbands (using the
same filter bank). The procedure
was repeated for the new
approximation subband.

This procedure characterizes the


wavelet transform as the
subimages become smaller in size.
94
An introductory example to wavelet analysis
(cont…)
This is not the Haar transform
of the image. The Haar
transform of the image is
different.

Although these filter bank


coefficients were taken by the
Haar transformation matrix,
there is a variety of
orthonormal filters that may
be used.
95
An introductory example to wavelet analysis
(cont…)
Each subimage represents a
specific band of spatial
frequencies in the original
image.

Many of the subimages


demonstrate directional
sensitivity (e.g. the subimage
in the upper right corner
captures horizontal edge
information in the original
image).
96
7.2 Multiresolution Expansions

• Multiresolution analysis (MRA)


• A scaling function is used to create a series of
approximations of a function or image, each differing
by a factor of 2.
• Additional functions, called wavelets, are used to
encode the difference in information between
adjacent approximations.

97
98
Contd..
7.2.1 Series Expansions
A signal f(x) can be expressed as a linear combination of expansion
functions:
f ( x)    k k ( x)
A function can be expressedkas

 k  k ( x), f ( x)   k* ( x) f ( x)dx


where
 k ( x) Dual function of  k ( x)
* Complex conjugate operation

99
Contd..
• Series Expansions
Orthonormal basis  k ( x)   k ( x)
0 jk
 j ( x), k ( x)  
1 jk

biorthogonal
 j ( x), k ( x)  0 jk
0 jk
 j ( x), k ( x)  
1 jk
100
• A signal f(x) can be expressed as a linear combination of
expansion functions: f ( x)    ( x)

k
k k

• Case 1: orthonormal basis:  j ( x),k ( x)   jk


• Case 2: orthogonal basis:  j ( x),k ( x)  0 j  k
• Case 3: frame: A f ( x ) 2   ( x ), f ( x) 2  B f ( x) 2
k
k

101
7.2.2 Scaling functions
• Scaling functions
Integer translations and binary scaling's of a scaling function  ( x)

 j ,k ( x)  2  (2 x  k )
j/2 j

Express f ( x ) as the combination of  j , k ( x)


0

f ( x)   k j0 ,k ( x)
k

102
103
0 0  x  1
 ( x)  
1 otherwise
1
0,k ( x)  1,2 k ( x)
2
1
 1,2 k 1 ( x)
2

f ( x)  0.51,0 ( x)
1,1 ( x)  0.251,4 ( x)

104
Multiresolution Expansions
 ( x)
• Scaling functions
Dilation equation for scaling function
 ( x)   h (n) 2 (2 x  n)
n h (0)  h (1)  1 2
h (n) are called scaling function coefficients
Example: Haar wavelet,
1   1  2 (2 x  1) 
 ( x)  2 (2 x )
2  2 

105
106
Multiresolution Expansions
• Wavelet functions  ( x)   h (n) 2 (2 x  n)
n

h (n) are called wavelet function coefficients


Translation and scaling of  ( x )
 j ,k ( x)  2 j / 2 (2 j x  k )
 condition for orthogonal wavelets
h (n)  (1)n h (1  n)
107
108
Haar Wavelet

 1 0  x  0.5

 ( x)  1 0.5  x  1
 0 elsewhere

109
Wavelet Transform: 1-D

f ( x)   c j0  j0 ,k ( x)    d j (k ) j ,k ( x)
• Wavelet series expansion
k j  j0 k

 wherec (k )  f ( x),  ( x) 
j0 j0 , k  f ( x) j0 , k ( x)dx

d j (k )  f ( x), j ,k ( x)   f ( x) j ,k ( x)dx

110
1
y ( x)  0,0 ( x)
3
1
  0,0 ( x)
4
2
  1,0 ( x)
32
3 2
  1,1 ( x)
32
......

111
Wavelet Transform: 1-D
1
( x) 
• Discrete Waveletf Transform 
M k
W ( j0 , k ) j0 ,k ( x)

1 
  
M j  j0 k
W ( j , k ) j ,k ( x)

1
 where
Approximation
coefficients W ( j0 , k ) 
M
 f ( x)
x
j0 , k ( x)

1
 f ( x)
Detail coefficients
W ( j , k )  j ,k ( x)
M x

112
Fast Wavelet Transform: Decomposition
W ( j, k )  h (n) W ( j  1, n) n  2 k ,k 0

W ( j, k )  h (n) W ( j  1, n) n  2 k , k 0

113
Fast Wavelet Transform: Decomposition

114
Example: Haar Wavelet
1 2 n0
1/ 2 n  0,1 
h (n)   h (n)  1 2 n 1
 0 otherwise  0 otherwise


115
Fast Wavelet Transform:
Reconstruction
W ( j  1, k )  h (k ) W ( j, k )  h (k ) W ( j, k )
up up
k 0

116
Fast Wavelet Transform:
Reconstruction

117
Fast Wavelet Transform:
Reconstruction

118
Wavelet Transform vs. Fourier
Transform

119
Wavelet Transform: 2-D
Scaling function:
 ( x, y )   ( x) ( y )
Wavelet functions:
 H ( x, y )   ( x) ( y ) Horizontal direction

 V ( x, y)   ( x) ( y) Vertical direction

 D ( x, y )   ( x) ( y) Diagonal direction

120
2-D Wavelet Transform:
Decomposition

121
2-D Wavelet Transform:
Reconstruction

122
123
124
Fig. 7.24 (g)

125
Image Processing by Wavelet Transform
• Three Steps:
Decompose the image into wavelet domain
Alter the wavelet coefficients, according to your applications
such as denoising, compression, edge enhancement, etc.
Reconstruct the image with the altered wavelet coefficients.

126
127
Wavelet Transform based Denoising
• Three Steps:
Decompose the image into several scales.
For each wavelet coefficient y:
 y y  t
y
Hard thresholding:  0 y  t
 sign( y ) ( y  t ) y t
y
Soft thresholding:  0 y t

Reconstruct the image with the altered wavelet


coefficients.
128
129
Assignment
• Get familiar with the Matlab Wavelet Toolbox.
• By using the Wavelet Toolbox functions, write
a program to realize the soft- thresholding
denoising on a noisy MRI image.

130
All Images taken from Gonzalez & Woods, Digital Image Processing (2002)

131

You might also like