Non-destructive testing (NDT) plays a crucial role in large scale industrial production such as in the nuclear industry and bridge structures where even a small crack can lead to severe accidents. The pulsed eddy current infrared thermography testing method, as a classic non-destructive testing technology, is proposed to detect cracks in the presence of excitation sources that cause temperature changes in the vicinity of defects, which is higher than normal area. However, in the vicinity of the excitation sources, the temperature is higher than normal even if there is no defect. Traditional infrared image enhancing algorithms do not work efficiently when processing infrared images because the colors in the images represent the temperature. To address this, a novel algorithm is proposed in this paper. A weighted estimation algorithm is proposed because each pixel value has a strong relationship with its neighboring pixels. The value of each pixel is determined by calculating the values of its neighboring pixels with a specific step-size and the correlation coefficients between them. These coefficients are obtained by calculating the differences between the pixels. The experimental results indicated that the outline of the welding defect became significantly clearer after being processed using the proposed algorithm, which can eliminate the errors caused by the excitation source.