If we considered a one dimensional input vector defined by eight values: f = (4,6,10,10,12,8,5,5).
The trend vector for the above input vector is ( . The other fluctuation vector which can be represented mathematically as,
(5.6) The fluctuation vector for the input vector is ( ).
A Haar transformation can be performed in multiple stages. The first level of the transformation can be represented as
Figure 5.2A – Wavelet decomposition and image pyramids
In the example, for the input vector f the first level Haar transformation can be
represented as ( ( ). The Haar wavelet
transformation also has an inverse. Given t and diff vectors, the inverse Haar transformation can be represented as
(5.8)
The advantages of transforming the original input signal f into a trend and fluctuations vectors are, that the magnitudes of the transformed fluctuations vector is often significantly smaller than the magnitude values of the original input vector (Walker 1999). This property of a wavelet transformation is known as the small fluctuations feature. The reason why this small fluctuations feature is generally true is that, the input vector that we deal with are samples of a continuous analog signal g measured in between very short time intervals between the samples (Walker 1999). If the time increment between subsequent samples is small enough, then the sampled values of the input signal f will be close to each other due to the continuity of g. This property of a wavelet transformation has applications in image compression and image representation. Another important property of a wavelet transformation is the conservation and compaction of energy. The energy of an input vector is defined as
(5.9) A wavelet transformation conserves energy of an input vector and compresses most of the energy of the vector into the trend vector. For the above example the energy
of the trend vector accounts for 98.7% of the energy of the vector. The property of energy compaction of the input signal means that the properties of the input vector have not altered although the length of the signal has been reduced to half of its original size.
The idea of a Haar wavelet transformation can be extended for multi-resolution analysis. Given an input vector f then the first level Haar transformation can be represented as:
(5.10) To compute the second level transformed function, the first order trend vector is taken into account,
(5.11) Thus the original input vector can be represented as
(5.12) In general for vector of length N ( ), the kth level multi resolution analysis can be represented as
(5.13) In the above example, inputs are transformed into trend component and fluctuation components taking into account a one dimensional input vector. However images are two dimensional in nature and therefore need to be subject to transformations along the horizontal and the vertical directions thereby resulting in four sub-images (Fig. 5.2A).
A Haar wavelet (Fig. 5.2B) is somewhat irregular and discontinuous (Kumar and Georgiou 1997) but provides a good choice for images that consist of sharp variations of pixel intensities. It’s also simple to understand and implement.
5.4 Daubechies Wavelet Transform
The implementation of the Daubechies wavelet is very similar to the implementation of the Haar wavelet with a few important differences. The first major difference in the implementation of a Daubechies wavelet transformation is in the wavelet coefficients used for transformation of the input signal. The trend coefficients for the Daub4 wavelet transformation are
(5.14) The fluctuation coefficients for the Daub4 wavelet transformation are
(5.15) The trend and fluctuation coefficients of the Daub4 wavelet have been represented in Fig. 5.3.
The second major difference in the implementation of a Daub4 wavelet transformation is in the handling of the wavelet wrap-around-effect. The Haar transformation coefficients depend on the support of two adjacent non-zero values of the discrete input vector and therefore there is no wavelet wrap around effect. The Daub4 wavelet coefficients depend on the support of four non- zero adjacent values in the discrete input vector and therefore a wrap around needs to be defined as
(5.16) assuming that the discrete input vector f is periodic.
The major advantage of the Daubechies wavelet is that they are able to detect very short lived transient fluctuations, thereby exhibiting greater sensitivity to the inputs. (Walker 1999). Daubechies class of wavelets are also smooth in comparison to the Haar wavelet. For image texture analysis, strong localization properties in the Fourier domain are desired for applications in image filtering (Kumar and Georgiou 1997). Although a Haar wavelet is conceptually simple and easy to implement, its spectrum is not well localized (Kumar and Georgiou 1997). However, the Daubechies class of wavelets have excellent localization properties in the Fourier domain and are therefore very popular in the areas of image texture analysis and image compression (Walker 1999; Choi and Baraniuk 2001; Abasolo and Perales 2003; Arivazhagan and Ganesan 2003; Daugman 2003; Bartels, Wei, and Mason 2005; Clausi and Deng 2005; Kandaswamy, Adjeroh, and Lee 2005; Arivazhagan, Ganesan, and Priyal 2006; Wei and Bartels 2006).
The general algorithm for the implementation of a Haar and Daubechies wavelet forward transformation is given below:
1. Read the input image I(x, y).
2. For every row R in the image I(x, y) do:
a) Apply the wavelet transformation (trend and fluctuations) on R to get trend and fluctuation coefficients.
b) Add all trend coefficients to L and all the fluctuation coefficients to H (low pass and high pass filters).
3. For every column in the trend matrix L do:
a) Apply the wavelet transformation (trend and fluctuations) on L to get trend and fluctuation coefficients.
b) Add all trend coefficients to LL and all the fluctuation coefficients to LH (low pass and high pass filters).
4. For every column in the fluctuation matrix H do:
a) Apply the wavelet transformation (trend and fluctuations) on H to get trend and fluctuation coefficients.
b) Add all trend coefficients to HL and all the fluctuation coefficients to HH (low pass and high pass filters).
5. End
The general algorithm for the implementation of a Haar and Daubechies inverse wavelet transformation is given below:
1. Read the LL and LH images.
2. For every row Ri and Rj in LL and LH respectively do:
a) Apply reverse transformation using respectively Ri and Rj to get row Li.
3. For every row Ri and Rj in HL and HH respectively do:
a) Apply reverse transformation using respectively Ri and Rj to get row Hi.
a) Apply reverse transformation using respectively Ri and Rj to get image row Ii.
5. End
The software tool implemented using Microsoft Visual C# and ESRI ArcObjects are in Figures 5.4 - 5.5. The detailed implementation for the 2-D Haar and Daub4 wavelet forward and inverse transformations are explained in Fig. 5.6.
5.5. Multi-scale Classification Model
The input image is transformed by using a suitable wavelet transform without any sub-sampling, to generate a set of wavelet decomposed images called wavelet frames which have the same dimensions of that of the input image (Unser 1995). Statistical texture indicators like gray level co-occurrence matrices and non-linear operators like texture energy are used to derive image texture indicators using the trend and fluctuation images.
The non-linear operator for deriving texture energy can be mathematically represented as,
(5.17) where is a non-linear function defined in equation 5.18, and W is a M*M window, centered at a pixel with co-ordinates x, y.
where is a constant and is chosen to be 0.25 as suggested by Farrokhia and Jain (1991).
Figure 5.3 – Scaling (trend) and Wavelet (fluctuation) functions of Daub4 wavelet
//Performs the 2D Wavelet Tranformation for the Image perform_wavelet2D(image, nrows, ncols){
//Perform a 1-D Wavelet Transformation in the horizontal_ //direction
//Steps : Read Column By Column
// : Perform Wavelet Transformation 1D
// : Split and Insert As Column in 2 float[nrows,halfNCols]'s //Creating Intermediate Matrices
float [,] A = new float[halfNRows,ncols] float[,] B = new float[halfNRows, ncols]
for(i=0; i<ncols; i++) {
//Get Image Column
float [] vector = get_image_column(i) //Compute wavelet 1D
compute_wavelet_1D(vector, trend, fluctuation); //Save in intermediate matrices
set_as_column(A, trend, i) set_as_column(B, fluctuation, i) }
//Perform a 1-D wavelet Transformation in the vertical_ //direction
//Creating Final Matrices
waveletResult = new float[halfNRows, halfNCols] edgeA = new float[halfNRows, halfNCols]
edgeB = new float[halfNRows, halfNCols] edgeC = new float[halfNRows, halfNCols]
int k = 0;
for (k = 0; k < halfNRows; k++) {
//Getting Row Vector for Intermediate Matrix
float [] vector = get_image_row(A, k)
compute_wavelet_1D(vector, trend, fluctuation); //Set As Rows
set_as_row(waveletResult, trend, k) set_as_row(edgeA, fluctuation, k) }
int l = 0;
for (l = 0; l < halfNRows; l++) {
//Getting Row Vector for Intermediate Matrix
float [] vector = get_image_row(B, l)
compute_wavelet_1D(vector, trend, fluctuation); //Set As Rows
set_as_row(edgeB, trend, k) set_as_row(edgeC, fluctuation, k) }
//Completed 2-D wavelet Transformation }
//Performs the inverse 2-D wavelet Transformation //waveletMain (LL)
//edgeA (LH) //edgeB (HL) //edgeC (HH)
perform_inverse_wavelet2D(waveletMain, edgeA, edgeB, edgeC){ length = get_length(waveletMain)
//Create Intermediate Matrices twice the size of the sub-signals
float[,] A = new float[nrows, 2 * ncols]
float[,] B = new float[nrows, 2 * ncols] //Combine waveletMain and edgeA
//Combine edgeB and edgeC
for (i = 0; i < nrows; i++) {
//Getting Row By Row
float[] waveletRow = get_image_row(waveletMain, i)
float[] egdeARow = get_image_row(edgeA, i)
float[] edgeBRow = get_image_row(edgeB, i)
float[] edgeCRow = get_image_row(edgeC, i)
compute_inverse_wavelet_1D(waveletRow, edgeARow, resultRowA) compute_inverse_wavelet_1D(edgeBRow, edgeCRow, resultRowB) //Set Results to Intermediates
set_as_row(A, resultRowA, i) set_as_row(B, resultRowB, i) }
//Combine the intermediate matrices to get the result
float[,] result = new float[nrows * 2, ncols * 2]
for (nk = 0; nk < ncols * 2; nk++) {
float[] AColumn = get_image_column(A, nk)
float[] BColumn = get_image_column(B, nk)
compute_inverse_wavelet_1D(AColumn, BColumn, resultColumn) set_image_column(result, resultColumn, nk);
}
//Completed Inverse wavelet2D
return result }
Figure 5.6 (Continued)
5.7 Preliminary Results with Artificial Textures
To test the statistical indicators derived from a wavelet transforms, an artificial image consisting of three dominant textured regions derived from the Brodatz texture album is used. The input image is a combination of textures D16, D49 and D53. The input image used is shown in Fig. 5.7. The input image consists of a high spatial frequency component in the centre and two low spatial frequency components with orientations at and respectivily.
A first level Daubechies decomposition of the input image is shown in Figures 5.8-5.11.
Figure 5.7 – Input image to test wavelet based indicators
Figure 5.10 – Wavelet fluctuation (Vertical) Figure 5.11 - Wavelet fluctuation (Diagonal)
The classification results using the wavelet based classification model and traditional gray level thresholding are shown in Figures 5.12 and 5.13. Clearly the results using the wavelet based classification model are far superior to that of traditional methods.
Figure 5.12 – Classification results (wavelet based classification model)
CHAPTER VI
EXPERIMENTS AND COMPARISON RESULTS
A comprehensive evaluation of various texture processing techniques is performed using natural images and the results of applying these techniques are presented. In the final section a comparison between color-only classification and texture aided classification is presented.