As an essential processing step in many disciplines, signal denoising efficiently improves data quality without extra cost. However, it is relatively under-utilized for terahertz spectroscopy. The major technique reported uses wavelet denoising in the time-domain, which has a fuzzy physical meaning and limited performance in low-frequency and water-vapor regions. Here, we work from a new perspective by reconstructing the transfer function to remove noise-induced oscillations. The method is fully objective without a need for defining a threshold. Both reflection imaging and transmission imaging were conducted. The experimental results show that both low- and high-frequency noise and the water-vapor influence were efficiently removed. The spectrum accuracy was also improved, and the image contrast was significantly enhanced. The signal-to-noise ratio of the leaf image was increased up to 10 dB, with the 6 dB bandwidth being extended by over 0.5 THz.