# Automatic Extraction of Material Defect Size by Infrared Image Sequence
## 2 Theory and Methods  
### Principle of Long Pulse Thermography  
In the application of pulsed infrared nondestructive testing, the heat diffusing across a media is susceptible to the property of the media as well as to environmental factors. In the Cartesian coordinates, the transient temperature \(T\) (\(x\), \(y\), \(z\)) is in an unsteady state, and in the absence of an internal heat source, it is a function of space and time. For an arbitrary interface \(S\) with a corresponding volume \(V\) in the media (see Figure 1a,b), the temperature gradient in the normal direction of a small element on the closed surface of \(S\) can be written as follows:  
In contrast, according to the basic concept of heat conduction, the total amount of heat contained in the volume \(V\) is:  
\[Q_{V}=\iiint_{V}c\rho T(x,y,z,\tau)dV \tag{4}\]  
where \(c\) is the specific heat capacity of infinitesimal (J/(kg.\({}^{\circ}\)C)), and \(\rho\) is the density of infinitesimal (kg/m\({}^{3}\)). The diffusion of \(T\) over the volume \(V\) per unit time is:  
\[q_{V}=\iiint_{V}cp\frac{\partial T}{\partial\tau}dV. \tag{5}\]  
Equations (3) and (5) are different mathematical forms of the same physical quantity, leading to the following equation:  
\[c\rho\frac{\partial T}{\partial\tau}=\lambda\left(\frac{\partial}{\partial x }\left(\frac{\partial T}{\partial x}\right)+\frac{\partial}{\partial y} \left(\frac{\partial T}{\partial y}\right)+\frac{\partial}{\partial z}\left( \frac{\partial T}{\partial z}\right)\right). \tag{6}\]  
Therefore, the three-dimensional unsteady heat conduction differential equation becomes:  
\[\frac{\partial^{2}T(x,t)}{\partial x^{2}}+\frac{\partial^{2}T(y,t)}{\partial y ^{2}}+\frac{\partial^{2}T(z,t)}{\partial z^{2}}=\frac{1}{\alpha}\frac{ \partial T(x,t)}{\partial t} \tag{7}\]  
where \(T\) (\(x\), \(t\)) is the temperature of the spot \(x\) at the time \(t\) and it is a property of the coefficient of thermal diffusivity that has been used for measuring the heat transfer and storage ability of the material. Equation (7) gives the form of three-dimensional heat transfer (diffusion) function. It is generally difficult to find the analytical solution because of the complexity of the actual solution conditions. Therefore, this equation is often simplified to the form of one-dimensional heat conduction in practice. While the one-dimensional heat conduction theory cannot explain all the thermal phenomena, the one-dimensional heat conduction model derived from the heat transfer differential equations can provide approximate solution to problems [28] in most of our experiments (such as thickness measurement). Under given initial boundary conditions, the function of thermal energy propagating in the medium can be obtained by solving the heat conduction equation. Now, suppose a sheet of isotropic material with a thickness of \(x_{2}\) along the \(x\)-axis direction, as shown in Figure 1c. At the lower part of the sheet is a pit defect \(x_{1}\) deep from the surface. Assume that the temperature is uniform across the cross-section perpendicular to the \(x\)-axis, which means that there is  
Figure 1: Schematic diagram of heat conduction theory: (**a**) Solid model; (**b**) Diagram of infinitesimal analysis; (**c**) A slab of specimen is excited by a pulsed heat source. no heat exchange between the sheet and the ambient environment and there is no heat source in the bulk of the sheet material. When the specimen is excited by a heat pulse \(Q\) which is then absorbed by the object surface, the transient temperature of the specimen varies as a function of the coordinates \(x\) and time \(t\) according to the heat diffusion equation:  
\[\frac{\partial^{2}T(x,t)}{\partial x^{2}}=\frac{1}{\alpha}\frac{\partial T(x,t )}{\partial t} \tag{8}\]  
where \(\alpha\) is the thermal diffusivity. To simplify the calculation, \(\alpha\) can be regarded as a constant. Heat is applied to the surface of the test object at \(t=0\).