Digital Image Processing, 2nd ed.

advertisement
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
An example
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
• The Welch periodogram of this speech signal
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Problem
• Stationary analysis is only applicable to
stationary signals.
• Non-stationary signals require analysis
techniques that encompass time variation
– the short-time Fourier transform
– wavelets
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
STFT
• Speech is stationary within 20ms windows
• Fourier transforms are calculated for short
windows
• Each transform forms one column of a 3D plot
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
STFT Example
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
STFT Example
• Each STFT column represents one block of
speech
• Each frequency component has equal
bandwidth
• Each STFT element represents the same time
scale and bandwidth as every other component
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Wavelets
• Wavelets allow multi-resolution analysis:
– That is analysis at different scales or resolution.
– Standard Fourier analysis only offers a measure of
the frequency content of the whole image and the
contribution of the image at a particular frequency.
– Wavelet analysis permits us to describe an image
in terms of frequency at a position in the image.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Time-Frequency Floorplan
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Wavelets
• Each wavelet component has the same timebandwidth product
• Those at low frequencies represent longer
periods of time than those at high frequencies
• A whole variety of wavelets
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Wavelet decomposition
• A wavelet decomposition consists of a scaling
function and a series of wavelets
• The scaling function provides the coarse scale
• The wavelets successively refine the
representation
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
Scaling Function
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Decomposition -1st Wavelet, W(x)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Decomposition -2nd Wavelet W(2x)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Decomposition -3rd Wavelet W(4x)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Decomposition – 4th Wavelet W(8x)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Decomposition – 5th Wavelet
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
Scaling Function
www.imageprocessingbook.com
• The four co-efficient scaling function is:
  x   c0 (2 x)  c1  2 x  1  c 2  2 x  2  c 2  2 x  3
and the corresponding wavelet is
W  x   c3 (2 x)  c 2  2 x  1  c1  2 x  2  c0  2 x  3
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
Haar Wavelet
For example the Haar wavelet is
c0  c1  1, c 2  c3  0
  x)  1 when 0  x  1,
  x)  0 otherwise
The Wavelet is then
W  x)  1 when 0  x  0.5,
W  x)  1 when 0.5  x  1.0
W ( x)  0 otherwise
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Haar Wavelets
• The wavelets are then defined by their coefficients which have to satisfy a set
of criteria which are called necessary conditions:
 c  2,
 c  2,
 c c  0,
 c  c
n
n
2
n
n
n
When
n
n n2
2n
n
2n  1
  
These are Daubechies
wavelets
© 2002 R. C. Gonzalez & R. E. Woods
For the Haar wavelet c0=c1=1
Length 4 Wavelets must satisfy:
c 0  (1  cos( )  sin(  )) / 2,
c1  (1  cos( )  sin(  )) / 2,
c 2  (1  cos( )  sin(  )) / 2,
c3  (1  cos( )  sin(  )) / 2
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Gabor Wavelet
The Gabor wavelet is essentially a sinewave modulated by a
Gaussian envelope
2
gwt   e
-(  jf0t)  ((t - t0)/a)
e
Where f0 is the modulating frequency, t0 indicates position and a
controls the width of the Gaussian envelope. In 2D this becomes,
gw2 D x, y  
1
 
e
-(((x - x0) 2  (y - y0) 2 )/2 ) (  j 2f 0 ( (x - x0)cos  (y - y0)sin ))
e
Where x0, y0 control position f0 controls frequency of modulation
along either axis and θ controls the direction or orientation of the
wavelet.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Examples of 1-D Wavelet Transform
From Matlab
Wavelet Toolbox
Documentation
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
2-D Example
From Usevitch (IEEE
Sig.Proc. Mag. 9/01)
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
Image Pyramids
• Creation by iterated
approximations and
interpolations (predictions)
• The approximation
output is taken as the
input for the next resolution Level
• For a number of levels P, two
pyramids: approximation
(Gaussian) and prediction residual
(Laplacian), are created
• approximation filters could be:
• averaging
• low-pass (Gaussian)
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Gaussian and Laplacian pyramids
Starting image is
512×512;
convolution kernel
(approximation
kernel) is 5×5
Gaussian
Different resolutions
are appropriate for
different image
objects (window,
vase, flower, etc.)
J–3
J–2
J–1
J
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Subband Coding
• The image is decomposed into a set of band-limited components
(subbands).
• Two-channel, perfect reconstruction system; two sets of half-band
filters
• Analysis: h0 – low-pass and h1 – high-pass and Synthesis: g0 – lowpass and g1 – high-pass
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Brief reminder of z-transform properties
Downsampled and upsampled by a factor of two sequences in zdomain
[2↓]x(n)=xdown(n)=x(2n) ⇔Xdown (z)=1[X(z1/2)+X(−z1/2)]
2 [2↑]x(n)=xup(x)=⎧⎨x(n/2) n=0,2,4,...
⇔Xup(z)=X(z2)
⎩ 0
n = 1,3,5,....
Downsampling followed by upsampling
x(n)=[2↑][2↓]x(n) ⇔ X(z)=1[X(z)+X(−z)]
Z−1(X(−z))=(−1)n x(n)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
Families of half-bank PR filters
© 2002 R. C. Gonzalez & R. E. Woods
www.imageprocessingbook.com
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Seperable filtering in images
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
Aliasing is presented
in the vertical and
horizontal detail
subbands. It is due to
the down-sampling
and will be canceled
during the
reconstruction stage.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
•The standard Fourier Transform (FT) decomposes the signal into
individual frequency components.
•The Fourier basis functions are infinite in extent.
•FT can never tell when or where a frequency occurs.
•Any abrupt changes in time in the input signal f(t) are spread out
over the whole frequency axis in the transform output F(ω) and
vice versa.
•WT uses short window at high frequencies and long window at
low frequencies. It can localize abrupt changes in both time and
frequency domains.
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
Fig. 7.24 (Con’t)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed.
www.imageprocessingbook.com
Chapter 7
Wavelets and Multiresolution Processing
© 2002 R. C. Gonzalez & R. E. Woods
Download