Using Wavelet Packet Transform for Surface Roughness Evaluation and Texture Extraction

Surface characterization plays a significant role in evaluating surface functional performance. In this paper, we introduce wavelet packet transform for surface roughness characterization and surface texture extraction. Surface topography is acquired by a confocal laser scanning microscope. Smooth border padding and de-noise process are implemented to generate a roughness surface precisely. By analyzing the high frequency components of a simulated profile, surface textures are separated by using wavelet packet transform, and the reconstructed roughness and waviness coincide well with the original ones. Wavelet packet transform is then used as a smooth filter for texture extraction. A roughness specimen and three real engineering surfaces are also analyzed in detail. Profile and areal roughness parameters are calculated to quantify the characterization results and compared with those measured by a profile meter. Most obtained roughness parameters agree well with the measurement results, and the largest deviation occurs in the skewness. The relations between the roughness parameters and noise are analyzed by simulation for explaining the relatively large deviations. The extracted textures reflect the surface structure and indicate the manufacturing conditions well, which is helpful for further feature recognition and matching. By using wavelet packet transform, engineering surfaces are comprehensively characterized including evaluating surface roughness and extracting surface texture.


Introduction
The real surface has been defined in ISO (International Organization for Standardization) as a set of features that physically exist and separate the entire work piece from the surrounding medium [1]. The surface of a work piece has significant influence on its functional performance, and surface metrology becomes more and more vital for describing the surface processing quality. Surface characterization means the breakdown (filtering process) of the surface geometry into basic components usually based on the functional requirements [2]. Research on filtering methods for surface metrology has been studied for decades from a 2RC (second-order resistor-capacitor circuit) filter, Gaussian filter to wavelet filter and morphological filter. The 2RC filter is a nonlinear filter suffering from phase distortion [3]. Gaussian filter is the most widely used filter, adopted as the standard filtering technique by the standards committees [4]. Morphological filtration is carried out by performing morphological operations on the input signal. It has a drawback of being time-consuming for a large data set [5,6]. Wavelet, an attractive mathematical tool, can describe the surface with variable resolution. By comparing the signal with a series of template functions, researchers can use wavelets to analyze different frequency components with variable window sizes [7,8]. Chen et al. first introduced wavelet analysis to surface characterization in 1999 [9], which could evaluate surface Sensors 2017, 17, 933 2 of 12 roughness more accurately than traditional methods. In the 2000s, wavelet transform together with optimization algorithms were utilized for surface roughness analysis, showing its feasibility and applicability [10][11][12][13]. Jiang et al. applied the second and third generation wavelet model for surface analysis. Both the models were proved to be more effective than the conventional filtering methods. [14][15][16][17][18]. A dual-tree complex wavelet transform was used for surface analysis by Zeng et al. and Ren et al. showing very good amplitude transmission characteristics and high frequency resolution [19][20][21]. Wang et al. and Grzesik et al. combined wavelet analysis and fractal dimension for surface roughness evaluation [22,23], and the self-similarity of the surface could be detected. Rosenboom et al. and Doshi et al. applied wavelet analysis for surface description, defect detection and texture classification [24][25][26][27]. Yang et al. used wavelet filter for generating surface with confocal laser scanning microscope (CLSM) [28], demonstrating a powerful tool for eliminating image noise. Wavelet transform provides flexible time-frequency resolution, whereas it suffers from a relatively low resolution in high frequency regions, leading to difficulty in differentiating high frequency transient components [7]. Wavelet packet transform (WPT), an extension of wavelet transform which can further decompose the detailed information of the signal in high frequency regions, has been used for feature extraction and texture segmentation. Its performance of feature extraction was better than that of discrete wavelet transform [29,30]. Kim et al. presented an optimal algorithm based on WPT for surface quality characterization, improving the performance of texture classification without recursive calculation [31]. Makieta applied wavelet packet strategy for assessing milled surfaces. He provided criteria for choosing the basic wavelet and evaluated the surface roughness and waviness [32]. WPT [33] and one-dimensional (1D) wavelet transform [34] were also used to extract surface features for surface roughness evaluation based on an artificial neural network, where the statistical features were correlated with the surface roughness parameter Ra. Wavelet packet neural networks were also used for surface texture classification [35,36].
In this paper, WPT is applied to multi-resolution analysis on the high frequency components of real surface topography. Roughness parameters are calculated and surface textures are extracted to characterize the surface. A roughness specimen and three real engineering surfaces are then analyzed in detail. Profile and areal roughness parameters are calculated to quantify the characterization results and compared with those measured by a profile meter. The relations between roughness parameters and noise are analyzed in detail. This paper is organized as follows: Section 2 provides the theories of wavelet transform and WPT. The processing procedures of simulations and experiments are presented in Section 3. Section 4 exhibits the results and discussion about the simulated profiles and engineering surfaces. The conclusions are given in Section 5.

Theory
Wavelet transform is the local transform of the time and frequency with good localization features in the spatial domain and frequency domain. By translation and dilation, a mother wavelet, defined as ψ s,τ (t) = 1 √ s t−τ s , can generate wavelets [7]. The discrete scale parameter and translation parameter are expressed as s = s j 0 and τ = kτ 0 s j 0 . We then obtain the corresponding family of the base wavelet, ψ j,k (t) = 1 . The discrete wavelet transform of a given signal x(t) is obtained as dt. Two-dimensional (2D) wavelets decomposition can be represented by horizontal, vertical, and diagonal wavelet functions.
Compared with wavelet transform, WPT has relatively high resolution in the high frequency region. As an extension of wavelet transform, WPT keeps many merits of wavelet transform, such as multi-resolution and multi-scale. Wavelet packet is defined by where k is a localization parameter, p is a scale index, h is a low pass filter, and g is a high pass filter. The function W 0 (x) can be identified with the scaling function ϕ and W 1 with the basic wavelet function ψ. The corresponding 2D wavelet packet filters can be expressed as (2) Figure 1a schematically illustrates the decomposition procedure of 1D WPT, in which the signal is decomposed into three levels with eight sub-bands in total. Figure 1b shows the procedure of 2D WPT for surface topography.
where k is a localization parameter, p is a scale index, h is a low pass filter, and g is a high pass filter. The function W0(x) can be identified with the scaling function φ and W1 with the basic wavelet function ψ. The corresponding 2D wavelet packet filters can be expressed as (2) Figure 1a schematically illustrates the decomposition procedure of 1D WPT, in which the signal is decomposed into three levels with eight sub-bands in total. Figure 1b shows the procedure of 2D WPT for surface topography. The bi-orthogonal wavelets including two different sets of wavelets and scaling functions are usually used for the reconstruction and decomposition of surface topography [7], whose symmetry ensures that they have linear phase characteristics, important for surface texture analysis. They have been used for surface profile filtering in manufacturing process monitoring and diagnosing [7,37]. In this study, a bi-orthogonal 6.8 wavelet is used as the mother wavelet, and we then calculate the roughness parameters and extract the surface textures for assessing the engineering surfaces.

Simulations and Experiments
WPT is performed on a simulated 2D surface profile composed of a sinusoid line (the surface waviness) and a random signal (the roughness). Here, the roughness is obtained by the high frequency component reconstructed by using WPT. Border deformation is exhibited. Smooth padding, a border extension method, is chosen to avoid boundary deformation. The bi-orthogonal wavelets including two different sets of wavelets and scaling functions are usually used for the reconstruction and decomposition of surface topography [7], whose symmetry ensures that they have linear phase characteristics, important for surface texture analysis. They have been used for surface profile filtering in manufacturing process monitoring and diagnosing [7,37]. In this study, a bi-orthogonal 6.8 wavelet is used as the mother wavelet, and we then calculate the roughness parameters and extract the surface textures for assessing the engineering surfaces.

Simulations and Experiments
WPT is performed on a simulated 2D surface profile composed of a sinusoid line (the surface waviness) and a random signal (the roughness). Here, the roughness is obtained by the high frequency component reconstructed by using WPT. Border deformation is exhibited. Smooth padding, a border extension method, is chosen to avoid boundary deformation.
Then, surface roughness analysis is implemented on a surface roughness specimen with right-angle steps. Measurement is conducted by a confocal laser scanning microscope (CLSM, VK-X200, Keyece Co., Ltd., Osaka, Japan), where a 20× objective is used to capture the height topography of the surface, in which noisy points along the edge of the steps always exist. A wavelet threshold denoising method is implemented on the measured surface, and the border processing (BP) is carried out to eliminate the border deformation. By applying WPT to the surface topography, we obtain the reference surface and roughness surface together with the profile and areal parameters. For comparison, a profile meter (PM, talysurf PGI830, Taylor Hobson Ltd., Leicester, UK) is used to provide a criterion. The sample length is 3.0 mm and the evaluation length is 15.0 mm to evaluate profile roughness. The sample area and evaluation area are both 9 mm 2 to estimate the areal roughness. The relations between the surface roughness parameters and noise are also analyzed by simulation, where four surfaces with the same shape and size in different levels of noise are used for surface roughness evaluation. The noise gradually increases from level-0 to level-3. We separate the surface topography by WPT and calculate the roughness parameters together with the relative errors (the parameters of the surfaces with level-1, level-2, and level-3 noise vs. those of the surface with level-0 noise). WPT as a smooth filter is also carried out on the high frequency components for extracting the surface texture. After obtaining the filtered surface topography, we search for the extreme points in a 3 × 3 template as the candidate feature points and confirm the texture feature points by setting a threshold. A milled surface, a turned surface and a grinding surface are further analyzed for verification.

Results and Discussion
Figure 2a displays the simulated surface profile including waviness and roughness. Figure 2b exhibits the separated waviness (also the filtering reference line), and Figure 2c shows the reconstructed roughness by WPT. The error curves are given in Figure 2d, where the red line represents the differences between the reconstructed waviness and primary waviness, and the black line denotes the errors between the reconstructed roughness and primary roughness, as it can be found that the waviness and roughness obtained by WPT match well with the primary waviness and roughness. At the end of two curves, an outlier marked in a circle indicates that border deformation appears. Figure 2e presents the primary waviness (black line), reconstructed waviness (red line), and reconstructed waviness after BP (blue line). The inset of the enlarged drawing illustrates that the reconstructed waviness by BP almost keeps the same as the primary waviness, whereas some deviations exist between the primary waviness and reconstructed waviness without BP. The error curves given in Figure 2f exhibit the effect of BP clearly, in which the red line represents the errors between the primary waviness and reconstructed waviness by BP, which has a relatively smaller absolute value at the end than the blue line (the errors between the primary waviness and reconstructed waviness without BP). Obviously, the boundary deformation is eliminated.
The characterization results of the roughness specimen with right-angle steps are presented in Figure 3. Figure 3a shows the primary surface topography captured by CLSM, where the color bar denotes the height information. The noisy points are obviously visible along the right angle edge, which will influence the generation of roughness surface seriously. The filtered result is illustrated in Figure 3b, in which the noisy points are removed. The de-noising procedure contributes to generating the roughness surface accurately. Figure 3c displays the characterization results of the 2D profile roughness, including profile parameters R a (the arithmetical mean deviation), R q (the root mean square deviation), R ku (the kurtosis), R sk (the skewness), and R c (the mean height of profile elements) [38]. The left vertical axis represents the value of the parameters and the right axis denotes the percentage of the relative errors. The roughness parameters calculated by WPT are exhibited as the red bars, and the black bars signify the parameters measured by PM for comparison. The calculated results for R a , R q , R c , R sk , and R ku by WPT are 1.48 µm, 1.56 µm, 4.05 µm, 1.16, and 1.52, similar to the measurement results by PM (1.52 µm, 1.66 µm, 4.11 µm, 1.13, and 1.67, correspondingly). The blue scatter dot line represents the relative errors of the calculation results by WPT vs. those by PM, where the relative errors of R a , R q , R c , and R sk are all rather small (2.63%, 6.02%, 1.46% and 2.65%). R ku obtained by WPT appears the largest deviation compared with that by PM (the relative error approaching 8.98%). R ku represents the kurtosis of the assessed profile and measures the sharpness of the probability density function of the ordinate values. Both the measurements of the right-angle steps structure by CLSM and PM may introduce noisy points. These points with a relatively large value will become isolated valleys or peaks and influence R ku seriously [38], resulting in the inaccuracy of the characterization. Figure 3d displays the areal surface roughness parameters together with the relative errors. The areal parameters of S a (the arithmetical mean height), S q (root mean height), S ku (the kurtosis), S sk (the skewness), S v (the maximum pit height), and S p (the maximum peak height) [39]  obtained by WPT appears the largest deviation compared with that by PM (the relative error approaching 8.98%). Rku represents the kurtosis of the assessed profile and measures the sharpness of the probability density function of the ordinate values. Both the measurements of the right-angle steps structure by CLSM and PM may introduce noisy points. These points with a relatively large value will become isolated valleys or peaks and influence Rku seriously [38], resulting in the inaccuracy of the characterization. Figure 3d displays the areal surface roughness parameters together with the relative errors. The areal parameters of Sa (the arithmetical mean height), Sq (root mean height), Sku (the kurtosis), Ssk (the skewness), Sv (the maximum pit height), and Sp (the maximum peak height) [39]    The filtered surface by applying WPT to the high frequency components (roughness components) is shown in Figure 3e. It keeps the basic structure of the original surface topography. The extracted 490 feature points displayed in Figure 3f express the typical surface texture containing the top textures and the bottom textures, which suggest the basic direction of the textures and are helpful for further feature recognition and matching. Therefore, WPT can also be used for extracting surface texture by decomposing the high frequency components of the surface topography.  It can be seen that the profile roughness parameters obtained by WPT approximate to those measured by PM. The relative errors are 5.41%, 4.42%, 4.10%, 9.56%, and 6.12%, respectively, indicating that the characterization results obtained by WPT agree well with those by PM. The largest deviation appears in Rsk, which measures the asymmetry of the probability density function of the ordinate values, strongly influenced by the noise in the measurements. The corresponding areal roughness parameters together with the relative errors are shown in Figure 4d. Sa, Sq, Sku, Ssk, Sv, and Sp by WPT are 1.57 μm, 1.92 μm, 2.33, 0.92, 3.44 μm, and 5.65 μm. For comparison, the results by PM are 1.48 μm, 1.81 μm, 2.49, 1.00, 3.21 μm, and 5.41 μm. The relative errors of Sa, Sq, Sku, and Sp (6.08%, 6.07%, 6.43%, and 4.43%) are less than 7%. However, the difference of Sv reaches 7.16%, and the relative error of Ssk even approaches 8.00%. Sv   Figure 4a illustrates the surface topography, and Figure 4b displays the roughness surface reconstructed by WPT. The profile roughness parameters and their relative errors are exhibited in Figure 4c. The values of R a , R q , R c , R sk , and R ku calculated by WPT are 1.56 µm, 1.89 µm, 5.33 µm, 1.23, and 2.30. Those measured by PM (1.48 µm, 1.81 µm, 5.12 µm, 1.36, and 2.45) are used for comparison. It can be seen that the profile roughness parameters obtained by WPT approximate to those measured by PM. The relative errors are 5.41%, 4.42%, 4.10%, 9.56%, and 6.12%, respectively, indicating that the characterization results obtained by WPT agree well with those by PM. The largest deviation appears in R sk , which measures the asymmetry of the probability density function of the ordinate values, strongly influenced by the noise in the measurements. The corresponding areal roughness parameters together with the relative errors are shown in Figure 4d. S a , S q , S ku , S sk , S v , and S p by WPT are 1.57 µm, 1.92 µm, 2.33, 0.92, 3.44 µm, and 5.65 µm. For comparison, the results by PM are 1.48 µm, 1.81 µm, 2.49, 1.00, 3.21 µm, and 5.41 µm. The relative errors of S a , S q , S ku , and S p (6.08%, 6.07%, 6.43%, and 4.43%) are less than 7%. However, the difference of S v reaches 7.16%, and the relative error of S sk even approaches 8.00%. S v measures the largest surface valley depth with a sampling region. S sk evaluates the asymmetry of the probability density function of the ordinate values. Noisy points introduced in the measurements will result in large deviations of S v and S sk .  The characterization results of the turned surface are also presented in Figure 5. Figure 5a  The characterization results of the turned surface are also presented in Figure 5. Figure 5a,b display the primary surface and filtering results. The results of the profile roughness parameters are shown in Figure 5c, in which the calculated R a , R q , R c , R sk , and R ku by WPT (2.87 µm, 3.35 µm, 10.59 µm, 1.23, and 2.28) approximate the measurement results by PM (2.77 µm, 3.29 µm, 11.14 µm, 1.34, and 2.41). The corresponding relative errors are 3.61%, 1.82%, 4.94%, 8.21%, and 5.39%, signifying the characterization results of the 2D profile roughness by WPT match well with those by PM. Figure 5d exhibits the characterization results of areal roughness. The parameter values of S a , S q , S ku , S sk , S v , and S p by WPT are 2.89 µm, 3.40 µm, 2.18, 0.71, 6.08 µm, and 7.98 µm, similar to the results by PM (2.78 µm, 3.29 µm, 2.34, 0.75, 5.80 µm, and 8.64 µm). The relative errors of S a , S q , S ku , S v , and S sk (3.96%, 3.34%, 6.84%, 4.83%, and 5.33%) are less than 7%. Only S p reaches 7.64%, probably caused by noisy points. Figure 5e exhibits the smooth surface by applying WPT to the high frequency components. It is also a periodic structure much flatter than the roughness component as shown in Figure 5b. Figure 5f displays the extracted surface texture, which contains 1126 feature points presenting the tool marks clearly including the top ridge textures and bottom valley textures. The reconstructed surface typical textures not only indicate the direction of the surface texture but also help to recognize and classify surface texture. 3.34%, 6.84%, 4.83%, and 5.33%) are less than 7%. Only Sp reaches 7.64%, probably caused by noisy points. Figure 5e exhibits the smooth surface by applying WPT to the high frequency components. It is also a periodic structure much flatter than the roughness component as shown in Figure 5b. Figure  5f displays the extracted surface texture, which contains 1126 feature points presenting the tool marks clearly including the top ridge textures and bottom valley textures. The reconstructed surface typical textures not only indicate the direction of the surface texture but also help to recognize and classify surface texture. The characterized results of the grinding surface are presented in Figure 6. The original surface captured by CLSM is shown in Figure 6a. Figure 6b provides the roughness surface. The evaluation results of the profile roughness are given in Figure 6c. The obtained profile roughness parameters (Ra, Rq, Rc, Rsk, and Rku) are 0.25 μm, 0.33 μm, 1.72 μm, 0.073, and 3.60. For comparison, the measured results by PM are 0.24 μm, 0.32 μm, 1.82 μm, 0.068, and 3.45, respectively. As a result, the relative errors of Ra, Rq, Rc, and Rku are 2.63%, 2.54%, 5.51%, and 4.31%. Only Rsk reaches 7.04%. Figure 6d exhibits the evaluated results of the areal roughness, where the calculated results of Sa, Sq, Sku, Ssk, Sv and Sp by WPT (0.24 μm, 0.31 μm, 4.41, 0.62, 1.94 μm, and 2.60 μm) approximate the results by PM (0.23 μm, 0.30 μm, 4.15, 0.58, 2.05 μm, and 2.75 μm). The relative errors (4.71%, 3.94%, 6.28%, 5.67%, 5.65%, and 5.16%) are all smaller than 7% suggesting the reliability of WPT for assessing surface roughness. Figure 6e shows the filtered surface components, in which we extract 532 feature points as displayed in Figure 6f. Since the surface is fabricated by grinding tool and the surface is rather flat The characterized results of the grinding surface are presented in Figure 6. The original surface captured by CLSM is shown in Figure 6a. Figure 6b provides the roughness surface. The evaluation results of the profile roughness are given in Figure 6c. The obtained profile roughness parameters (R a , R q , R c , R sk , and R ku ) are 0.25 µm, 0.33 µm, 1.72 µm, 0.073, and 3.60. For comparison, the measured results by PM are 0.24 µm, 0.32 µm, 1.82 µm, 0.068, and 3.45, respectively. As a result, the relative errors of R a , R q , R c , and R ku are 2.63%, 2.54%, 5.51%, and 4.31%. Only R sk reaches 7.04%. Figure 6d exhibits the evaluated results of the areal roughness, where the calculated results of S a , S q , S ku , S sk , S v and S p by WPT (0.24 µm, 0.31 µm, 4.41, 0.62, 1.94 µm, and 2.60 µm) approximate the results by PM (0.23 µm, 0.30 µm, 4.15, 0.58, 2.05 µm, and 2.75 µm). The relative errors (4.71%, 3.94%, 6.28%, 5.67%, 5.65%, and 5.16%) are all smaller than 7% suggesting the reliability of WPT for assessing surface roughness. Figure 6e shows the filtered surface components, in which we extract 532 feature points as displayed in Figure 6f. Since the surface is fabricated by grinding tool and the surface is rather flat without periodic texture, the extracted feature points only suggest the direction of the texture without layered features. Thus, by decomposing the high frequency components of the surface topography based on WPT, the engineering surfaces are comprehensively assessed including surface roughness evaluation and surface texture extraction.

Conclusions
In this paper, we evaluate the surface roughness and extract the typical texture using WPT for a number of common surface finishes. A CLSM is used to capture the surface topography, and the high frequency components of the surface topography are analyzed in detail. Smooth border padding is introduced to eliminate the border deformation, and the de-noise process is executed to obtain the roughness surface accurately. A simulated 2D surface profile is tested by using WPT, and the

Conclusions
In this paper, we evaluate the surface roughness and extract the typical texture using WPT for a number of common surface finishes. A CLSM is used to capture the surface topography, and the high frequency components of the surface topography are analyzed in detail. Smooth border padding is introduced to eliminate the border deformation, and the de-noise process is executed to obtain the roughness surface accurately. A simulated 2D surface profile is tested by using WPT, and the reconstructed roughness coincides with the original ones. Then, a roughness specimen together with three engineering surfaces (a milled surface, a turned surface, and a grinding surface) is used for further verification. Profile roughness parameters (R a , R q , R c , R ku , and R sk ) and areal roughness parameters (S a , S q , S v , S p , S ku , and S sk ) are calculated and compared with the measurement results by PM. It can be found that the roughness parameters obtained by WPT agree well with the measurement results by PM. The relations between the roughness parameters and noise are analyzed by simulation for explaining the relatively large deviations occurring in the results. The extracted textures clearly exhibit the surface structure and the basic tool marks, also being helpful for texture classification and surface performance estimation. These proved that WPT is feasible and capable for comprehensively characterizing a number of common surface finishes, including evaluating surface roughness and extracting surface texture.