During the terahertz nondestructive testing of bonded structures, the incomplete discharge of the capacitance in the photoconductive antenna within the terahertz time-domain spectroscopy system results in a shift of the terahertz baseline produced by the antenna. This baseline shift causes variations in the amplitude information of the detected signals.
Consequently, when feature imaging of the detection waveforms is performed, the baseline shift can lead to erroneous detection results. In this study, an improved wavelet multiresolution analysis method was used to eliminate high-frequency noise and baseline offset in terahertz detection. The method is based on the frequency characteristics of the detection waveforms, setting thresholds and using similarity as a measurement standard to determine the number of decomposition layers. Ultimately, this achieves the correction of the baseline offset in terahertz signals. Compared with other baseline correction methods, the method presented in this paper achieves the lowest root mean square error of 0.57%, the highest signal-to-noise ratio of 12.64%, and a defect identification accuracy of 96.27% in two-dimensional visualization results.