Wavelet Transform-Multidisciplinary Applications

The Wavelet transform is such one efficient and important mathematical tool used to explore a signal in a time-frequency representation to allow analyzing the parts of interest separately. This way of analysis provides more valuable information regarding when and where different frequency components are present in the signal. Furthermore, the wavelet analysis is probably the most effective solution to overcome the drawbacks of Fourier analysis.


Introduction
The Wavelet transform is such one efficient and important mathematical tool used to explore a signal in a time-frequency representation to allow analyzing the parts of interest separately. This way of analysis provides more valuable information regarding when and where different frequency components are present in the signal. Furthermore, the wavelet analysis is probably the most effective solution to overcome the drawbacks of Fourier analysis.
Since its very first use, many varieties and flavors on top of the original Wavelet transform have been devised and tested, and they have shown different advantages when applied to different scientific and technical areas. These varieties include, but not limited to, the continuous (CWT), the discrete (DWT), Wavelet packet transform (WPT) and multiwavelet transform (MWT). This chapter is aimed at presenting powerful utilization of the Wavelet transform (and its varieties) in two important applications: biometrics and non-destructive testing (NDT).
The biometric application that will be shown in this chapter is related to iris recognition (IR). IR is known as an inherently reliable biometric technique for human identification. Feature extraction is a crucial step in iris recognition, and the trend nowadays is to reduce the size of the extracted features. Special efforts have been applied in order to obtain low templates size and fast verification algorithms. These efforts are intended to enable a human authentication in small embedded systems, such as an integrated circuit smart card. In this chapter, an effective eyelids removing method, based on masking the iris, has been applied. Moreover, an efficient iris recognition encoding algorithm has been employed. Different combination of wavelet coefficients which quantized with multiple quantization levels are used and the best coefficients and levels are determined. The system is based on an empirical analysis of CASIA iris database images. Experimental results show that this algorithm is efficient and gives promising results of false accept ratio (FAR) = 0% and false reject ratio (FRR) = 1% with a template size of only 364 bits.
The NDT application is related to ultrasonic time-of-flight diffraction (TOFD). TOFD is known as a reliable NDT technique for the inspection of welds in steel structures, providing accurate positioning and sizing of flaws. The automation of data processing in TOFD is required towards building a comprehensive computer-aided TOFD inspection and interpretation tool. A number of signal and image processing tools have been specifically developed for use with TOFD data. These tools have been adapted to function autonomously without the need for continuous intervention through automatic configuration of the critical parameters according to the nature of the data and the acquisition settings. This research presents several multi-resolution approaches employing the Wavelet transform and texture analysis for de-noising and enhancing the quality of data to help in automatic detection and classification of defects. The automatic classification is implemented using support vector machines classifier which is considered faster and more accurate than the artificial neural networks. The results achieved so far have been promising in terms of accuracy, consistency and reliability.
The sections to follow provide more details concerning each application.

The biometrics application: efficient small template iris recognition system using wavelet transform
The term "Biometrics" refers to a science involving statistical analysis of biological characteristics. This measurable characteristic, biometric, can be applied to physical objects, such as eye, face, retina vessel, fingerprint, hand and voice, or behavioral like signature and typing rhythm. Biometrics, as a form of unique person identification, is one research subject that is growing rapidly (Woodward et al., 2002).
The advantages of unique identification using biometric features are numerous, such as fraud prevention and secure access control. Biometric systems offer great benefits when compared to other authentication techniques. In particular, they are often more user friendly and can guarantee the physical presence of the user (Woodward et al., 2002).
Iris recognition is one of the most reliable biometric technologies in terms of identification and verification. The iris is the colored portion of the eye that surrounds the pupil as depicted in Figure 1. It controls light levels inside the eye similar to the aperture on a camera. The round opening in the center of the iris is called the pupil. The iris is embedded with tiny muscles that dilate and constrict the pupil size. It is full of richly textured patterns that offer numerous individual attributes which are distinct even between identical twins and between the left and right eyes of the same person. Compared with other biometric features such as face and fingerprints, iris patterns are highly stable with time and unique, as the probability for the existence of two identical irises is estimated to be as low as one in 10 72 (Woodward et al., 2002;Proença & Alexandre, 2007). In this research, the iris is efficiently normalized such that only useful data are encoded. Image enhancement techniques are applied. Moreover, the best combination of wavelet coefficients is found and used for successful identification, and the best number of bits used for encoding the feature vector have been deduced while maintaining low template size.

Related work
Iris identification using analysis of the iris texture has attracted a lot of attention and researchers have presented a variety of approaches in the literature.
Daughman (Daugman, 1993) proposed the first successful implementation of an iris recognition system based on 2-D Gabor filter to extract texture phase structure information of the iris to generate a 2048 bits iris code. A group of researchers have used the 1-D wavelet transform as the core of the feature extraction module (Boles & Boashash, 1998;Chena & Chub, 2009;Huang & Hu, 2005;. For instant, Boles and Boashash (Boles & Boashash, 1998) extracted the features of the iris pattern by using the zero-crossings of 1-D wavelet transform of the concentric circles on the iris.
On the other hand, another group of researcher utilized 2-D wavelet transform to extract iris texture information (Kim et al., 2004;Cho & Kim, 2005;Alim & Sharkas, 2005;Narote et al., 2007;Poursaberi & Araabi, 2007;Hariprasath & Mohan, 2008;Kumar & Passi, 2008). For instance, Narote et al (Narote et al., 2007) proposed an algorithm for iris recognition based on dual tree complex wavelet transform and explored the speed and accuracy of the proposed algorithm. Hariprasath and Mohan (Hariprasath & Mohan, 2008) described iris recognition based on Gabor and Morlet wavelets such that the iris is encoded into a compact sequence of 2-D wavelet coefficient, which generate an iris code of 4096 bits. Kumar and Passi (Kumar & Passi, 2008) presented a comparative study of the performance from the iris identification using different feature extraction methods with different templates size. Even though the previous systems have good recognition ratios, the template size remains rather large.

Iris recognition system
Generally, an iris recognition system is composed of many stages as shown in Figure 2. Firstly, an image of the person's eye is captured by the system and preprocessed. Secondly, the image is localized to determine the iris boundaries. Thirdly, the iris boundary coordinates are converted into the stretched polar coordinates to normalize the scale of the iris in the image. Fourthly, features representing the iris patterns are extracted based on texture analysis. Finally, the person is identified by comparing the extracted features with an iris feature database.

Segmentation
For the purpose of identification, the part of the eye image carrying useful information is only the iris that lies between the scalera and the pupil (Proença & Alexandre, 2007). Therefore, prior to performing iris matching, it is very important to localize the iris in the acquired image. The iris region, shown in Figure 3, is bounded by two circles, one for the boundary with the scalera and the other, interior to the first, with the pupil.

Fig. 3. The iris region
To detect these two circles, the circular Hough transform (CHT) has been used. The Hough transform is a standard computer vision algorithm that can be used to determine the geometrical parameters for a simple shape, present in an image, and this has been adopted here for circle detection (Wildes et al., 1994). The main advantage of the Hough transform technique is its tolerance for gaps in feature boundary descriptions and its robustness to noise (Moravcik, 2010).
Basically, the first derivatives of intensity values in an eye image are calculated and the result is used to generate an edge map. From the edge map, votes are cast in Hough space for the parameters of circles passing through each edge point. These parameters are the center coordinates x c and y c , and the radius r, which are able to define any circle according to the following equation: A maximum point in the Hough space corresponds to the radius and center coordinates of the best circle are defined by the edge points (Wildes et al., 1994).

Normalization
The size of the iris varies from person to person, and even for the same person, due to variation in illumination, pupil size and distance of the eye from the camera. These factors can severely affect iris matching results. It is very necessary to eliminate these factors in order to get accurate results. To achieve this, the localized iris is transformed into polar coordinates by remapping each point within the iris region to a pair of polar coordinates (r,θ), where r is in the interval [0,1] with 1 corresponds to the outermost boundary, and θ is the angle in the interval [0,2π] as shown in Figure 4 (Dmitry, 2004;Schalkoff, 2003).
With reference to Figure 5, the remapping of the iris region from (x,y) Cartesian coordinates to the normalized non-concentric polar representation is modeled by the following equations: y(r, θ)=(1 − r)y p (θ)+ry i (θ) (4) with x p (r, θ)=x p0 (θ)+r p cos θ (5) y p (r, θ)=y p0 (θ)+r p sin θ (6) x i (r, θ)=x i0 (θ)+r i cos θ (7) Where I is the iris picture, r p and r i are the radius of pupil and the iris respectively, while (x p (θ), y p (θ)) and (x i (θ), y i (θ)) are the coordinates of the papillary and iris boundaries in the direction of θ.(x p0 ,y p0 ) and (x i0 ,y i0 ) are the centers of pupil and iris respectively.
For a typical eye image of dimension 320×280 pixel, the previous normalization method is performed to produce 50 pixels along r and 600 pixels along θ which results in 600×50 unwrapped strip.
On account of asymmetry of pupil (not being a circle perfectly) and probability of overlapping outer boundaries with sclera, 45 out of 50 pixels will be selected along r in the unwrapped iris. Therefore, the unwrapped iris becomes of dimensions 600×45. The normalized iris image is shown in Figure 6.

Proposed eyelash and eyelid removing method
Since in most cases the upper and lower parts of the iris area are occluded by eyelids, it was decided to use only the left and right parts of the iris with a partial area from the upper and the lower regions for iris recognition purpose. Therefore, the whole iris [0, 360 • ] is not transformed in the proposed system. Experiments were conducted by masking the iris from [148, 212 • ] and [328, 32 • ] for the right and left parts, while for the upper and lower parts, a semi circle with a radius equal to the half of the iris radius is used to mask the iris as depicted in Figure 7. Hence, the regions that contain the eyelids and eyelashes have been omitted while the remaining eyelashes are treated by thresholding, since analysis reveals that eyelashes are quite dark when compared with the rest of the eye image (Wildes et al., 1994). The corresponding rectangular block is show in Figure 8. Afterward, the block is concatenated together as shown in Figure 9. The size of the rectangular block is reduced accordingly. By applying this approach, detection time of upper and lower eyelids and some computational cost of the polar transformation are saved. The saving ratio can be calculated as follows: Saving ratio =(ignored parts o f the iris/whole iris region) * 100% where the ignored parts in this case = ((148-32) + (328-212))/2 = 116, hence, the saving ratio = (116/360) * 100% = 32.22%. Figure 10 illustrates the application of the proposed masking method on a normalized iris. Although the homogeneous rubber sheet model accounts for pupil dilation and imaging distance it does not compensate for rotational inconsistencies. Rotational inconsistencies are treated in the matching stage (will be shown later).

Image enhancement
Due to the effect of image capturing conditions (e.g. light source position), the normalized iris image may not have sufficient quality, a situation that affects the performance of feature extraction and matching processes (Poursaberi & Araabi, 2007).
Hence for getting a uniform distributed illumination and better contrast in the iris image, the polar transformed image is enhanced through adjusting image intensity values by mapping the intensity values in the input gray scale image to new values such that 1% of the pixel data is saturated at low and high intensities of the original image. This increases the contrast in a low-contrast grayscale image by remapping the data values to fill the entire intensity range [0,255]. Then, histogram equalization method was used. Results of images before and after enhancement are shown in Figure 11.

The proposed feature extraction method
In order to provide accurate recognition of individuals, the most discriminating information present in an iris pattern must be extracted. Only the significant features of the iris must be encoded so that comparisons between templates can be made. Most iris recognition systems make use of a band pass decomposition of the iris image to create a biometric template. For the encoding process, the outputs of any used filter should be independent, so that there are no correlations in the encoded template, otherwise the filters would be redundant (Daugman, 2001).
The Wavelet transform is used to extract features from the enhanced iris images. Haar wavelet is used as the mother wavelet. The Wavelet transform breaks an image down into four sub-sampled images. The result consists of one image that has been high-pass filtered in the horizontal and vertical directions (HH or diagonal coefficients), one has been low-pass filtered in the vertical and high-pass filtered in the horizontal (LH or horizontal coefficients), one that has been low-pass filtered in the horizontal and high-pass filtered in the vertical (HL or Vertical coefficients), and one that has been low-pass filtered in both directions (LL or details coefficient) (Kim et al., 2004).
In Figure 12, a conceptual figure of basic decomposition steps for images is depicted. The approximation coefficients matrix cA and details coefficients matrices cH, cV, and cD (horizontal, vertical, and diagonal, respectively) obtained by wavelet decomposition of the input iris image. The definitions used in the chart are as follows (Poursaberi & Araabi, 2007). 2. D ↓ denote downsample rows.
3. Lowpass_D denotes the decomposition low pass filter.
4. Highpass_D denotes the decomposition high pass filter.

I i denotes the input image.
Experiments were performed using different combinations of Haar wavelet coefficients, and the obtained results from different combinations were compared to find the best. Since the unwrapped image after masking has a dimension of 407×45 pixels, after 5 times decompositions, the size of the 5 th level decomposition is 2×13 while for the 4 th level is 3×26. Based on empirical experiments, the feature vector is arranged by combining features from HL and LH of level-4 (vertical and horizontal coefficients [HL4 LH4]) with HL, LH and HH of level-5 (vertical, horizontal and diagonal coefficients [HL5 LH5 HH5]). Figure 13 shows a five-level decomposition with Haar wavelet.
In order to generate the binary data, features of HL4 and HH5 are encoded using two-level quantization while features of LH4, HL5 and LH5 are encoded using four-level quantization. After that, these features are concatenated together as shown in Figure 14 which illustrates the process used to obtain the final feature vector.

Matching
The last module of an iris recognition system is used to match two iris templates. Its purpose is to measure how similar or different templates are and to decide whether or not they belong to the same person or not. An appropriate match metric is based on direct point-wise comparisons between the phase codes (Schalkoff, 2003). The test of matching is implemented by the Boolean XOR operator (which detects disagreement between any pair of bits) applied to the encoded feature vector of the two iris patterns. This system quantifies this matter by computing the percentage of mismatched bits, i.e., the normalized Hamming distance.
Let X and Y be the two iris representations to be compared, and N be the total number of bits, then: In order to avoid rotation inconsistencies which occur due to head tilts, the iris template is shifted right and left by 6 bits. It can be easily shown that scrolling the template in Cartesian coordinates is equivalent to rotation in polar coordinates. This algorithm performs matching of two templates several times while shifting one of them to different locations. The smallest HD value is selected, which gives the matching decision (Schalkoff, 2003;Daugman, 2001).

Experimental results and comparison
The iris images are obtained from the database of the Chinese academy of sciences institute of automation (CASIA) (CAS, 2004). The database consists of 756 iris images from 108 classes. Images from each class are taken from two sessions with one month interval in between. For each iris class, three samples are taken at the first session for training and all samples captured at the second session are used as test samples. This is also consistent with the widely accepted standard for biometrics algorithm testing (Mansfield & Wayman, 2002;Ma, 2003).
Experiments using different combinations of wavelet coefficients were performed and the results obtained from different combinations were compared as shown in With a pre-determined separation Hamming distance, a decision can be made as to whether two templates were created from the same (a match) or different iris. However, the intra-and inter-class distributions may have some overlap, which would result in a number of incorrect matches or false accepts, and a number of mismatches or false rejects. Table 2 shows the false accepts rate (FAR) and false rejects rate (FRR) associated with different separation points. Figure 15 shows the inter-and intra-class distribution of the system with a Hamming distance separation point of 0.29. With this separation point, FAR and FRR of 0% and 1%, respectively, are achieved. Such FRR are appeared due to the overlap between the classes, but it still allows accurate recognition.   Table 3 shows a comparison between the proposed method and other well-known methods in terms of the classification rate.
In the two methods shown in references (Narote et al., 2007) and (Hariprasath & Mohan, 2008), the CRR is so close to the obtained one in this research. In fact, the dimensionality of the feature vector in both methods is much higher than that in the proposed method. The feature vector consists of 1088 bits in reference (Narote et al., 2007) and 4096 in reference (Hariprasath & Mohan, 2008), while it consists of only 364 bits in the proposed method. In addition, neither reference (Narote et al., 2007) nor (Poursaberi & Araabi, 2007) have suggested a method for removing eyelids or eyelashes. Furthermore,reference (Poursaberi & Araabi, 2007) suggested a method to produce 544 bits of feature vector by applying four-level Wavelet transform on the lower part of the iris assuming that only the upper part is occluded by the eyelashes and eyelids while the lower part is not. On the other hand, reference (Xiaofu & Pengfei, 2008) employed two-dimensional complex Wavelet transform for feature extraction but no method for noise removal has been applied.

Conclusions
In this application, an iris recognition algorithm using Wavelet texture features was presented with a novel masking approach for eyelid removing. A masked area around the iris is used in the iris detection method. This area contains a complex and abundant texture information which are useful for feature extraction. The feature vector is quantized to a binary one, reducing the processing cost, while maintaining a high recognition rate.
Experimental results using CASIA database illustrate that relying on a smaller but more reliable region of the iris, although reduced the net amount of information, hence, improving the recognition performance. The results clearly demonstrate that the feature vector consisting of concatenating LH4, HL4, LH5, HL5, and HH5 gives the best results. On the other hand, Haar wavelet is particularly suitable for implementing high-accuracy iris verification/identification systems and the feature vector is the smallest with respect to other wavelets. In identification mode, the CRR of the proposed algorithm was 99% with template size of 364 bits. Such vector size can be easily stored on smart cards and, hence, the matching and encoding time will be minimized tremendously.
The proposed algorithm is characterized by having less computational complexity compared to other methods. Based on the comparison results shown in Table 3, it can be concluded that the proposed method is promising in terms of execution time and performance of the subsequent operations due to template size reduction.

The NDT application: automatic detection and classification of weld flaws in ultarsonic time-of-flight diffraction data using wavelet transform and support vector machines
Non-destructive testing is commonly used to monitor the quantitative safety-critical aspects of manufactured components and forms one part of quality assurance procedures. For applications such as the inspection of welded joints in steel structures, ultrasonic techniques are often the NDT method of choice. Time-of-flight diffraction (TOFD) is one such technique, developed by Silk (Silk, 1998) in the late 1970s to improve the sizing accuracy of flaws. Currently, the critical stages of TOFD data processing and interpretation are still performed off-line by skilled operators. This is a time-consuming and painstaking process requiring high operator skill, alertness, consistency and experience.
The TOFD data acquisition and display configurations themselves may introduce a host of errors that cannot be accounted for by manual interpretation, leading to reduction in the quality of the acquired data. Noise formed from scattering of inhomogeneous micro-structures and electronic circuitry is another source of errors. Automatic data processing is often made difficult by this superimposed noise, as it can sometimes mask indications due to small but potentially dangerous defects (Zahran, 2010;Cacciola et al., 2007;Al-Ataby & Al-Nuaimy, 2011;Charlesworth & Temple, 2001). The task of defect classification in noisy data is another critical challenge. Correctly identifying flaw categories has great importance in the process of decommissioning of work pieces and structures through identifying the nature of flaws (serious or negligible).
In this research, the Wavelet transform is used as a method for de-noising to improve the quality of the acquired data. For classification, the support vector machines classifier is used to discriminate between defect classes with input features that also depend on the use of the Wavelet transform. The data used to test the efficiency of the suggested methods is obtained from D-scan TOFD samples collected after applying TOFD on test plates using ultrasonic probes of 5 MHz center frequency with a sampling rate of 100 MHz and a collection step of 0.1 mm. The region of interest in this research is the compression wave area that is enclosed between the lateral wave and the backwall echo.

Time-of-flight diffraction (TOFD)
Unlike conventional ultrasonic techniques (such as pulse echo), TOFD is based on measurement of the time-of-flight of the ultrasonic waves diffracted from the tips of discontinuities originating from flaws. Echo strength in TOFD does not depend on the flaw orientation, allowing flaw sizes to be accurately determined (generally accurate to within ±2 % of wall thickness, typically less than ±1 mm), with a high probability of detection of approximately 95% (Cacciola et al., 2007;Al-Ataby & Al-Nuaimy, 2011). Two longitudinal broad beam probes are used in a transmitter-receiver arrangement, so that the entire flaw area is flooded with ultrasound and, consequently, the entire volume is inspected using a single scan pass along the inspection line. The collected data are digitised and stored. This data can be visualised in an A-scan representation or stacked together side-by-side in a raster representation called a D-scan (longitudinal) or B-scan (parallel) depending on the relative scanning direction.
During interpretation, there are generally four characteristic signals that are sought: 1. The lateral wave which arises from the wave that travels directly from the transmitter to the receiver.

Data quality enhancement and pre-processing
Raw TOFD data returns from the data acquisition process are in need of significant processing before being "usable" for automatic defect evaluation specifically when noise and other factors are present. The processing may include noise suppression ( This part shows the role played by the Wavelet transform and other important operations to improve the quality and consistency of the raw TOFD data to be used for automation and computer interpretation purposes.

De-noising and the MRA
The removal of noise from noisy data while preserving useful information is often referred to as de-noising. Due to its computational efficiency, multi-resolution analysis (MRA) is considered as a powerful tool in de-noising and to enhance the SNR of ultrasonic TOFD signals (Graps, 1995;Matz et al., 2004;Robini et al., 1997). The Wavelet transform offers an inherent MRA that can be used to obtain the time-frequency representation of the ultrasonic signal. The de-noising procedure used in this research is based on decomposing the signal using the discrete Wavelet transform (DWT). The global dynamics of an NDT-related signal f (t) are condensed in the Wavelet approximation coefficients (WACs) that are related to the low frequencies. On the other hand, local oscillations of f (t) (like noise) are depicted in a set of so called Wavelet detail coefficients (WDCs) that are related to the high frequencies.
After the application of DWT to get the WACs and the WDCs, the next step is thresholding of some WDCs and reconstruction of the signal from the other WDCs and WACs using the inverse transform (IDWT). The method is a generalization of Wavelet decomposition that offers a larger range of possibilities for signal analysis. In normal Wavelet analysis, a signal is split into WACs and WDCs. The approximation is then itself split into a second-level approximation and detail, and the process is repeated. In this analysis, the detail coefficients as well as the approximation coefficients can be split. This analysis is called the Wavelet packet transform (WPT) (Matz et al., 2004;Robini et al., 1997) (see Figure 17). Hard thresholding was employed with the threshold computed from WDCs at each level of decomposition based on the standard deviation as follows (Robini et al., 1997): where k is a factor related to the ratio of peak value to the RMS value, D i is the WDC at each level and N is the length of each set of details coefficients.

Fig. 17. Discrete multi-resolution scheme -WPT; A is the approximation (low-pass) component and D is the detail (high-pass) component
In order to assess the quality of the suggested de-noising process, the SNR is computed for different defect samples. The obtained SNR values were calculated using the following equation (Matz et al., 2004): where S RMSF is the RMS value of the filtered signal, and N RMSN is the RMS value of the noise-only part of the raw signal.
In this research, three decomposition levels are used with Daubechies (db6) as the Wavelet filter. When compared with averaging or Wiener filtering, de-noising through Wavelet transform returned higher SNR values. Figure 18 shows some D-scan samples before and after applying Wavelet de-noising method with the corresponding SNR. Although SNR improvement for human interpretation before and after applying de-noising may not appear significant, this improvement is more than adequate in terms of automation and computer interpretation. The performance of the subsequent processing stages shows remarkable enhancement after the de-noising process.

Other pre-processing steps
In addition to de-noising, the process of data quality enhancement includes other important operations to improve the quality and consistency of the data to enable accurate defect characterization and positioning downstream. Scan alignment is one of these operations. A  Charlesworth & Temple, 2001). As the tips of the defects must be accurately located within the material and the lateral wave is used as reference points, aligning adjacent scans is essential. In this research, scan alignment is carried out by cross-correlating each scan with an arbitrary "reference" scan (first A-scan in the image).
The positions of the peaks in these cross-correlation plots are used to automatically shift each A-scan forward or backward in time in such a way as to align the envelope of the lateral wavelets. This not only influences the profile of the lateral wave, but also the shapes of the defect signatures themselves.
Automatic detection of the lateral wave is another essential pre-processing operation. The lateral wave is an important reference point specifically when sizing and positioning is considered. It is also needed for scale linearization and calibration. To detect the lateral wave, the first major wavelet peak (or trough, depending on the phase) of the aligned A-scans is detected.

Automatic flaw detection based on MRA-WPT and fuzzy logic
This part illustrates some techniques that are followed in this research to detect flaws automatically. MRA based on WPT along with texture analysis are used to select (or filter) the image(s) to be used in the automatic detection process. Image segmentation is then used to highlight and enclose defects inside windows (called defect blobs). Segmentation can be done by statistical methods (e.g. variance thresholding) or through computational intelligence methods (in this case, fuzzy logic). The output of this step is a group of segmented defect blobs that are ready for further analysis and classification.

MRA-WPT for image filtering (selection)
As mentioned previously, the application of MRA to DWT is referred to as the Wavelet packet transform (WPT), which is a signal analysis tool that has the frequency resolution power of the Fourier transform and the time resolution power of the Wavelet transform (Cacciola et al., 2007;Al-Ataby & Al-Nuaimy, 2011;Graps, 1995;Robini et al., 1997). It can be applied to time-varying signals, where the Fourier transform does not produce useful results, and the Wavelet transform does not produce sufficient results. The WPT can be considered an extension to the DWT, providing better reconstruction. In the Wavelet packet framework, compression and de-noising ideas are exactly the same as those developed in the Wavelet framework. The only difference is that WPT offers more complex and flexible analysis, as the details as well as the approximations are split (Cacciola et al., 2007) (refer to Figure 17). The tree decomposition in the Wavelet packet analysis can be applied continuously until the desired coarser resolution is reached.
A single Wavelet packet decomposition gives different bases from which the best representation with respect to a design objective can be selected. This can be done by finding the best tree based on an entropy criterion (Cacciola et al., 2007). Selection can also be done based on texture analysis and statistical contents of the obtained images. Wavelet packet analysis is used in this research in two more important areas. The first area is to aid in detection (hence segmentation) of flaws based on fuzzy logic thresholding. The second area is to provide a ground for selecting defect blob features to be used as inputs to the SVM classifier in the classification stage (will be explained later). Both areas rely on the powerful compression ability of the Wavelet transform in general and WPT in particular to extract relevant and descriptive features.
The application of WPT to the D-scan images was done to analyze the scan image into multiple decomposition levels using the Debauchies of order 8 (db8) chosen as the most suitable analyzing mother function in the Wavelet packet filtering process. The chosen level of decomposition is 3 since it achieved the required coarse resolution and higher decomposition levels would not add any significance to the analysis. First, the D-scan image is decomposed by the WPT (db8, L=3) in the first level. The grey-level co-occurrence matrix (GLCM) P(i, j) is then calculated for the decomposed images. The descriptors or features that characterize the content of GLCM are calculated. The following are the three descriptors that are used in selection of the images for reconstruction (Haralick et al., 1973): • Energy: • Entropy: where p(i, j) is the normalized GLCM P(i, j).
Based on these three descriptors, the image with the weakest textural information is discarded, and the one with the highest statistical contents is selected. After that, another decomposition level runs to generate the new set of images. The calculation of the descriptor commences again. The process of decomposition proceeds until level 3, and the final image is reconstructed from three images carrying the highest statistical textural information in the last level. This image is the key input to the next stages.
The above processing has shown to be effective in generating filtered scan images that are rich in its textural and statistical contents, showing only relevant details and indications. Hence, segmentation and classification of flaws have been affected positively in terms of performance, consistency and accuracy.

Segmentation through fuzzy logic
The segmentation technique used in this research to extract defect blobs is based on the use of fuzzy logic, namely the fuzzy c-mean iterative (FCMI) algorithm (Wong et al., 2001). This method has shown better performance in terms of accuracy and automation than others, which are based on statistical thresholding concept. The method is suitable to distinguish between superimposed defects when normal means (via trained operator or statistical methods) fail. The input to this algorithm is the final filtered image after MRA-WPT (explained previously). The algorithm acts as a binarization operation, with black pixels (values set to zeros) represent background and white pixels (values set to ones) represent flaws. This image (or mask in this case) is used to segment the input image after some further processing. Segmentation through FCMI algorithm is a method that can be implemented as supervised or unsupervised. In this research, unsupervised implementation is used. The details of the implementation of this method to segment the defect in TOFD images are out of scope of this research.
For better representation of the detected defects, each defect blob is represented in the form of a rectangular outlining the defect. This is achieved by applying a global thresholding of each defect blob separately in order to remove the lowest 10% of the pixel intensity values within the defect blob and then recording the minimum and the maximum spatial and temporal dimensions for each blob. This empirical threshold value proved to result in satisfactory performance for all the scan files considered. These recorded dimensions are used to generate a new mask with each defect blob represented by a rectangular outline. Defect may consist of more than one segment. As every defect should be represented in one rectangular blob, this problem is overcome by merging the rectangular blobs related to the same defect based on the dimensions between different blobs (Zahran, 2010). After some processing, the output of this step is a segmented image data with highlighted defects areas or blobs. An example is shown in Figure 19.

Automatic classification using SVM and wavelet features
In the context of supervised classification, machine learning and pattern recognition are the extraction of regularity or some sort of structure from a collection of data. Neural

The support vector machines
The SVM tries to maximize the margin between classes, hence increases the generalization ability. The SVM classifier is fundamentally developed for binary classification case and is extendable for multi-class situation. The classification problem can be restricted to consideration of the two class problem without loss of generality. The goal is to produce a classifier that works well on unseen examples.
The SVM classifier, like other linear classifiers, attempts to evaluate a linear decision boundary (assuming that the data is linearly separable) or a linear hyperplane between the two classes. Linearly separable data can be separated by an infinite number of linear hyperplanes. The problem is to find the optimal separating hyperplane (see Figure 20 (a)) with maximal margin M=2/||W||. It has been shown by Vapnik (Vapnik et al., 2000) that this is a classical quadratic programming (QP) problem with constraints that ends in forming and solving of a Lagrangian. Once the Lagrange multipliers for the optimal hyperplane have been determined, a separating rule can be used in terms of support vectors and the Lagrange multipliers.
The concepts above are presented for a linear classification case. These are generalizable to a nonlinear case where a mapping function is used to map the input space into a higher dimensional feature space such that the non-linear hyperplane becomes linear by using a mapping function Φ as shown in Figure 20 (b). To avoid the increased computational complexity and the curse of dimensionality, a kernel-trick or kernel function is employed which, in essence, computes an equivalent kernel value in the input space such that no explicit mapping is required. Kernels commonly used with kernel methods and SVM in particular are linear, polynomial and Gaussian radial basis function (RBF) (Vapnik et al., 2000;Rajpoot & Rajpoot, 2004;Al-Ataby et al., 2010). In this research, a multiclass SVM classifier is implemented using one-against-all (OAA) method (Vapnik et al., 2000), where multiclass problem is reduced into multiple binary problems. A polynomial kernel of degree 5 is used in this implementation.

Wavelet features
Large variety of feature extraction methods exist which are based upon signal processing (or filtering) techniques. Wavelet filtering is one such method that can be successfully used for feature extraction. The idea of using the Wavelets for feature extraction in classification context is not entirely new and has been applied before to texture analysis (Rajpoot & Rajpoot, 2004;Al-Ataby et al., 2010;Huang & Aviyente, 2008), and researchers have been using it for over a decade or so in one form or the other. The inherent capability to do so was highlighted on MRA using the Wavelet transform. As explained before, Wavelet transform decomposition and its extension, WPT, have gained popular applications in the field of signal/image processing. Wavelet transform enables the decomposition of the image into different frequency subbands, similar to the way the human visual system operates. This property makes it especially suitable for image segmentation and classification (Rajpoot & Rajpoot, 2004;Al-Ataby et al., 2010;Huang & Aviyente, 2008). For the purpose of classification, appropriate features need to be extracted to obtain a representation that is as discriminative as possible in the transform domain. It is known that proper feature selection is likely to improve the classification accuracy with less number of features. A widely used Wavelet feature is the energy of each Wavelet subband obtained after WPT (Huang & Aviyente, 2008).
Two-dimensional WPT decomposition allows analyzing an image simultaneously at different resolution levels. Different functions for energy can be used to extract features from each subband for classification. Commonly used energy functions include magnitude |.|, magnitude square |.| 2 and the rectified sigmoid |tanh(-).| (Huang & Aviyente, 2008). In this research, the definition of energy based on squaring is used. The energy at different subbands is computed from the subband Wavelet coefficient: where σ 2 p (k) is the energy of the obtained (decomposed) image projected onto the subspace at node (p, k) . The energy of each subband provides a measure of the image characteristics in that subband. The energy distribution has important discriminatory properties for images and as such can be used as a classification feature (Huang & Aviyente, 2008).

Discussions and results
This research focuses on automatic detection and classification of three types of defects that are pure internal. These are clearly embedded and not open to or approaching either surfaces, and require advanced visual processing for interpretation. Apparent defects, on the other hand, like upper crack, near surface slag and others may be classified using geometrical and phase information alone (Zahran, 2010;BS, 1993). D-scan test samples containing 50 documented defects were used in the classification stage. The test samples and TOFD equipment are provided by Lavender International NDT Ltd, UK. After applying the operations thar are mentioned previously on the test samples, 50 defect blobs were obtained. The targeted defects for classification are summarized in Table 4 below, along with the corresponding number of samples per each defect type.
To train the SVM classifier, each defect blob sample is analyzed by MRA-WPT with Daubechies 6-tap filter (db6) and a 3-level decomposition (L=3) to generate decomposition subbands. After each decomposition level, the energies are calculated. A feature vector of length 12, which contains energies (4 values per each level), is generated. It was found that by adding some regional features of each defect blob, the performance of the classifier was enhanced against the unseen defects. For that purpose, three regional features (after considering the defect blob as an image containing different-shaped regions and applying simple thresholding to it) are added to the Wavelet feature vector, hence forming a final feature vector of 15 values. These three regional features are: • Total number of islands: represents the number of the islands (segmented regions) in the absolute of the defect blob after thresholding.
• Number of positive islands: represents the number of the islands in the defect blob after thresholding.
• Relative area: represents the actual number of pixels in the regions of all islands divided by the area of the blob outlining all islands.
It should be noted that this feature vector of length 15 was found suitable for classification based on the defect types to be classified and the available samples (defined in Table 4). Larger feature vectors would be needed to classify more defect types to avoid overfitting.
The 50 defect blobs have been used to obtain different training and testing patterns. The output of the SVM classifier is a number which codifies each kind of defect as follows: 1 for IC, 2 for PO and 3 for SL. As mentioned previously, the SVM classifier has been trained using a 5-degree polynomial kernel implementing the OAA method for the case of study. At the end of the training phase, test patterns are applied and the SVM classifier returns a particular matrix, so called confusion matrix (CM) (Cacciola et al., 2007), which evaluates the goodness of a trained classifier. Generally speaking, the element CM ij of a CM is the probability that a single pattern belonging to the i-th class could be classified as belonging to the j-th class (sum of elements of each rows is therefore equals to 1). Thus, the more the CM is similar to the identity matrix, the better classification performance is. The other performance factors that 3 20 Table 4. Defect samples used in the classification were selected to assess the SVM classifier are the classification accuracy (CA) and the precision (P). In terms of CM elements, classification accuracy and precision are defined as follows: where nc is the number of classes to be discriminated (nc=3 in the present case). Table 5 shows the resulting performance of the built SVM classifier for three different tests. It can be seen from this table that after applying the built SVM classifier using 34%, 50% and 60% of the available defect samples for training, classification rates of 80%, 93% and 100% were obtained, respectively. Figure 21 is an output example of the classification stage.

Conclusion
This research has presented several promising methods to aid in the automation of detection and classification of flaws using TOFD, specifically when there is a lack of data quality. These methods are under development and need to be studied and tested thoroughly on real life examples before being generalized and applied as reliable automatic interpretation methods.
The following are the main conclusions and findings after applying the above methods: • The de-noising of data (using Wavelet transform) affects positively the detection accuracy and the performance of the classifier.
• The SVM classifier is robust and promising. It shows good performance when there is lack of training data (which is not the case with other classifiers like NN).
• The use of defect blobs Wavelet features as inputs to the SVM classifier seems to be in favor of the overall classification performance.
• It was noted that the response time of performing detection and classification processes using the proposed methods is relatively short compared to others (mainly, the time domain methods).
Future work will be focusing on utilizing and extending the techniques mentioned in this research to perform automatic defect sizing and positioning, with the possibility of making use of the mode-converted waves to add more advantage to the D-scan method. Also, the SVM classifier will be studied thoroughly and extended to classify other internal defect types like small piece of slag (with single echo), lack of fusion, lack of penetration and others, with the possibility of generating different feature vectors utilizing phase information of defect echoes and using principal component analysis (PCA) to reduce and select relevant features. This book reports on recent applications in biology and geoscience. Among them we mention the application of wavelet transforms in the treatment of EEG signals, the dimensionality reduction of the gait recognition framework, the biometric identification and verification. The book also contains applications of the wavelet transforms in the analysis of data collected from sport and breast cancer. The denoting procedure is analyzed within wavelet transform and applied on data coming from real world applications. The book ends with two important applications of the wavelet transforms in geoscience.