Infrared thermographic non-destructive testing (NDT) has emerged as a powerful technique for the detection and evaluation of internal defects in metallic components. This thesis focuses on the numerical simulation and experimental validation of infrared thermographic methods for detecting internal defects in aluminum castings, particularly those arising from sand casting processes. Throughout this work, the term sand foundry defects refers to common internal anomalies such as porosity, gas holes, shrinkage cavities, and inclusions that occur during the sand casting of engine blocks and similar structural components. The study integrates finite element analysis (FEA) with advanced image processing algorithms to enhance defect detectability. First, a three-dimensional transient thermal model is developed using ANSYS software to simulate the temperature field evolution on the surface of an aluminum specimen containing subsurface defects of varying size and depth. The simulation results indicate that defects create localized temperature anomalies that can be captured by an infrared camera. Second, two image enhancement approaches are investigated: a global Retinex algorithm for single-frame infrared images and a singular value decomposition (SVD) based method for infrared image sequences. Experimental measurements are carried out using a HY-6900 infrared thermography system. The results demonstrate that both enhancement methods significantly improve the contrast and signal-to-noise ratio (SNR) of the defect regions, thereby facilitating the reliable identification of sand foundry defects. The combination of finite element modeling and advanced image processing provides a robust framework for optimizing detection parameters and improving the accuracy of infrared thermographic inspection of castings.
Introduction
Non-destructive testing (NDT) plays a vital role in modern manufacturing, ensuring product quality and structural integrity. Among the well-established NDT techniques, such as radiography, ultrasonic testing, magnetic particle testing, penetrant testing, and eddy current testing, infrared thermographic testing offers unique advantages: it is non-contact, fast, real-time, capable of covering large areas, and suitable for remote and mobile inspection. Over the past decades, infrared thermography has evolved from a passive imaging tool into an active thermographic technique known as infrared thermographic testing or pulsed thermography. This method uses controlled external heating to excite the test object and records the transient surface temperature distribution with an infrared camera. The presence of internal defects modifies the heat diffusion process, leading to characteristic thermal signatures on the surface. By analyzing these signatures, one can infer the existence, location, and approximate size of hidden anomalies.
The detection of sand foundry defects is particularly challenging because such defects are often subsurface, small in size, and have thermal properties that differ only slightly from the base material. In sand-cast aluminum components, common defects include gas porosity, shrinkage porosity, sand inclusions, and oxide films. These defects can significantly degrade the mechanical performance of the component. Therefore, reliable and sensitive inspection methods are required. Infrared thermographic detection has become increasingly attractive because it can quickly inspect large surfaces without physical contact. However, the interpretation of thermal images is often complicated by non-uniform heating, environmental reflections, surface emissivity variations, and noise inherent in infrared detectors. Consequently, advanced signal processing and image enhancement techniques are essential to extract weak defect signals from noisy thermal images.
This thesis addresses the challenge of detecting sand foundry defects in aluminum castings by combining numerical simulation with experimental validation. The objectives are threefold: (1) to develop a finite element model that simulates the thermal response of a casting containing internal defects during active heating; (2) to determine the influence of defect depth and diameter on the surface temperature contrast; and (3) to implement and compare image enhancement algorithms for improving defect visibility in both single-frame and sequence-based infrared images.
Theoretical Background of Infrared Thermographic Testing
The physical principle underlying infrared thermographic testing is the relationship between the surface temperature of an object and its infrared radiation. According to the Stefan-Boltzmann law, the total radiant power emitted per unit area from a blackbody is given by
$$M = \sigma T^4$$
where \( \sigma = 5.67 \times 10^{-8} \, \mathrm{W\,m^{-2}\,K^{-4}} \) is the Stefan-Boltzmann constant and \( T \) is the absolute temperature. For a real surface, the emissivity \( \varepsilon \) is less than unity, so the emitted radiation is
$$M = \varepsilon \sigma T^4$$
When an internal defect exists, the local thermal conductivity and heat capacity are altered, causing a perturbation in the heat flow. This perturbation results in a surface temperature difference between defective and non-defective regions. For a one-dimensional heat conduction model, the temperature distribution satisfies the Fourier heat conduction equation
$$\rho c \frac{\partial T}{\partial t} = k \frac{\partial^2 T}{\partial x^2} + Q$$
where \( \rho \) is density, \( c \) is specific heat capacity, \( k \) is thermal conductivity, \( T(x,t) \) is temperature, \( x \) is depth, and \( Q \) is the internal heat generation rate. The thermal diffusivity \( \alpha = k/(\rho c) \) determines how rapidly heat diffuses through the material. In the presence of a subsurface defect, the effective thermal diffusivity in the defect region changes, leading to a delayed or accelerated thermal response on the surface.
For a pulsed heating source, the surface temperature of a defect-free semi-infinite medium after a short heat pulse decays as
$$T(0,t) = \frac{Q_0}{e \sqrt{\pi \rho c k t}}$$
where \( Q_0 \) is the absorbed energy per unit area. If a defect is located at depth \( L \), the temperature contrast between the defective and non-defective areas reaches a maximum at a characteristic time \( t_{\mathrm{max}} \) that is approximately proportional to
$$t_{\mathrm{max}} \approx \frac{L^2}{\pi \alpha}$$
This relation is essential for selecting the appropriate observation time during an experiment. Deeper defects require longer observation times, but the thermal contrast decreases rapidly with depth.
There are two active heating configurations: single-sided (reflection) and double-sided (transmission). In the single-sided mode, both the heat source and the infrared camera are on the same side of the specimen. This is preferred for field inspections because it requires access to only one surface. For insulating defects such as air gaps, the defect acts as a thermal barrier, causing a “hot spot” on the surface during the cooling phase. For conductive defects, the opposite effect is observed. The double-sided mode places the heat source and camera on opposite sides, which is sometimes used for thin structures. In this work, the single-sided reflection mode is adopted because it is more practical for inspecting engine blocks and other large castings.
Finite Element Simulation of Sand Foundry Defects
Model Set-up
To understand how different defect parameters affect the surface temperature distribution, I performed transient thermal simulations using the ANSYS finite element software. The model represents an aluminum cylinder with a diameter of 40 mm and a height of 20 mm. Internal air-filled cylindrical cavities are introduced to simulate gas pores or shrinkage voids, which are typical sand foundry defects. The simulations consider defects with diameters of 6 mm, 10 mm, and 15 mm, and depths from the detection surface to the top of the defect ranging from 1 mm to 10 mm. The initial temperature of the specimen is set to 80°C, the ambient temperature is 25°C, and the convective heat transfer coefficient on the exposed surface is assumed to be \(10 \, \mathrm{W/(m^2 \cdot K)}\).

The material properties used in the simulation are listed in the table below.
| Material | Density \( \rho \) (kg/m³) | Specific heat \( c \) (J/(kg·K)) | Thermal conductivity \( k \) (W/(m·K)) |
|---|---|---|---|
| Aluminum | 2700 | 900 | 167 |
| Air | 1.205 | 1005 | 0.0257 |
The finite element model is constructed using eight-node three-dimensional thermal solid elements (SOLID70). A mapped mesh is generated with a fine grid near the defect region to capture the steep thermal gradients. The mesh size is set to 1 mm in the bulk region and refined around the defect boundaries. The transient analysis runs for 600 seconds with a one-second time step. The heat input is applied as a surface heat flux on the top face to simulate a pulsed heat source. At time \( t = 0 \), the specimen is uniformly heated to 80°C, and then it is allowed to cool naturally through convection and radiation. This initial condition simplifies the problem while still providing meaningful insights into the thermal contrast evolution.
Governing Equations and Finite Element Formulation
The three-dimensional transient heat conduction equation in isotropic materials is given by
$$\rho c \frac{\partial T}{\partial t} = k \left( \frac{\partial^2 T}{\partial x^2} + \frac{\partial^2 T}{\partial y^2} + \frac{\partial^2 T}{\partial z^2} \right) + \dot{q}$$
where \( \dot{q} \) is the internal heat generation rate. In finite element discretization, the temperature field is approximated as
$$T(x,y,z,t) = \sum_{i=1}^{n} N_i(x,y,z) T_i(t)$$
where \( N_i \) are the shape functions and \( T_i \) are the nodal temperatures. The resulting system of ordinary differential equations is:
$$[C]\frac{\partial \{T\}}{\partial t} + [K]\{T\} = \{F\}$$
where \( [C] \) is the heat capacity matrix, \( [K] \) is the conductivity matrix, and \( \{F\} \) is the thermal load vector. For transient analysis, the time derivative is discretized using a backward difference scheme, leading to a recursive solution that is computed at each time step.
Simulation Results and Discussion
Figure 2 presents the simulated temperature distribution on the top surface at \( t = 10 \) seconds for defects of different diameters. The colormap indicates that the defective region has a higher temperature than the surrounding defect-free area because the air-filled defect has a much lower thermal conductivity than aluminum, thereby trapping heat. The thermal contrast \( \Delta T \) is defined as the difference between the average temperature over the defect area and the average temperature over a neighboring defect-free area.
For a fixed defect depth of 2 mm, the maximum temperature contrast values for different diameters are summarized in Table 2.
| Defect diameter (mm) | Maximum \( \Delta T \) (°C) |
|---|---|
| 6 | 0.3 |
| 10 | 0.9 |
| 15 | 1.8 |
Clearly, larger defects produce a more pronounced thermal signature and are easier to detect. For a small diameter of 6 mm, the contrast is only 0.3°C, which approaches the noise floor of many uncooled infrared detectors. Therefore, high-sensitivity cameras are required for detecting fine porosity in aluminum castings.
The influence of defect depth on the thermal contrast is examined for a fixed diameter of 10 mm. Table 3 lists the maximum temperature contrast for different depths.
| Depth (mm) | Maximum \( \Delta T \) (°C) |
|---|---|
| 1 | 2.1 |
| 2 | 0.9 |
| 5 | 0.2 |
| 10 | 0.05 |
The contrast decays rapidly with depth, which limits the inspectable depth range for infrared thermography. In the present configuration, defects deeper than 5 mm are very difficult to detect using conventional cameras. This finding is consistent with the theoretical relation \( \Delta T \propto 1/L \) for a fixed observation time.
Figure 3 shows the time history of surface temperatures for a defective area and a sound area. The defective area cools more slowly, and the differential temperature reaches a peak at a certain time after the initial heat pulse. This peak time can be used to estimate the defect depth. The simulations demonstrate that ANSYS is a powerful tool for predicting the optimal detection parameters, such as frame rate and observation window, before performing actual experiments.
Infrared Thermographic Defect Detection Methods
Experimental Setup and Equipment
To validate the simulation results and test the image enhancement algorithms, I used a HY-6900 infrared camera system manufactured by Guangzhou SAT Infrared Technology. The camera contains an uncooled microbolometer focal plane array operating in the 8–14 μm wavelength range. The key specifications are listed in Table 4.
| Parameter | Value |
|---|---|
| Detector type | Uncooled microbolometer FPA |
| Working band | 8–14 μm |
| Temperature resolution | 0.08°C at 30°C |
| Measurement range | -20°C to 150°C (standard) |
| Accuracy | ±2°C or ±2% (whichever is greater) |
| Field of view | 24° × 18° |
| Spatial resolution | 1.5 mrad |
| Pixels | 384 × 288 |
| Frame rate | 50/60 Hz (selectable) |
Test specimens are flat-bottom-hole aluminum plates commonly used to simulate sand foundry defects with known geometry. One specimen has five holes of diameter 10 mm at varying depths: 1, 2, 3, 5, and 7 mm. Another specimen has holes of varying diameters (4, 6, 8, 10, 12 mm) at a fixed depth of 3 mm. The surface of each specimen is painted black to ensure high and uniform emissivity.
Infrared images are recorded continuously during the heating and cooling phases. A background thermal image is captured before heating and subtracted from the post-heating frames to reduce fixed-pattern noise and background reflections. The resulting image sequences are then processed with the enhancement algorithms described below.
Retinex-Based Enhancement for Single-Frame Infrared Images
Infrared images often suffer from low contrast, non-uniform illumination, and blurry edges caused by thermal diffusion and atmospheric attenuation. The Retinex theory, originally proposed by Edwin Land, assumes that the observed image \( I(x,y) \) is the product of the illumination \( L(x,y) \) and the reflectance \( R(x,y) \):
$$I(x,y) = L(x,y) \cdot R(x,y)$$
In the logarithmic domain, the multiplication becomes addition:
$$\ln I(x,y) = \ln L(x,y) + \ln R(x,y)$$
The goal of Retinex is to estimate and remove the illumination component, thereby recovering the intrinsic reflectance, which is independent of lighting conditions. The global Retinex algorithm used in this work computes the relative brightness relationship between any two pixels along both horizontal and vertical directions. The relative brightness between a pixel \( (x,y) \) and a pixel \( (x+d_x, y+d_y) \) is defined as
$$R_r(x,y;x’,y’) = \min\left( \frac{I(x,y)}{I(x’,y’)}, 1 \right)$$
where the logarithm is applied to avoid division and to better match the human visual system. The algorithm first takes the logarithm of the input image, then initializes an output image with a constant value (e.g., zero). For increasing values of \( d_x \) and \( d_y \), the relative brightness is computed and used to correct the output pixel values iteratively. Finally, the output image is linearly stretched to the full 8-bit range.
I applied this global Retinex algorithm to a single frame of the infrared sequence that contains a defect at a depth of 3 mm and a diameter of 10 mm. The original thermal image displayed weak contrast, with the defect barely visible. After processing, the defect region became clearly identifiable, and the overall image quality improved significantly. Table 5 compares the quantitative metrics of the original and enhanced images, including the standard deviation (STD) and the signal-to-noise ratio (SNR).
| Image | Mean | Standard deviation | SNR (dB) |
|---|---|---|---|
| Original | 120.3 | 5.2 | 12.4 |
| Retinex enhanced | 128.7 | 15.8 | 23.1 |
The enhancement produces a substantial gain in SNR, enabling the detection of shallow subsurface defects that are otherwise hidden in the background. However, a few halos appear near strong edges, which is a known limitation of global Retinex methods. Nevertheless, the improvement justifies its use for single-frame inspections where only one image is available.
Singular Value Decomposition (SVD) for Sequence-Based Infrared Images
When an entire infrared image sequence is available, it is possible to exploit the temporal and spatial redundancies to further improve defect visibility. The SVD method is a powerful linear algebra tool that decomposes a matrix into singular vectors and singular values. For a matrix \( A \) of size \( m \times n \) and rank \( r \), the SVD is given by
$$A = U \Sigma V^T = \sum_{i=1}^{r} \sigma_i \mathbf{u}_i \mathbf{v}_i^T$$
where \( U \) and \( V \) are orthogonal matrices whose columns are the left and right singular vectors, \( \Sigma \) is a diagonal matrix containing the singular values \( \sigma_1 \geq \sigma_2 \geq \cdots \geq \sigma_r > 0 \). The singular values encode the energy of the data in decreasing order. Small singular values typically correspond to noise, while the large ones capture the dominant signal structure. By retaining only the first \( k \) singular values, one can reconstruct a denoised approximation of the original matrix:
$$\hat{A} = \sum_{i=1}^{k} \sigma_i \mathbf{u}_i \mathbf{v}_i^T$$
In the context of infrared image sequences, each frame is reshaped into an m-dimensional column vector. The sequence of \( n \) frames thus forms a matrix \( A \) of size \( m \times n \), where \( m \) is the number of pixels per frame and \( n \) is the number of frames. The SVD of this matrix yields an empirical orthogonal basis. The first few left singular vectors represent the dominant spatial patterns in the sequence. In particular, the first left singular vector often captures the defect information because the defect-induced temperature contrast evolves coherently in time and space, whereas random noise is incoherent.
The processing steps are as follows:
- Convert the infrared image sequence into a two-dimensional matrix \( A \) by flattening each frame and stacking them column-wise.
- Standardize the matrix by subtracting the mean of each row and dividing by the standard deviation.
- Perform SVD on the standardized matrix: \( A’ = U \Sigma V^T \).
- Select the first left singular vector \( \mathbf{u}_1 \) (or a small set of dominant vectors) and reshape it back into a two-dimensional image.
- Optionally, apply a linear stretch to enhance visual contrast.
The resulting reconstruction highlights the spatial structures that are common across the entire sequence while suppressing frame-to-frame random noise and heating non-uniformities. Figure 4 shows an example infrared thermogram from the sequence, and Figure 5 presents the reconstructed image using the SVD method. The defect regions (flat-bottom holes of varying diameters) are now clearly visible as distinct circular areas with higher intensity. The non-uniform heating pattern, which appears as a spatial gradient in the raw image, has been effectively eliminated.
To quantitatively evaluate the SVD enhancement, I used the signal-to-noise ratio (SNR) defined as the ratio of the peak-to-peak signal to the background standard deviation. The SNR of the reconstructed image is computed for different numbers of retained singular values. The results, presented in Table 6, show how the SNR varies with the number of singular values \( k \) and the number of frames \( n \) used in the decomposition.
| Frames \( n \) | Singular values \( k \) | Maximum SNR (dB) |
|---|---|---|
| 30 | 1 | 18.2 |
| 30 | 2 | 20.5 |
| 30 | 3 | 21.0 |
| 50 | 1 | 22.4 |
| 50 | 2 | 24.6 |
| 50 | 3 | 24.9 |
| 80 | 1 | 23.8 |
| 80 | 2 | 26.1 |
| 80 | 3 | 26.3 |
It is observed that increasing the number of frames improves the SNR because more temporal information suppresses noise. Additionally, the optimal number of singular values is typically small (1–3), as additional singular values start to introduce noise. Beyond a certain number of frames, the improvement saturates, so a balance between computational cost and performance must be struck. In practice, using 50 to 80 frames with 2 to 3 singular values provides near-optimal enhancement for the detection of sand foundry defects in aluminum plates.
The SVD method is particularly effective for time-resolved infrared sequences because it exploits the temporal correlation of the thermal response. Since defects produce characteristic cooling curves over time, the temporal behavior of defect pixels is different from that of background pixels. The SVD decomposition automatically discovers these temporal patterns and projects the data onto a subspace where the defect signal dominates. This makes the method robust to spatial non-uniformities, which are common in field inspections of sand castings.
Comparison of Enhancement Methods
I compared the two enhancement approaches on the same dataset. The Retinex method operates on a single frame and is appropriate when only one image is available or when the sequence is very short. The SVD method requires a sequence but provides a higher SNR gain because it uses temporal correlation. Both methods significantly outperform simple histogram equalization or median filtering, which do not address the physical nature of the thermal signal. Table 7 summarizes the qualitative comparison.
| Criterion | Retinex | SVD |
|---|---|---|
| Input data | Single image | Image sequence |
| SNR improvement | Moderate | High |
| Noise suppression | Adequate | Excellent |
| Elimination of non-uniform heating | Partial | Complete |
| Computational cost | Moderate | Higher (needs sequence) |
| Application scenario | Rapid inspection | Detailed offline analysis |
For the inspection of engine blocks and other castings with sand foundry defects, the SVD method is preferable when the inspection time permits the acquisition of a thermal sequence. In production lines where only a short observation window is available, the Retinex enhancement can be applied to a single thermogram with acceptable results.
Conclusion and Future Work
This thesis presented a systematic study of infrared thermographic detection of sand foundry defects in aluminum castings through numerical simulation and experimental image analysis. The finite element simulations using ANSYS successfully predicted the surface temperature contrast caused by subsurface air-filled defects. The key conclusions are:
- The surface temperature over a defect is higher than the surrounding defect-free area during the cooling phase, due to the lower thermal conductivity of air compared to aluminum. This result is confirmed by both simulation and experiment.
- The thermal contrast increases with defect diameter and decreases with defect depth. For the studied aluminum specimen, defects larger than 10 mm in diameter and shallower than 5 mm are easily detectable with an uncooled infrared camera.
- The optimal observation time after pulsed heating is related to the defect depth by \( t_{\mathrm{max}} \approx L^2/(\pi \alpha) \), which can guide the camera frame rate and recording duration.
- The global Retinex algorithm effectively enhances single-frame infrared images by improving contrast and SNR, making shallow defects visible. However, it may introduce halos near edges.
- The SVD method applied to image sequences removes non-uniform heating and significantly amplifies the defect signal. The choice of the number of frames and retained singular values is important: 50–80 frames and 2–3 singular values give the best SNR in this study.
Future work will focus on the following aspects: (a) extending the finite element model to more complex defect geometries and multi-layer materials; (b) developing an automated defect classification method based on deep learning; (c) implementing real-time SVD processing on embedded systems for field deployment; and (d) investigating the quantitative estimation of defect depth from the thermal contrast time series. The detection of sand foundry defects at greater depths remains a challenging problem, but with further improvements in both hardware and algorithms, infrared thermographic testing can become a reliable and cost-effective tool for quality control in the foundry industry.
