Sub-surface defects detection of by using active thermography and advanced image edge detection

Active or pulsed thermography is a popular non-destructive testing (NDT) tool for inspecting the integrity and anomaly of industrial equipment. One of the recent research trends in using active thermography is to automate the process in detecting hidden defects. As of today, human effort has still been using to adjust the temperature intensity of the thermo camera in order to visually observe the difference in cooling rates caused by a normal target as compared to that by a sub-surface crack exists inside the target. To avoid the tedious human-visual inspection and minimize human induced error, this paper reports the design of an automatic method that is capable of detecting subsurface defects. The method used the technique of active thermography, edge detection in machine vision and smart algorithm. An infrared thermo-camera was used to capture a series of temporal pictures after slightly heating up the inspected target by flash lamps. Then the Canny edge detector was employed to automatically extract the defect related images from the captured pictures. The captured temporal pictures were preprocessed by a packet of Canny edge detector and then a smart algorithm was used to reconstruct the whole sequences of image signals. During the processes, noise and irrelevant backgrounds exist in the pictures were removed. Consequently, the contrast of the edges of defective areas had been highlighted. The designed automatic method was verified by real pipe specimens that contains sub-surface cracks. After applying such smart method, the edges of cracks can be revealed visually without the need of using manual adjustment on the setting of thermo-camera. With the help of this automatic method, the tedious process in manually adjusting the colour contract and the pixel intensity in order to reveal defects can be avoided.


Introduction
Active thermography has been proven to be a reliable tool to defect internal cracks. A great deal of research work has been carried out to implement qualitative and quantitative analysis [1]. One of the most popular applications in thermography is the capability in detecting internal cracks in various structures. Most of the cracks are invisible from external view. However, ignoring these cracks will ultimately cause serious consequence as they may continuously deteriorating and finally fatal breakdown occurred. To reveal these invisible cracks, active thermography has been proposed to predict, detect and quantify the cracks [2]. The advantages of active thermography include non-contact and non-intrusive inspection, possibility in detecting internal cracks and a fast and portable method. Recently, active thermography has also been applied to detect  [5] as the existence of internal cracks may cause uneven density which affected the internal heat flow in time [6].
In active thermography, an external stimulus is needed to apply to an inspected specimen causing nonstationary heat flow. The stimulus could be an optical stimulation method, such as flash light, that is used to deliver heat energy to the specimen. The heat energy propagates as thermal waves inside the specimen. The propagation of heat depends on the specimen's material properties, such as thermal conductivity or density [2]. During the propagation, when the heat flow encountered a defect inside the specimen, it will change the heat propagation rate and produce thermal contrast. Among different optical stimulation methods, optical pulsed thermography, optical lock-in thermography, and optical step heating thermography are the most common ones. Compared with the other two methods, the optical pulsed thermography is less time consuming. Since only the temperature decay is of interest, the signal-to-noise ratio (SNR) of defects obtained during the raw cooling down period may not be sufficient high. Conventionally, various signal enhancement methods would be employed to enhance the SNR. They include the thermal contrast [7][8] [9], the pulsed phase thermography [10], the principal component thermography [11], the logarithmic polynomial fit and derivatives [12], the dynamic thermal tomography [13] etc. In summary, a fully automatic defect detection method for active thermography has been designed and reported here. It can detect internal cracks in a pipe without any human intervention. Moreover, an improved edge detection method for enhancing the SNR of image and a packet of canny edge detectors for removing non-uniform background have been embedded with the automatic defect detection method. Hence, the automatic method is able to convert the temperature signal, which has low thermal contrast between the defective and normal areas of the specimen, into detectable edges and distinguishable cracks automatically.

Automatic detection
The proposed approach for detecting a damage from a sequence of image signals is broken down into several steps which are outlined in the following sections. Figure 1 shows a summary of the steps. The detailed procedure will be introduced in the following sections. Apply the smart algorithm to aggregate this packet of files generated at different threshold values into a grey scale picture ( Figure 9) Reconstruct all aggregated pictures collected at different time intervals into one final picture so that the sub-surface cracks can be seen visually ( Figure 10)

Active thermographic inspection
Experiment is applied using two flash lamps of 4800 watts at 50% capacity. The lamps are turned on for a moment and triggering the source at milliseconds. Before and after the lamps flash, the temperature of specimen is recorded for a total of 10 seconds. Infrared images are acquired using a FILR SC3000 thermal camera. This FILR SC3000 operates in 8 to 9 μm waveband and produces thermal images of 320*240 pixels. Before applying the reconstruction method, we could extract the region of interest and from the temperature time history of the thermographic data. In particular, the stimulating period is too short for analysis, so we will only count the cooling down period as shown in Figure 2. The number of frames starting from the stimulating one to last one of the interest region is set as 60 here, which means 2s infrared video signals at the 30Hz.

Canny edge detector
The Canny edge detection algorithm is known to many as the optimal edge detector [14]. The process of the implementation of canny detector is below: Smoothing the image with an appropriate Gaussian filter to reduce the irreverent details of image. By comparing each [ , ] in four directions, if the gradient magnitude at a pixel is larger than those at its two neighbours in the gradient direction, mark the pixel as an edge. Otherwise, mark the pixel as the background. The weak edges were removed by doubling the threshold values. The low threshold value equal to the high threshold value ℎ times 0.4 by default. If the edge pixel's gradient value is higher than the high threshold value, they are marked as strong edge pixels. If the edge pixel's gradient value is smaller than the high threshold value and larger than the low threshold value, they are marked as weak edge pixels.
If the pixel value is smaller than the low threshold value, they will be suppressed. Then a group Canny edge detectors with different threshold values were applied the images. The threshold values were started from 0.001 to 0.1, a total of 100 numbers (n =100), decided based on the edge map results, and the maxima threshold value must turn out to be sufficient large after testing. The last frame of infrared video signals, which could be regarded as a fully cooling down infrared image, was pro-processed by Canny edge detector with the scale from 0.001 to 0.999. The result of total edge numbers in edge map is shown in Figure 3. When the threshold values are between 0.012 and 0.1, the total edge numbers are decaying immediately. Then after the value of 0.1, it starts to converge. Four critical threshold values were chosen and compared by their edge maps as shown in Figure 4. Here, the value of 0.1 is the upper limit of threshold scale at a confidence level of 95%. The parameter selected for Gaussian filer is consistent and decided based on experience.

The smart algorithm for crack detection
The smart algorithm is to apply a group of different threshold values for Canny edge detector to each infrared picture and then reconstruct the raw video signals to a grey scale picture. The smart processes are described in Figure 5. Every single infrared image captured by the thermal camera was processed by a packet of canny edge detector with different threshold values. The number of detectors was set as 200. Then a reconstructed the image was formed by computing the sum of edge map value of each pixel and made it as a new sequence of image signal as shown in Figure 5(d). Figure 5(e) shows the comparison of raw defect signals and normal signals that has no significant difference between them. Figure 5(f) shows the reconstructed signals by the smart algorithm. There is a large difference in edge indexes between the defect and normal signals.  between images with and without cracks (the difference can hardly be seen); (f) the comparison of frame number vs. edge index between images with and without cracks (the difference is obvious).

Experimental setup and results
The proposed procedure to detect damage automatically has been applied to a specimen ( Figure 6) which contain two artificial cracks inside with different directions. The device consists of a thermal camera and two flash lamps as external stimulus, as can be seen in Figure 7. The distance between thermal camera and specimen is more than 1m long. Figure 8 shows some infrared pictures in the different period of the whole experiment and the result obtained from the proposed procedure for internal cracks detection. We can see from Figure 9 that the contrast of the edge of cracks area in enhanced compared to its raw image signal in Figure 8. The proposed detection procedure is able to detect both the two defects and locate the edge of these cracks accurately from a long distance. In Figure 10, the shape of pipe can be seen clear that is easy to be classified as the background of the pipe specimen.

The thermal camera
The computer (PC) with builtin algorithms to collected the image data and automatically detect the two sub-surface cracks    Figure 10. The reconstructed picture after by calculating the average of all pixels from all aggregated pictures and then used these averaged pixels to reconstruct the final picture of which the two sub-surface cracks can be revealed visually.

Conclusion
This paper presents an automatic system for detecting internal/sub-surface cracks from a sequences of infrared pictures captured by using the method of active/pulsed thermography. A pipe with two internal cracks was chosen for testing the effectiveness of the proposed method that includes the active thermography and Canny edge detection algorithm. An external stimulus in terms of triggering two flash lamps was applied to the pipe in order to induce relevant thermal contrasts between the defective and non-defective areas of the pipe. During the inspection processing, the suspended region of interest was selected in the captured thermo-pictures. The image pixel values within the region of interest were extracted from different temporal files collected in respective to the defined time interval and duration. Then different Canny edge detectors with different threshold values were applied to the captures pictures to eliminate the effect caused by nonuniform heating as well as enhance the local difference between the pixels that contained the normal and crack information. Subsequently, all of the resultant pictures treated by having different threshold values but captured at the same time interval were aggregated together. Eventually, the pixel values were averaged among all these files and then reconstructed into one grey scale picture. Experimental results prove that the edge of both two internal cracks can be visually observed from this final grey scale picture. All the above processes were conducted automatically. Hence, the proposed method introduced in this paper is superior to the conventional way which uses the tedious and manual adjustment to tune the temperature/colour intensity so that the sub-surface cracks can be finally identified. With the help of this method, a fully automatic defect detection method can be developed to reveal sub-surface defects by combining the active thermography and Canny edge detector and smart algorithm.