1
Using Wavelets for Recognition of Cognitive Pattern Primitives
Dasu Aravind
Feature Group
PRISM/ASU
3DK3DK – – September 21, 2000
2
WaveletsRobust andObjective
Identificationof all CPs
WAVELETS
3DK3DK – – September 21, 2000
3
WHAT IS A CORNER POINT ?
3DK3DK – – September 21, 2000
4
It is an abrupt change in the orientation of a vessel wall or
a distinct angle in the joining of vessel parts such as neck or body
Anthropologist : Subjective Engineer : Objective
3DK3DK – – September 21, 2000
5
ABRUPT CHANGE
HIGH FREQUENCY INFORMATION
What are the toolsto capture high frequency
information ??
3DK3DK – – September 21, 2000
6
•Fourier Transform•Short Time Fourier Transform•Continuous Wavelet Transform•Discrete Wavelet Transform
3DK3DK – – September 21, 2000
7
Fourier Transform
3DK3DK – – September 21, 2000
FT decomposes a signal into complex exponential functionsof different frequencies. The way it does this, is defined by the following two equations
8
Fourier Transform
3DK3DK – – September 21, 2000
A signal S1 and its FT, FT(S1)
9
Fourier Transform
3DK3DK – – September 21, 2000
Another signal S2 and its FT, FT(S2)
10
Fourier Transform
3DK3DK – – September 21, 2000
•S1 and S2 have the same frequency components, but these components occur at different times. Therefore their FTs look alike
•Fourier transform tells whether a certain frequency component exists or not. This information is independent of where in time this component appears
11
Solution is STFT (Short Term Fourier Transform)
3DK3DK – – September 21, 2000
There is only a minor difference between STFT and FT. In STFT, the signal is divided into small enough segments, where these segments (portions) of the signal can be assumed to be stationary(all frequency components exist at all times). For this purpose, a window function "w" is chosen.
t
ftjwX dtettwtxftSTFT 2)( )()(),(
12
STFT
3DK3DK – – September 21, 2000
Consider the signal S3 and its STFT if the window is very wide
13
STFT
3DK3DK – – September 21, 2000
Consider the signal S3 and its STFT if the window is very narrow
14
STFT
3DK3DK – – September 21, 2000
The problem, is choosing a window function, once and for all, and use that window in the entire analysis. The answer, of course, is application dependent
15
Solution is CWT
3DK3DK – – September 21, 2000
Wavelet analysis is a measure of similarity between the basis functions (wavelets) and the signal itself. Here the similarity is in the sense of similar frequency content. The calculated CWT coefficients refer to the closeness of the signalto the wavelet at the current scale
16
CWT
3DK3DK – – September 21, 2000
This equation shows how a function f(t) is decomposed into a set of basis functions , called the wavelets. The variables s and (tau), scale and translation, are the new dimensionsafter the wavelet transform. Scale is the inverse of frequency.
17
CWT
3DK3DK – – September 21, 2000
The wavelets are generated from a single basic wavelet psi(t), the mother wavelet, by scaling and translation
18
CWT
3DK3DK – – September 21, 2000
Once the mother wavelet is chosen the computation starts with s=1 and the continuous wavelet transform is computed for all values of scale from s=1 and will continue for the increasing values of s , i.e., the analysis will start from high frequencies and proceed towards low frequencies. This first value of s will correspond to the most compressed wavelet. As the value of s is increased, the wavelet will dilate.
19
CWT
3DK3DK – – September 21, 2000
The obtained CWT looks like this
20
CWT
3DK3DK – – September 21, 2000
Lower scales (higher frequencies) have better scale resolution (narrower in scale, which means that it is less ambiguous what the exact value of the scale) which correspond to poorer frequency resolution . Similarly, higher scales have scale frequency resolution (wider support in scale, which means it is more ambiguous what the exact value of the scale is) , which correspond to better frequency resolution of lower frequencies
21
CWT
3DK3DK – – September 21, 2000
The most important properties of wavelets are the admissibility and the regularity conditions and these are the properties which gave wavelets their name. The admissibility condition implies that the Fourier transform of psi(t) vanishes at the zero frequency, i.e.
This means that wavelets must have a band-pass like spectrum
22
CWT
3DK3DK – – September 21, 2000
A zero at the zero frequency also means that the average value of the wavelet in the time domain must be zero, and therefore it must be oscillatory.
In other words, psi(t) must be a wave
23
CWT
3DK3DK – – September 21, 2000
The wavelet transform as described so far still has properties that make it difficult to use directly in the form shown so far.
The is redundancy in the CWT. The wavelet transform is calculated by continuously shifting a continuously scalable function over a signal and calculating the correlation between the two. These scaled functions are not orthogonal basis and the obtained wavelet coefficients will therefore be highly redundant.
24
DWT
3DK3DK – – September 21, 2000
To overcome this problem discrete wavelets have been introduced. Discrete wavelets are not continuously scalable and translatable but can only be scaled and translated in discrete steps. This is achieved by modifying the wavelet representation to
j and k are integers and s0 > 1 is a fixed dilation step. The translation factor tau0 depends on the dilation step. We usually choose s0 = 2 so that the sampling of the frequency axis corresponds to dyadic sampling. For the translation factor we usually choose tau 0 = 1 so that we also have dyadic sampling of the time axis. Yielding s=2j and =k*2j.
25
DWT
3DK3DK – – September 21, 2000
Even with discrete wavelets we still need an infinite number of scalings and translations to calculate the wavelet transform. The easiest way to tackle this problem is simply not to use an infinite number of discrete wavelets We know that the wavelet has a band-pass like spectrum. From Fourier theory we know that compression in time is equivalent to stretching the spectrum and shifting it upwards:
26
DWT
3DK3DK – – September 21, 2000
This means that a time compression of the wavelet by a factor of 2 will stretch the frequency spectrum of the wavelet by a factor of 2 and also shift all frequency components up by a factor of 2. Using this insight we can cover the finite spectrum of our signal with the spectra of dilated wavelets
27
DWT
3DK3DK – – September 21, 2000
Every time you stretch the wavelet in the time domain with a factor of 2, its bandwidth is halved. In other words, with every wavelet stretch you cover only half of the remaining spectrum, which means that you will need an infinite number of wavelets to get the job done.The solution to this problem is simply not to try to cover the spectrum all the way down to zero with wavelet spectra, but to use a cork to plug the hole when it is small enough. This cork then is a low-pass spectrum and it belongs to the so-called scaling function. The scaling function was introduced by Mallat. Because of the low-pass nature of the scaling function spectrum it is sometimes referred to as the averaging filter.
28
DWT
3DK3DK – – September 21, 2000
If we regard the wavelet transform as a filter bank, then we can consider wavelet transforming a signal as passing the signal through this filter bank. The outputs of the different filter stages are the wavelet- and scaling function transform coefficients and the technique is called subband coding.
29
DWT
3DK3DK – – September 21, 2000
Filtering a signal corresponds to the mathematical operation of convolution of the signal with the impulse response of the filter. The convolution operation in discrete time is defined as follows:
30
DWT
3DK3DK – – September 21, 2000
After passing the signal through a half band lowpass filter, half of the samples can be eliminated according to the Nyquist’s rule. Hence simply discarding every other sample will subsample the signal by two, and the signal will then have half the number of points. The scale of the signal is now doubled. The subsampling process changes the scale. Resolution, on the other hand, is related to the amount of information in the signal, and therefore, it is affected by the filtering operations. Half band lowpass filtering removes half of the frequencies, which can be interpreted as losing half of the information. Therefore, the resolution is halved after the filtering operation.
31
DWT
3DK3DK – – September 21, 2000
The original signal x[n] is first passed through a halfband highpass filter g[n] and a lowpass filter h[n].
32
ABRUPT CHANGE
HIGH FREQUENCY INFORMATION
Wavelets is the toolto capture high frequency
information
3DK3DK – – September 21, 2000
33
ConvolutionKernels
Sub-band Mallat’s structure
HL HH
LHLL
Vertical edges Diagonal edges
Horizontal edges
3DK3DK – – September 21, 2000
2D-DWT
34
Angle #1
Angle #k
ANGLE MEASUREMENT ALONG THE PERIPHERY
Angles #1, #2, ………#n
This is a 1D signal
3DK3DK – – September 21, 2000
35
1 D signalWavelet
Transformer
Low pass coefficients
High pass coefficients
+
Edge information
Filter options
Basic Haar filter
Odd Symmetric Daubechies filter in FP
Odd Symmetric Daubechies filter FxP
Even Symmetric Daubechies filter FP
Even Symmetric Daubechies filter in FxP
3DK3DK – – September 21, 2000
363DK3DK – – September 21, 2000
High pass coefficientsFlat regions A,B
Flat regions A,B
Flat region C
Flat region C
CPCP
The x axis corresponds to half the total number of points. That is, every couple of points in the original plot is approximated by one in the wavelet transformed plot. The direction from left to right along the X axis corresponds to scanning the pot from left to right as in the curvature plot. The dips in the plot correspond to what could be corner points.
37
Anthropologist : Subjective
Engineer : Objective
Method tested for 57 pots
Exact match for all test cases
3DK3DK – – September 21, 2000
38
Future Work:
Cognitive Pattern Primitives (CPP’s)
3DK3DK – – September 21, 2000