# Automatic Extraction of Material Defect Size by Infrared Image Sequence
## 2 Theory and Methods
### Maximum of Sandard Deviation of Sensitive Region Method (MSDSM)  
Equation (9) indicates that the propagation of the Q can be affected by the presence of defects in the bulk of the material, and that different defects at different depths would have different character times for affecting the distribution of temperature of specimen at the surface. When it happens, the rate of heat diffusion into the bulk of the specimen is perturbed by the presence of defects, and this manifests as a gradual emerging and then disappearing of heat as a function of time. When the object is monitored by a heat sensor such as a thermal camera, the time frame of the thermal images will be a good indicator for pinpointing the physical location of the defects inside the bulk of the specimen. Therefore, the selection of a appropriate image frames from the thermographic image sequence will allow one to assess the shapes and areas of different defects at different depths readily. However, the key issue for the identification of a suitable frame from thousands of infrared frame sequence seems to be non-trivial. Consider there is one subsurface defect in the simplistic example, as shown in Figure 2.  
Suppose the specimen is described as a full set \(I\) and a defect inside the bulk of specimen is depicted by a subset \(A\), such that the sound area (i.e., defect-free) inside I is the complementary set of \(A\), which is called \(B\). Obviously, \(A\cup B=I\). If any small segment of the defect edge is arbitrarily selected, the small local area surrounding the selected edge segment is called a sensitive region and it is depicted as \(C\) in Figure 2.  
In this example, all image pixels of the thermogram (\(p\)) belong to two types of elements, that is, local defect pixels (\(p\in A\)) and local non-defective pixels (\(p\in B\)). When \(p\in A\cap B\), \(p\) is on the local defect boundary. Assume that the size of the sensitive region in this example varies from \(10\times 10\) pixels to \(15\times 15\) pixels such that it contains enough pixels to include two different types of pixels that are not too large or too small to define the defect boundary. In this example, all pixels inside the sensitive region are represented by \(p_{\rm s}\). When the thermal wave front is diffused into the sensitive region, the temperature of \(p_{\rm s}\) is increased significantly due to the presence of the dislocation defect in the sensitive region. Since the sensitive region is slightly larger than the defect boundary, the statistics of \(p_{\rm s}\), such as the  
Figure 2: Schematic diagram to illustrate the sensitive area (C) of defects (\(A\)) in the specimen (\(I\)).  
standard deviation of all pixels in \(p_{\rm s}\), is expected to vary in large magnitude when the thermal wave front is approaching (i.e., heating) and exiting (i.e., cooling) of the defect boundary.  
The insertion diagram in Figure 3 describes the process of recording the change of the surface temperature of the specimen in the form of sequence diagram. The curve of Figure 3 shows the standard deviation of the sensitive area as a function of the time, and the time can be replaced with a frame number. The peak of the standard deviation-time curve at \(F_{\rm max}\) depicts the maximum temperature differences between the defect and non-defect pixels. Therefore, the appropriate image frame can be abstracted for further image processing; thereby, the characteristics of the defect can be assessed accordingly. This methodology, which is known as the maximum of standard deviation of sensitive region method (MSDSMM), has been utilized for the automatic detection of defects in the specimen in this paper.