Robust Principal Component Thermography for Defect Detection in Composites

Pulsed Thermography (PT) data are usually affected by noise and as such most of the research effort in the last few years has been directed towards the development of advanced signal processing methods to improve defect detection. Among the numerous techniques that have been proposed, principal component thermography (PCT)—based on principal component analysis (PCA)—is one of the most effective in terms of defect contrast enhancement and data compression. However, it is well-known that PCA can be significantly affected in the presence of corrupted data (e.g., noise and outliers). Robust PCA (RPCA) has been recently proposed as an alternative statistical method that handles noisy data more properly by decomposing the input data into a low-rank matrix and a sparse matrix. We propose to process PT data by RPCA instead of PCA in order to improve defect detectability. The performance of the resulting approach, Robust Principal Component Thermography (RPCT)—based on RPCA, was evaluated with respect to PCT—based on PCA, using a CFRP sample containing artificially produced defects. We compared results quantitatively based on two metrics, Contrast-to-Noise Ratio (CNR), for defect detection capabilities, and the Jaccard similarity coefficient, for defect segmentation potential. CNR results were on average 40% higher for RPCT than for PCT, and the Jaccard index was slightly higher for RPCT (0.7395) than for PCT (0.7010). In terms of computational time, however, PCT was 11.5 times faster than RPCT. Further investigations are needed to assess RPCT performance on a wider range of materials and to optimize computational time.


Introduction
The unique features that make carbon fiber reinforced plastics (CFRP) preferable to other materials are their high strength-to-weight ratio, good corrosion resistance, high fatigue resistance, and very low coefficient of thermal expansion. These interesting characteristics made CFRP a preferred choice in aerospace and other industries where manufacturing quality, weight, and user safety are of paramount importance. Non-destructive testing (NDT) techniques are regularly used to evaluate the efficiency and locate anomalies non-invasively. infrared thermography (IRT) is a fast, non-contact, and non-invasive NDT approach to detect and characterize anomalies (surface or sub-surface defects) in materials. Pulsed thermography (PT) is one of the most popular active IRT approaches [1]. It is based on thermal heat transfer analysis in transient mode (during cooling).
In PT, a short pulse of energy is applied to the surface of the object being inspected; once the light reaches the sample, it becomes a thermal wave propagating through the material by conduction. An infrared camera records the surface temperature decay. Following the thermal pulse, materials without defects cool down uniformly. However, the presence of a discontinuity will change the diffusion rate, which will affect the heat distribution of the object. These thermal changes will appear at the surface at different times, depending on the properties of the object and the defects, as well as their depths. The deeper is the discontinuity, the later it is observed and the lower is its thermal contrast. However, pulsed thermography data is affected by electronic noise as well as thermal and optical artifacts that may reduce defect detectability. To extract meaningful information from the noisy recorded data, different mathematical methods have been proposed.
Principal component thermography (PCT) [2] is one of such processing methods, which is based on principal component analysis [3]. PCA is a tool for high-dimensional data processing that highlights the similarities and dissimilarities in data and estimates the low-dimensional subspace. As shown in [4], PCA can provide contrast enhancement and flaw depth estimation with a reconstructed data matrix. The goal of this method is to efficiently and accurately estimate the low intrinsic matrix lying on original data. Suppose matrix M is a stacked column-vector of data: where L has a low-rank and S is a small perturbation matrix. Classical PCA looks for the rank-k estimate of L by solving Equation (2): subject to : rank(L) K where M denotes the 2-norm and K min(m, n) is the target dimension of the subspace. In addition, when S is small and independent and identically distributed (i.i.d) Gaussian noise, it is convenient to solve the problem via singular value decomposition (SVD). PCA works efficiently when the data enjoy a low level of noise; otherwise, in highly corrupted data, the estimated L can be significantly affected.
Candès et al. [5] proposed an interesting method for rendering PCA more robust, where the objective is to recover the low-rank matrix L from highly corrupted measurements M. According to Candès et al., unlike classical PCA in which noise should be small, the entries in S can have an arbitrarily large magnitude; therefore, it has been used on data containing high levels of noise, outliers, and distortions. To do so, Candès et al. decomposed the input data into a low-rank matrix and a sparse matrix, where the sparse matrix is an estimation of the noise in the data, and the low-rank matrix is an estimation of the data without noise. Candes et al.'s method is known as Robust Principal Component Analysis (RPCA).
RPCA has been used in a wide range of applications such as background estimation and foreground estimation [6], video surveillance [7], face recognition [8], speech recognition [9], latent segmentation indexing [10], and ranking and collaborative filtering to cite a few. Recently, Song et al. [11] employed the RPCA technique for noise reduction and signal enhancement in distributed detection of micro-cracks on structural elements with very small crack opening displacements. The method used by Candès et al. to decompose the data is known as principal component pursuit (PCP). Several other approaches in order to decompose input data into a low-rank matrix and sparse matrix have been proposed [7,[12][13][14]. The minimization method used in the PCP has itself been the topic of many studies. Xue et al. [15] and Yang et al. [16] offered two new implementations of the PCP decomposition approach, named Exact Augmented Lagrange Multiplier (EALM) and Inexact Augmented Lagrange Multiplier (IALM). Guyon et al. [14] proposed to solved PCP by using a Linearized Alternating Direction Method with Adaptive Penalty (LADMAP), while Wang et al. studied the accelerated proximal gradient (APG) algorithm to solve it [7].
In this paper, we introduce a new variation for the decomposition by PCP. Then, we compare its performance with respect to the state-of-the-art PT processing techniques.
The paper is organized as follows. Section 2 introduces some recent works regarding both PT data processing as well as NDT applications using RPCA. In Section 3, we present the details of the proposed algorithm. Section 4 details the different aspects of our investigations. Section 5 introduces the results we obtained, while Section 6 analyzes and discusses the results we obtained. Finally, Section 7 concludes this study.

Literature Review
As previously stated, PT is a field that is eagerly searching for new processing methods to improve the detection of defects. Thus, over the years, several approaches have been proposed. In this section, we briefly introduce methods among the recently proposed.
Khan et al. [17] used a convolutional-auto-encoder-based approach for Intrusion detection, which is fast, simple, and efficient in terms of power and cybersecurity. In addition, Zhang et al. [18] developed an approach combining domain adaption (DA) and adaptive convolutional neural network (ACNN) for steel surface defect detection, which showed an improved accuracy with respect to other methods.
Fleuret et al. [19] investigated the possible application of the Monogenic-Signal to PT data. Promising results were found; nevertheless, the method proved to be highly sensitive to noise. The same year, Yousefi et al. [20] studied an application of Sparse-PCA to PT, under the name SPCT, which outperformed existing methods in terms of defect detection although requiring a significantly higher computational time.
Wen et al. [21,22] used an improved version of the Sparse-PCA to speed up processing. This method named Edge-Group Sparse PCA (ESPCT) [23] was significantly faster than SPCT, although still noticeably slower than PCT. It offered higher defect contrast, making it very promising for the detection of smaller defects in composite materials.
Yousefi et al. [20,24,25] investigated the application of several non-negative matrix factorization (NMF) methods on a wide set of materials. These studies highlighted that NMF offers noticeably better results than other component-based approaches.
The implementation of independent component analysis (ICA) on pulsed thermography inspection of CFRP has been investigated by several authors [26][27][28]. Rengifo et al. [26] reported achieving a sensitivity of 70% on a sample test. Liu et al. [27] highlighted the ability of the ICA to handle thermal inhomogeneities, and other noise sources, as well as providing good defect contrast. Fleuret et al. [28] observed that ICA was comparable to PCT in terms of performance, but with the advantage of being less sensitive to background noise.
Fleuret et al. [29] investigated the application of another approach named Latent Low-Rank Representation (LatLRR) to PT data under the name LatLRRT. This approach differs from most of the previous works because it is based on the assumption that the data are composed of three signals: the observed data, the sparse noise, and the unobserved data. The authors concluded that LatLRRT used as a post-processing method can significantly improve results with respect to state-of-the-art approaches such as PPT [30]. Nevertheless, for the moment, the memory cost prevents this method from being used as a processing method.
Recently, Liu et al. [31] introduced an approach that uses data augmentation generated by the deep-learning models. The assumption was that deep-learning models would be able to learn statistical features from the data. Liu et al.'s method provided good results on composite materials compared with state-of-the-art methods such as PCT [4,32]. The same authors evaluated their work using ICA as a detection method [33]. Similar to the previous one, this method provides good results on composite materials.
Lopez et al. [34,35] proposed partial least square (PLS) regression to improve the general quality of the image sequences. During the regression step, the PLS algorithm can model both spatially and temporally the evolution of the signal. It was originally proposed as a denoising technique allowing synthetic data reconstruction in a manner similar to thermographic signal reconstruction (TSR) [36].
Inspired by these works, Fleuret et al. [37] investigated the use of a pair of support vector machine (SVM) algorithms [38] to enhance defect contrast. The first algorithm computes a regression in the time domain, while the second computes a regression in the space domain. Then, the output sequence is reconstructed from these regressions providing images with enhanced defect contrast.
Even though RPCA is a well-known tool for background-foreground subtraction with improved robustness to noise in several imaging application, it has seldom been investigated in infrared thermography. Zhu et al. [39,40] used RPCA to reduce noise from eddy current pulsed thermography (ECPT) data. Their work was based on the RPCA method proposed by Candès et al. [5]. Liang et al. [41] studied the use of a tensor-based RPCA approach proposed by Lu et al. [42] on ECPT. They concluded that TRPCA is a high accuracy defect extraction algorithm. Xiao et al. [43] studied the application of yet another type of RPCA for data fusion.
The RPCA method we proposed is inspired by the work of Candès et al. [5], however more recent works have been suggested since then. For instance, Peng et al. [44] proposed a highly scalable convex RPCA based on ALM and matrix factorization. Sun et al. [45] proposed a graph-based RPCA. Liu et al. [46] also proposed a graph-based method that has the advantage of being adaptive, ensuring in this way that the local structure of the data is well represented in the low-rank matrix.
Wang et al. [47] introduced the Double RPCA (DRPCA), which offers increased robustness regarding the topology of the regions in the image. In addition, unlike most of the RPCA approaches, which are transductive, DRPCA is an inductive approach, which makes it suitable for online application. Ma et al. [48] offered a review of the most popular RPCA methods used for convex optimization. Van Luong et al. [49] proposed an RPCA method for online application such as background and foreground separation. Cai et al. [50] introduced a rapid RPCA based on an accelerated inexact low-rank estimation.
Several other methods can be found in the literature. We included here a selection of studies on which we based our approach. In particular, our choice regarding the work of Candès et al. [5] is due to the stability and robustness of their approach, which for these reasons has become a reference. Nonetheless, as detailed in next section, our proposed approach is better adapted for the PT applications.

RPCA via OIALM
Among the different methods proposed in the literature to overcome the limitation of the PCA regarding noisy data, the one proposed by Candès et al. [5] has become very popular. In their work, Candès et al. used a convex optimization; the formulation they used is known as principal component pursuit (PCP). Other formulations and improvements of the PCP, have since been proposed. In particular, the work of Lin et al. [51] has become well-known due to its ability to converge faster than similar methods such as accelerated proximal gradient (APG).
Lin et al. proposed two variations of the PCP formulation using the augmented Lagrangian multiplier (ALM) approach, named Exact Augmented Lagrangian Multiplier (EALM) method and Inexact Augmented Lagrangian Multiplier (IALM). Even though both methods attempt to optimize the sparse and low-rank matrix, their main difference is a condition applied on a set of penalty parameters that allow the IALM algorithm to converge faster than EALM by avoiding the minimization of a sub-problem.
Our approach is inspired by the IALM formulation. Given an observation matrix D, which is assumed to be the combination of two matrices, A (low-rank) and E (a sparse matrix), the straightforward formulation to minimize the energy function is to use the l 0 -norm: where · 0 is the l 0 -norm, that is, the number of the non-zero items of the matrix, and implies the sparsity. λ is the balance parameter to determine the contributions of A and E in minimizing the objective function. Since Equation (3) is an NP-hard problem, i.e., at least as hard as the hardest problems in non-deterministic polynomial (NP) time, Candès et al. [5] reformulated this equation into a similar convex optimization problem as follows: where A * and E 1 are the nuclear norm of A and l 1 -norm of E, respectively. The balance parameter λ is defined as: where m is the number of rows and n is the number of columns of the 2D input matrix. Lin et al. [51] solved Equation (4) using a generic ALM method, which solves the constrained optimization problem: The Lagrange function can be defined as: According to the Lagrange multiplier method, Equation (6) can be reformulated to solve the RPCA problem as follows: The Lagrange function of Equation (8) is defined as: where Y is the Lagrange multiplier and penalty parameter µ is a positive scalar parameter. The approximate exact augmented Lagrange multiplier algorithm used to solve the RPCA problem is shown in Algorithm 1. Y 0 has been initialized to Y 0 = D/J(D) [52], making the objective function value Y 0 , D reasonably large. In addition, where . ∞ is the maximum absolute value of the input matrix. In each iteration after solving A k+1 and E k+1 , the low-rank matrix L is updated by Incremental-PCA [53]. In Step 1 of Algorithm 1, ρ is the learning rate and µ 0 is the initialization of the penalty parameter that influences the convergence speed. In [51], it is proven that the objective function of the RPCA problem (Equation (4)), which is non-smooth, has an excellent convergence property. In addition, it has been proven that, to converge to an optimal solution (A * , E * ) of the RPCA problem, it is necessary for µ k to be non-decreasing and ∑ +∞ k=1 µ −1 k = +∞. As can be noticed from Equation (10), our proposed approach differs from the IALM in that the low-rank matrix is projected into an orthogonal space, which is why we named this approach Orthogonal IALM: where u is a unit vector so u T u = 1. This projects the low-rank value into an orthogonal space while maximizing the variance between the projected data. This step provides relevant information to be projected among the projected matrix's first dimensions; therefore, it is possible to reduce the computational cost by only keeping γ dimensions, which corresponds to a PCA.

Algorithm 1: RPCA via the Orthogonal IALM method
Input: Data: D ∈ R m×n , balance parameter λ, dimensionality reduction scalar: In the next section, we describe our experiments and analysis and present our data.

Methods
In the previous section, we introduce RPCA. Now, we describe the different aspects of the experiments we conducted in order to evaluate its performance. Figure 1a shows our research block diagram, which presents all of the steps.

Data Acquisition
An academic CFRP plate (30.8 cm × 46 cm × 2.57 mm) was used in this study. It possesses 73 defects of three different types: 23 round flat-bottom holes (FBH), 25 triangular Teflon inserts, and 25 triangular pullouts. These types of manufactured flaws are employed to represent delaminations in CFRP laminates in Ultrasonic Testing because the change in acoustic impedance between the composite and the defect (Teflon or air) produces a variation in the ultrasonic signal when it passes through [54]. This plate was already used to study the adequateness of such artificial defects to represent delamination in thermography and shearography NDT [55] as well as for research on PCA analysis in shearography [56,57]. Defect size, depth, and thickness are indicated in Table 1, and their respective locations are shown in Figure 2a.
The PT experimental setup consists of two flash lamps (5 ms thermal pulse, 6.4 KJ/flash (Balcar, France)), a cooled infrared camera (FLIR Phoenix (FLIR Systems, Inc., Wilsonville, OR, USA), InSb, midwave, 3-5 mm, Stirling Cooling), and a computer to store the thermal sequences. The data were acquired at a frequency of 180 Hz. A control unit was also required to control and synchronize the data acquisition with flash triggering. Our experiments were performed using a PC (Intel(R) Xeon(R), 128 Gb memory, (Intel Corporation, Santa Clara, CA, USA)). Figure 2b, shows the PT approach in reflection mode.

Metrics
In this section, we briefly introduce the different metrics we used to quantitatively assess the performance of our proposed approach RPCT, and compare it to PCT.

Contrast to Noise Ratio (CNR)
The Signal-to-noise ratio (SNR) is a metric that measures image quality by estimating the signal level with respect to the background noise. The Contrast-to-noise ratio (CNR) is similar to SNR although based on the difference (i.e., the contrast) between two features in an image. This contrast can be calculated, for instance, for a defect area with respect to a sound area. This is interesting since it provides a tool to quantitatively assess the defect detection capabilities of a given method. Several CNR definitions can be found in the literature, as summarized by Usamentiaga et al. [58]. This study also proposes to use the following definition, as it has been shown to be the most robust against noise and image enhancement operations (e.g., Gamma correction): where µ S is average level of the signal in the defect region, µ N is the average level of the noise in the sound area, σ S is standard deviation of the signal in the defect area, and σ N is standard deviation of the noise in the reference region.

Jaccard Similarity Coefficient Score
The Jaccard similarity coefficient (also known as Jaccard index or Intersection-Over-Union (IoU)), initially proposed by Paul Jaccard [59], is a statistical method that measures the similarity between two datasets and is defined as the ratio of the intersection size to the union size of two sample sets (as illustrated in Figure 3).The Jaccard index is a useful and very straightforward metric. In this approach, four steps should be taken into account:

1.
Count the number of members (i.e., pixels) that are shared between both sets (intersection).

2.
Count the total number of members in both sets i.e., the union (shared and unshared).

3.
Divide the number of shared members (1) by the total number of members (2).

4.
Multiply the computed result from Step 3 by 100.
J (A, B) provides a value between 0 (no similarity) and 1 (identical sets). Hence, the higher is the value of IoU, the higher is the level of similarities between two sets (Figure 3b).

Analysis
We chose to compare our approach RPCT that is based on RPCA, with principal component thermography (PCT) [32] that is based on PCA, to verify if the use of RPCA will effectively reduce the impact of noise.
The calculation of the score for each one of our two metrics was carried out using two different protocols. For the calculation of the Jaccard Index, we developed a custom automatic segmentation approach, as illustrated in Figure 4. This approach is based on four steps: First, the image's contrast is corrected using a percentile normalization between the second and ninety-eighth percentiles. The choice of the percentile normalization is due to the ability of this approach to increase the contrast even in the presence of local light artifacts. Then, a bilateral filter [60] is used to smooth the image. To smooth efficiently, we selected a spatial filter with a kernel of size 31 × 31 pixels and a range filter with kernel of size 7 × 7 pixels. The third step consists in applying a local thresholding approach based on a block of 101 × 101 pixels. The last step consists in removing the small objects in 2 connectivity with smaller than 64 pixels present in the image. The reason for the latter step is to remove artifacts that could have been generated by the third step.
Once the images of the different methods are segmented, they can be compared with a manually labeled reference image in order to compute the metric score.
Regarding the CNR score, before the experiments, both the defect regions and sound areas were manually labeled, as can be seen in the two examples shown in Figure 5, where three boundaries can be seen: red, green and blue. The sound area is located in between the outermost boundary (in red) and the middle boundary (in green), while the defect area corresponds to the area inside the innermost boundary (in blue). The average and standard deviation values required in Equation (11) are calculated from these areas. The exact same areas were used to estimate the CNR values from raw, PCT, and RPCT data.  The following section presents the results.

Results
The original PT sequence (raw data) was processed by PCT and RPCT. Figure 6 shows some representative results (selected arbitrarily) of the different methods. Raw data correspond to the original unprocessed data. The arithmetical difference between a defective and a non-defective (sound) pixel (or group of pixels) is called the absolute thermal contrast, or simply the contrast. A given defect would be visible, i.e., its contrast would be higher than zero during a certain time that depends on different factors (defect type, size and depth, inspection method, amount of delivered energy, etc.). The thermal contrast typically varies from zero to a maximum, and then it gradually returns to zero. For instance, considering defect FBH-4M (at the center of the plate, highlighted in Figure 7), Figure 7 shows the thermal profiles, i.e., temperature vs. time plots, for a pixel inside the defect area (red plot), the profile of a pixel in the sound pixel close to this defect (blue plot), and the thermal contrast (green plot).
Hence, defects are visible at different degrees during several frames. In the case illustrated in Figure 7, defect FBH-4M can be detected roughly from 0.1 to 10 s, which corresponds to the time range where the contrast is higher than the noise. All other defects in the inspected plate produce similar profiles, with deeper defects appearing later and with lesser contrast.
PCT and RPCT, on the other hand, are statistical methods based on PCA and RPCA, respectively, that reorder data according to their variability and project them into an orthonormal space in such a way that the most valuable information is compressed in the first few components while subsequent components contain mostly noise. Figure 8 shows some selected PCT components: (Figure 8a) first PCT component showing several defects but also a strong non-uniform heating pattern (two ellipses, left and right) that accounts for most of the variability of the data and are therefore concentrated in the first component; (Figure 8b Table 2 summarizes the computational time for each of the processing techniques. As can be seen, RPCT takes significantly more time to compute (483 s) than PCT (42 s). Further optimization of the processing algorithm would be required to reduce this gap. The CNR values of all defects and all processing techniques were calculated using the defects and reference areas as the ones shown in Figure 5. The highest CNR value (CNRmax) was then found for each case and the results are summarized in Table 3. The maximum CNR values between different methods are in bold. Figure 9 presents selected CNR curves for raw, PCT, and RPCT data that correspond to defects at the same depth (Z = 1.43 mm) but of different types (FBH, pull-outs, and inserts) in which the CNRmax value is indicated together with the frame of occurrence.    Figure 11. CNRmax by defect depth as a function of the defect type for all data sequences (PCT and RPCT).  Figure 10 shows the evolution of the CNR as a function of the depth and each processing method for each defect type. Similarly, Figure 11 shows the evolution of the CNR as a function of the material type for the raw data and each processing method for some selected defects.
Finally, Table 4 presents the best Jaccard Index score obtained for each processing method computed through time.
In the next section, the results are analyzed and discussed.

Discussion
As can be seen in Table 2, the proposed RPCT method has, for this specific and given dataset, a processing time that is considerably longer than PCT (11.5 times). This can be explained by the convex optimization operation. More precisely, to compute the low-rank and sparse matrix, several SVD are computed at each iteration of the optimization loop until it converges. Nonetheless, despite the increased time compared with the state-of-the-art methods, a computation time of 8 min 3 s is still reasonable for most NDT applications.
Approaches such as General-purpose computing on graphics processing units (GPGPU) can significantly reduce the computation time; however, such implementation exceeded this study's goals.
Several observations can be made from the results in Figures 10 and 11 In the next section, we provide our conclusion regarding the proposed approach.

Conclusions
In this paper, we propose a new formulation of the RPCA named Orthogonal Inexact Augmented Lagrangian Multiplier (OIALM). We evaluated the performance of the resulting approach, Robust Principal Component Thermography (RPCT), for detecting defects and discontinuities in CFRP and compared the results with those of PCT using two quantitative metrics: Contrast-to-Noise Ratio (CNR) and the Jaccard similarity coefficient. The CNR was computed frame by frame and the maximum value was identified for every defect and all techniques (raw, PCT, and RPCT).
The low-rank and sparse matrices in RPCT are projections of thermal data onto the noiseless data and noise, and the low-rank matrix is optimized in each iteration using incremental PCA. RPCT enables noise to be removed from the thermal sequences, therefore improving defect contrast and increasing defect detection.
Considering CNR results from all defect types, RPCT reported CNRmax values 40% higher than PCT. The improvement was greater for flat-bottom-holes (60%) compared to pull-outs (27%) and Teflon inserts (24%). In the case of the Jaccard index, RPCT performed slightly better than PCT (0.74 vs. 0.70). The computation time was however 11.5 times longer for RPCT than for PCT.
Although RPCT, to the best of our knowledge, has never been applied to pulsed thermographic data before, this study demonstrates its efficiency for defect enhancement capabilities over mixed and various types of defects typically addressed in IRT in composite materials. The goal of the study was to introduce this approach; further improvement in terms of computational speed could be achieved by using low-level programming language and hardware optimization. RPCT can therefore be considered as a powerful analysis tool that may help to push the limit of defect detection by IRT.
It should be pointed out that the RPCT method is not limited to data acquired by pulsed thermography (in which only the cooling phase is analyzed), but it could potentially be applied to other IRT techniques such as square pulse thermography (in which the heating and cooling phase may be of interest) and lockin thermography (in which regular periodic cycles are observed).
Future research will be directed towards the application of RPCT to different materials (glass fibers, aluminium, etc.), to the implementation of software/hardware optimization solutions (e.g., through the use of GPGPUs), and to the application of RPCT to other IRT techniques (e.g., square pulse thermography and lockin thermography).

Conflicts of Interest:
The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations
The following abbreviations are used in this manuscript: