# An Image Processing Method for Extraction of the Stress Wave Reflection Period
## 3 Experimental Verification
### Experimental Results  
#### 3.3.1 Buried Metal Piles with a Length of 1.00 m  
Experimental results with a burial depth of 0.40 m for the buried metal piles with a design length of 1.00 m are selected for display. Figure 4a shows the original sequence waveform of the reflected wave, and Figure 4b depicts the waveform after the wavelet denoising, which is smoother than the original waveform. Figure 4c,d display the waveforms after the first and quadratic self-correlation analysis, respectively. As it can be seen, each subsequent iteration of the analysis highlights the periodicity of the reflected wave. The time-frequency analysis of the signal after quadratic self-correlation analysis is displayed in Figure 5, from which the periodic variation of energy can be seen. Since the data are subjected to self-correlation and STFT, the time-frequency spectrogram is symmetric on the time and frequency axes. The area marked with a black dotted box on the time-frequency spectrogram is selected as the region of interest (ROI). The ROI, which includes the first few complete, regular cycles of the time-frequency spectrogram, is regarded as an object of image processing. At present, the time interval of the ROI is \(\Delta\)\(=\) 0.008 s, and the pixel columns of the ROI are 420.  
Figure 4: Signal denoising and enhancement. (**a**) Original sequence waveform, (**b**) waveform after wavelet denoising, (**c**) waveform after first self-correlation, (**d**) waveform after quadratic self-correlation.  
Figure 5: Time–frequency spectrogram (black dotted box indicates the region of interest (ROI) area).  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Test No.** & **1** & **2** & **3** & **4** & **5** & **6** & **7** & **8** \\ \hline Buried depth (m) & 0.00 & 0.20 & 0.40 & 0.60 & 0.80 & 1.00 & 1.20 & 1.40 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Buried-depth status of the buried metal pile (full length 2.00 m).  
The X-direction edge detection is performed on the time-frequency spectrogram using the Sobel operator to obtain an edge image, as shown in Figure 6a. In addition to the obvious pixel periodic distribution, the edge image also contains small textures that need to be removed to reduce the signal obstruction. The edge image is grayed out using the maximum value method, and the gray image with the highest brightness is rendered, as shown in Figure 6b. Figure 6c shows the result of the binarization. Compared to Figure 6b, there are fewer fine textures in Figure 6c. Figure 7a is a statistical waveform of the mean value of the column pixels in the binary image. Although some larger peaks can be seen, the waveform is still hard to interpret. Figure 7b shows the self-correlation operation result of the statistical waveform, with a more defined periodicity. Figure 7c is a spectrum diagram after FFT; the frequency corresponding to the maximum amplitude is 39 Hz (except the zero frequency). The maximum frequency of the signal is 420 Hz. The wave velocity in the buried metal piles is 4800 m/s. The period of the reflected signal is obtained by using Equation (6), and according to Equation (7), the approximate length of the buried metal piles is calculated to be 0.9846 m, with an error of 1.54% for the true length of 1.000 m.  
Figure 6: Extraction of the edge information of the ROI. (**a**) Edge detection result; (**b**) grayscale image; (**c**) binarized image.  
Figure 7: Extracting the image period from the ROI. (**a**) Statistical waveform; (**b**) self-correlation operation result; (**c**) spectrogram.  
Table 4 lists the test results for the different depths of the 1.00 m buried metal piles. Among them, 15 sets of data were collected for each working condition and the values averaged to obtain the measured length. The error range fluctuated between 0.92% and 1.54%, with an average error of 1.10%.