Detection of different chemical binders in coatings using hyperspectral imaging

Organic coatings protect metallic structures of significant commercial value. Regular inspections of coatings are required to ensure their integrity and, therefore, to verify their stated performance. However, for metallic structures located in harsh places, coating inspection can pose significant safety and logistical challenges. Near-infrared (NIR) spectroscopy is a rapid, nondestructive and relatively inexpensive analytical technique. It is currently employed to analyze different chemicals in fields like agriculture, food, and pharmaceuticals. Similarly, hyperspectral imaging (HSI) creates a spatial map of spectral information by measuring light reflected from a material. In this work, hyperspectral imaging in the NIR portion of the electromagnetic spectrum (NIR-HSI) is used to accurately distinguish between the chemically different binders employed in commercial organic coatings. In addition, k-means clustering is explored as a tool to provide diagnostic information about the spatial inhomogeneities in the chemical structure of an applied coating, which, if undetected, can lead to coating defects during service life. The results of this work suggest that the NIR-HSI could be used for remote inspections of organic coatings.


Introduction
One of the main factors limiting the lifetime of steel structures in industrial and commercial applications is corrosion. Anticorrosive coatings are often applied to protect these structures and expand their lifetime by limiting their exposure to the corrosive environment. Protective organic coatings applied to the steel structures provide protection against ultraviolet (UV) light, aggressive chemicals, heat, different salts, etc. Commercially used organic coatings are typically composed of several chemical components (e.g., binders, cobinders, extenders/fillers, pigments, additives, and solvents) in specific ratios. However, ensuring that a suitable coating (or paint) for a particular application avoids defects during coating application and maintains required performance during service life is crucial, but not trivial. Among other components of a commercial organic coating, the binder(s) used is considered the most important ingredient of the coating composition. As indicated by the name, it binds together various components of the formulation and provides mechanical strength as well as filmforming capabilities to the coating. Numerous binders have been developed for protective organic coatings, e.g., polyurethane (PU), acrylics, epoxies, and polysiloxanes. Depending upon the application and/or area, coatings with different binders are used. For example, in the case of a ship, the coatings applied inside the storage tanks have binder(s) different than the coatings applied on the ship's hull. [1][2][3] During service life, organic coatings degrade over time. Reasons for the degradation of the organic coatings can be chemical and/or mechanical and the chemistry of the used binder plays an important role in deciding the rate of degradation of coatings under given conditions. With respect to mechanical degradation, for example, cracks can develop over time in the applied coatings which can be attributed to either mechanical damage or to the stress development inside the coating. Such cracks allow easier diffusion of water (and other chemicals) into the coating system leading to the failure of either an individual coating layer or the whole coating system (coating systems are composed of layers of chemically different organic coatings). Regarding chemical degradation of coatings, it has been shown in the literature 4 that under specific conditions, various reactive species [e.g., reactive oxygen species (ROS)] can be generated which can chemically react with the binder of the coating, leading to coating degradation. Depending upon the binder used (and overall coating composition) and local atmospheric conditions, different coatings have been shown to follow different chemical degradation mechanisms. [5][6][7][8][9] In almost all cases, new functional groups appear on the surface of the coatings as a result of chemical degradation or aging. 1,5,8,10,11 While mechanical degradation or defect development can be detected with a naked eye, detection of chemical degradation of the organic coatings requires (in most cases) specialized analytical tools. Undetected chemical degradation of the coatings may lead to mechanical failure of the coating system over time. Therefore, (chemical and/or mechanical) degradation in the applied organic coatings (or coating systems) can be detrimental to the structure's durability and, therefore, a significant commercial interest exists in monitoring the coating condition during service life to detect such coating defects quickly. As will be further clarified in the coming sections, the examples presented in this research work show that by employing the proposed strategy, it might be possible to detect the chemical degradation of the coatings well in time before the whole coating system fails to protect the structure. Therefore, the determination of the binder is an important part of a coating inspection regimen.
Monitoring or inspection of protective organic coatings applied to marine steel structures can be challenging. Locations such as chemical storage tanks, the hull of a ship, and different parts of an oil rig floating in a sea are challenging areas for a coating inspector. Visual close-up inspection requires the inspection to be performed at an arm's length distance from the structure. In practice, this means that the surveyor must be physically close to the inspection area. To come close enough for visual inspection in 20-30 m high tanks, the inspector has to first enter the tank and then use various means of access, as depicted in Fig. 1. These include scaffolding, rafting in a tank filled with sea water, or rope climbing. Safety is a significant concern in such areas. Fall accidents happen. Oxygen shortage is another risk when entering a tank. Rafting accidents can happen inside the tank when the ship is rolling. Over-heating is another risk when inspecting a tank in hot locations where the temperature inside the tank may exceed 50 C. Therefore, remote drone-based inspection is considered as an attractive alternative to the current state of the coating inspection business to facilitate access to high structures.
Chemically different binders are commonly distinguished in laboratory settings with the technique known as near-infrared (NIR) spectroscopy. It characterizes materials based on their optical response in the NIR region of the electromagnetic spectrum, which spans from 780 to 2500 nm. NIR spectroscopy has been extensively used to monitor various polymerization reactions and spatial differences in the chemical composition of polymers. [12][13][14][15][16] provided an extensive review of the application of NIR spectroscopy for identifying different polymers. More details regarding the understanding and applications of NIR spectroscopy in different fields can be found elsewhere. [18][19][20][21] Hyperspectral imaging (HSI) is a technique that collects and processes information from across a large number of narrow bands in the electromagnetic spectrum instead of wide RGB (red, green, blue) spectral bands which are common to most digital cameras. HSI measures reflectance spectra of an observed scene and allows to use various analysis methods to investigate and classify spectral signatures and properties of present materials. It has been used in several applications across several industries, such as agricultural monitoring and food quality assurance. [22][23][24][25][26] HSI cameras which record measurements in the NIR range (hereon, NIR-HSI) are commercially available and have shown potential in different areas as mentioned above. NIR-HSI technology offers two substantial advantages over the conventional lab scale NIR systems; firstly, faster spectral acquisition time, and secondly, higher spatial resolution of line measurement rather than the point measurement. Moreover, the NIR-HSI setup can be loaded on a drone in order to be used as a nondestructive remote inspection tool with similar data quality as laboratory-based equipment.
The research published with respect to the application of this technology in the field of organic coatings is scarce, but a few examples exist. Recently, Daikos et al. 27 demonstrated the use of NIR-HSI camera in monitoring the dry film thickness (DFT) and the conversion of titanium dioxide pigmented urethanemodified acrylic coatings cured with UV light. The authors showed that NIR-HSI camera combined with suitable data processing techniques and calibration models (based upon partial least squares regression) can provide quantitative information regarding thickness and the degree of cure of the applied model coatings. The actual and predicted DFTs were consistent as high as 200 micrometers. In addition, qualitative information about the inhomogeneities (defects) developed within the coatings layers can be obtained by using the developed method. The effects of the substrate used on the obtained NIR-HSI spectra and the model predictions for the curing degree of coatings (i.e., the conversion) were shown by the same lab in a separate publication. 28 Here, we demonstrate that a commercial NIR-HSI camera can differentiate between chemically different binders used in the commercial organic coatings. Using model systems (i.e., clearcoats of binder + curing agent and some formulations with one extender in the epoxyamine system), we have shown that the obtained results are similar to those obtained with a laboratory scale NIR spectrometer. Moreover, these results show that HSI in the near-infrared (NIR) range is a promising tool for developing remote drone-based inspection equipment which can be employed for the inspections of coatings applied to structures located in harsh areas. Although no example of remote dronebased inspection is shown, if it is possible to differentiate between chemically different binders by employing NIR-HSI in a laboratory setting, then it will also be feasible to detect them via remote inspection. Furthermore, the detection of different binders suggests the possibility of detecting (for example) chemical aging happening in the applied coatings during their service life.
In addition, the use of k-means clustering shows that spatial chemical differences in an applied coating can be identified in a straightforward way which can be made accessible and comprehensible to coating inspectors. The analysis based on k-means is complemented with an inspection of the spatial distribution of intensity variations at particular absorption lines in the electromagnetic spectrum. These spatial differences in the coating can be considered as a possible reason for the spatial differences in the properties of coating leading to spatially different rates of degradation.

Experimental work
Chemicals and panels preparation The hardener used to cure stoichiometrically the epoxy and novolac epoxy was the amine curing agent commercially available under the name of Jotamastic 90 Standard Comp B containing 10-16% xylene as the solvent.
Mixing ratio used for the stoichiometric curing of epoxy with the amine curing agent was 100 g of epoxy : 52.54 g of the curing agent. Mixing ratio used for the stoichiometric curing of epoxy Novolac with the amine curing agent was 100 g of epoxy Novolac : 57.30 g of the curing agent.
One epoxy-amine clearcoat was prepared by overcuring the epoxy with curing agent in 30% excess of the stoichiometric amount.
PS clearcoat was made by mixing the PS with Dynasylan 1401.
Polyurethane (PU) clearcoat was made by reacting the hydroxy functional acrylic resin with the poly(isocyanate) curing agent (Hardtop XP component B).
All clearcoats were prepared by applying the respective films on 7 Â 15 cm 2 sandblasted steel (Ca 2.5 cleanliness) with an applicator. Wet film thickness (WFT) for all films was 300 microns.
In formulations with extenders, 15 weight percent of an extender (commercial grade of feldspar, calcium carbonate, alumina, talc) was dispersed in the epoxy using a speed mixer. This epoxy part containing the extender was cured stoichiometrically with the amine curing agent (i.e., Jotamastic 90 Standard Comp B). After application, all samples were cured at room temperature for 7 days before scanning with the HSI camera. Table 1 shows a list of all samples used in this study. Each test panel in the table has an identification, a short description, and an aspect that we want to detect. There are 18 different test samples in all. Samples with uncured resin and curing agents were also analyzed with the HSI camera to obtain the reference spectra for the unreacted chemicals. The spectra of cured systems were then compared with the spectra of the unreacted chemicals to confirm the occurrence of chemical reaction between the reactive species. These panels consist of different cured binders (BND1-4), epoxy binders including different extenders (EXM1-4), and epoxy binder with different curing degrees (EXC1-2). In addition, 8 reference panels are also included in which correspond to the unreacted chemicals used in this work (BND5-12).

Hyperspectral imaging system and data acquisition
The panels have been scanned by HySpex SWIR-384 hyperspectral camera at NEO lab (Norsk Elektro Optikk AS, Norway) as shown in Fig. 2. This is a ''push-broom'' line scanning short-wave infrared camera which spans wavelengths from 970 nm to 2500 nm in NIR range of electromagnetic spectrum. It collects photons in 288 spectral bands with a spectral sampling of 5.3 nm. The images were acquired using a broadband halogen lamp to illuminate the test panels from above, while the camera captured the signal scattered by the surface. The camera used a close-up lens to cover a field of view (FOV) of 290 mm from a 100 cm working distance and with a spatial resolution of 750 lm. The samples were scanned using a translation stage, moving perpendicularly to the linear FOV of the camera with a steady speed proportional to the exposure time. A Zenith Lite reflectance target Reference Binder Epoxy828. The epoxy that has been used for preparation of epoxy panels (BND1, and EXC1-2), and panels with different extenders/minerals (EXM1-4).

Reference binder BND7
Acrylic Resin Synocure854 BA80. The binder that has been used for preparing PU panels (BND4). Reference binder BND8 Reference Binder Epoxy Novolac. This was the epoxy used for preparing epoxy novolac panels (BND2).

Reference binder BND9
Reference curing agent for epoxy novolac. The curing agent that was used for preparing all epoxy novolac-based panels. (SphereOptics GmbH, Germany) was also imaged together with the test panels. The target is a calibrated, PTFE-based diffuse reflectance panel with 50% reflectivity (nominal). The spectrum recorded from the target was used to correct for variations in the spatial distribution of the illumination source on the test panels and to transform the spectral raw data from the camera to reflectance. The reflectance data are used for the analyses in this paper, which is a property of observed material based on occurring absorption features. Reflectance is the ratio of the intensity of light leaving a target to the intensity of light striking the target.

Methods
Many different analysis techniques can be used to unravel the mixed spectral signal and produce abundance maps of observed features. It is possible to model reflectance spectra of a solid surface as a series of deep dips due to absorption features, superimposed on a background continuum. 29 These absorption features are characterized by their wavelength position, band width, depth of absorption feature, and shape symmetry. The wavelengths at which absorption features are detected are important inputs for analyses, since they designate the chemical composition types present at the observed scene. 30,31 In the following, the methods employed for analyses in this study are described.

Continuum removed spectral feature comparison
Identifying and quantifying the wavelength and shape of a spectral/absorption feature in a spectrum require its isolation from other effects, such as level changes and slopes because of other absorbing/emitting materials. A normalization procedure is the first action toward such isolation, and it is referred to as 'continuum removal' or 'convex-hull' transform. 29 The overall concave shape of a spectrum is removed to allow the comparison of various spectral details acquired by different instruments or under different light conditions. The continuum-removal process segregates spectral features and puts them on a reasonable and balanced level so that they may be compared and in order to identify the spectral signatures present.
A continuum, or convex hull, is constructed by connecting local maxima in the reflectance spectra using straight-line segments, similar to fitting a rubber band over the top of a spectrum, as demonstrated in Fig. 3. Then, the spectrum is normalized by setting the value of hull to 100% reflection. The normalization procedure of a reflectance spectrum can be performed by division (multiplicative) because absorption and scattering processes lead to exponential effects in the reflectance signal. 29 The resulting continuum removed spectrum, normalized reflectance, is equal to 1.0 where the spectrum and the continuum match, and less than 1.0 where absorption features occur.
Most observed spectra are composed of mixtures and not pure materials; therefore, the spectral curves are combined to produce a continuum upon which diagnostic absorptions may be superimposed. The procedure of continuum removal eliminates the effects of these other absorptions in a spectrum. 29,32 For example, a sloping continuum alters the appearance of an absorption feature by shifting the position of the  local minimum in the curve 32 and can cause absence of a local apparent minimum. Even changes in contaminants and grain size at the observed scene can cause a shift in the apparent minimum. However, in a continuum removed spectrum, the minima show a more stable position. Continuum removal procedure normalizes the spectra, thus reducing the effects of lighting geometry on the level of the spectrum, as well as effects of contaminants and grain size variations. 32 All the spectra presented in this study are continuum removed.

k-means clustering
When processing a data set without labels or known outcomes, one of the most straightforward analysis methods one can use is to search in the data set for groups of data points, called clusters, that aggregate together due to specific similarities and discover underlying patterns. In practice, clustering helps an operator to visualize both the spatial and spectral properties of data. Because it does not rely on searching for predetermined spectra, clustering can identify unexpected features in the data. For instance, if an unknown substance is present on a surface, clustering can help to partition where it occurs and how it affects the reflectance. In this study, the clustering results identify groups of pixels over a panel that have chemically reacted differently during curing process of the investigated binder. Once partitioned, clusters serve as an intermediate step in a data pipeline such as segmentation. The clustering results segment pixels into groups with similar chemical properties, which can then been used to create targeted investigations.
k-means clustering is one of the simplest and most popular unsupervised algorithms, which results in k centroids (cluster centers) to define clusters. 33 A point in the data set is considered to belong to a particular cluster if it is closer to that cluster's centroid than any other one. The 'means' in the k-means refers to averaging of the data in order to determine the centroid. The average complexity in this method is given by the number of cluster centers to be considered and the number of iterations to find those number of centers. Data mining begins with a first set of randomly selected centroids, that are considered as the starting points for every cluster, and then performs iterative calculations to optimize the positions of the centroids.
The optimal centroids in k-means clustering are obtained by alternating between two main processes; firstly, assigning data points to clusters based on the current centroids, and secondly, choosing centroids based on the current assignment of data points to clusters. The algorithm stops creating and optimizing clusters when either a defined number of iterations has passed, or cluster centers have stabilized at coordinates where there are no more changes in their positions.

Spatial analysis of absorption
When the absorption features that are expected to be found in a given sample are known, it is possible to look for spatial variation in the magnitude of the absorption in order to identify locations at which a given material is present in greater or lesser quantities. The intensity of the absorption (depth of absorption feature in reflectance spectrum) is then defined as dðkÞ ¼ R top ðkÞ À R bottom ðk AE dkÞ, where R bottom is the reflectance at the point of expected absorption and R top ðkÞ is the reflectance to the sides of the peak. Then, dðkÞ is calculated by applying a convolution to the image cube.

Epoxy-amine systems
Epoxy-amine clearcoat Figure 4a shows the mean spectra of commercial uncured epoxy resin (red line, BND5 panel in Table 1), the unreacted amine curing agent (green line, BND6 panel), and the cured epoxy (blue line, BND1 panel). Curing was done stoichiometrically at room temperature for 7 days before scanning the samples with the HSI camera. In the spectrum of uncured epoxy resin, the peak at 2207 nm is attributed to the epoxy ring, whereas the peaks at 1910 nm and at 2163 nm are attributed to the hydroxyl and phenyl ring, respectively, in the epoxy resin. Peaks observed between 1600 to 1750 nm are, typically, attributed to -CH 3 , -CH 2 and -CH groups. More specifically, the peak at 1646 nm is attributed to the first overtone of the terminal -CH 2 stretching mode (related to the oxirane ring) which interferes with the aromatic -CH stretching overtone seen at 1667 nm. [34][35][36] Due to this interference, it is preferred to use the relatively distinct peak of epoxy ring at 2207 nm to confirm/monitor the curing reaction of epoxy resins.12-15 The peaks at 1542 and 2027 nm in the spectrum of unreacted curing agent are attributed to the amine groups in it. During cure, epoxy groups react with the amine groups. Therefore, these three peaks in the NIR spectra of typical epoxy resins and amine curing agents (i.e., 1542, 2027, and 2207 nm) have been used by different researchers [12][13][14][15] to monitor the curing reaction of epoxy-amine systems under laboratory conditions.
From the spectrum of cured epoxy (i.e., the blue line) in Fig. 4a, it can be seen that the peaks at 1542, 2027, and 2207 nm have mostly disappeared. This confirms that the reaction between epoxy and the amine curing agent proceeded as expected and can be confirmed with an HSI camera. Note that, the peak due to the phenyl ring (at 2163 nm) also appears in the spectrum of cured epoxy which is due to the fact that the phenyl rings do not take part during the reaction of the system used in this work.
HSI allows the operator to access information beyond the mean spectrum of a sample. It is wellknown in the coatings industry that the curing reactions of epoxy resins can take time longer than expected under given curing conditions (i.e., temperature, relative humidity, etc.). As a result, the properties of the epoxy coatings may change with time (e.g., glass transition temperature increases with increase in crosslinking levels over time). In addition, residual epoxy resin may pose a health hazard. Therefore, it is of importance to detect the spatial distribution of uncured epoxy resin (if any). Figure 4c provides the spatial distribution of epoxy group on the cured epoxy panel (BND1) from which the above mean spectra was obtained. Absorption at 2207 nm was used to detect the presence and distribution of residual epoxy group on the panel. It can be seen that there are regions of the coating containing unreacted epoxy groups and they are present mostly in the central region of the panel. The mean spectrum of the cured epoxy in Fig. 4a actually reveals that there is a small peak at 2207 nm indicating the presence of residual unreacted epoxy.
Figures 4d and 4e depict k-means clustering analysis that was performed on the cured epoxy panel (BND1), to find the uniformity of pixels throughout the panel. The defined parameters for analysis were 5 clusters and 30 iterations; however, only 3 clusters were achieved after 30 iterations. RGB image of the panel is shown in Fig. 4b, and the spatial distribution of pixels belonging to each cluster is presented in Fig. 4e by different colors. The spectra of each cluster center are shown in Fig. 4d. The spectrum of each cluster center has the same color and number as those in the spatial overview of pixels. The percentages of pixels in each cluster are mentioned in the legend.
Based on the spectra of the cluster centers, one can realize that even though all the signature features of (b) (e)  the cured epoxy are present in all the cluster center's spectra, there is spatial heterogeneity in the applied film. There are minor differences between the spectra of pixels in the center of the panel (clusters 2 and 3) and those closer to the top and bottom edges (cluster 1). Areas under the peaks of the spectra of all clusters are slightly different which is an indication of the local differences in chemical composition. The most probable cause for this spatial heterogeneity can be the varying rates of diffusion of the reactive species and spatially different solvent evaporation rates causing concentration gradients over the whole applied panel. Such spatial differences are probably the reason for locally different (e.g., mechanical) properties of the coatings which lead to defect development at certain parts of the applied coating earlier than at the other parts of the same coating.
Recently, Chen et al. 16 used a similar NIR-HSI experimental setup but with a band ratio analysis approach to show the spatial differences (i.e., the heterogeneity) in the chemical composition of PU foams. Therefore, these results show that HSI in the NIR range is a powerful tool for monitoring epoxyamine reactions, understanding the spatial chemical differences in applied epoxy-amine coatings and relating them to the observed differences in the final properties of the applied coatings.

Epoxy-amine systems cured stoichiometrically and with excess of curing agent
Stoichiometrically cured epoxy-amine model system and the system where the curing agent was added in excess of the stoichiometrically required amount were also studied with HSI camera (EXC1-2 panels in Table 1). Excess of curing agent can be used in commercial organic coatings for different purposes, e.g., to obtain sufficient degree of cure at given application conditions before applying the second coat and to change the surface properties of the applied coating. However, due to the hazardous nature of (for example) amine curing agents, typically it is preferred to use stoichiometric amounts. Those skilled in the art understand that the use of curing agent in excess of stoichiometric amounts is sometimes referred to as over-curing and does not mean to achieve a degree of cures more than 100% which is impossible to achieve. Figure 5 shows the mean spectra of stoichiometrically cured and 30% over-cured model epoxy-amine systems. In the spectrum of 30% over-cured sample, the peak attributed to the epoxy ring (at 2207 nm) has disappeared, whereas, a diminished epoxy peak can be seen in stoichiometrically cured sample. The peaks attributed to the amine groups (i.e., 1542 and 2027 nm) are present in the spectra of 30% over-cured systems. This observation can be attributed to the presence of amine groups which were in excess to epoxy groups and, therefore, were not consumed during the reaction. These results are in good agreement with the previ-ously published work based upon laboratory scale NIR spectrometer [12][13][14][15] and indicate that the HSI camera can be used to detect the curing degree of epoxy-amine coatings.
Although not shown here, commercial organic coatings can also be under-cured (i.e., the curing agent used is less than that required stoichiometrically). This is, again, done commercially to obtain specific properties and save costs. If an epoxy-amine coating is undercured, one will find excess of epoxy groups in the NIR spectrum (obtained by using NIR-HSI) of the cured coating. Excess of residual epoxy and/or amine groups are considered as hazardous to health and, therefore, NIR-HSI cameras can help in improving the safety of paint workers significantly (e.g., consider the case of grinding an applied coating which was under-or overcured).
Epoxy novolac cured with amine curing agent Figure 6a shows the mean spectra of the uncured epoxy novolac (red line, BND8 panel in Table 1), uncured amine curing agent (green line, BND9 panel), and the cured epoxy novolac-amine system (blue line, BND2 panel). As discussed in the previous section, the peak at 2207 nm is attributable to the epoxy ring in the uncured epoxy novolac, whereas the peaks at 1542 nm and 2032 nm in the spectrum of unreacted curing agent can be attributed to the amine groups in it. The other peaks observed in the spectrum of epoxy novolac are similar to those characterized by Yi-Hui et al. 37 using a laboratory FT-NIR spectrometer. After the reaction, these groups are expected to disappear. Therefore, in the mean spectrum of the cured epoxy novolac-amine, there are no peaks attributable to these functional groups. In addition, the spectrum of cured epoxy novolac-amine shows a stronger peak around 1433 nm which can be attributed to the increased number of hydroxyl groups formed due to the chemical reaction between the epoxy rings and the amine groups of the curing agent. 13,14 k-means clustering was performed on the cured epoxy novolac panel (BND2 panel), as depicted in Figs. 6c and 6d, to determine the uniformity of pixels throughout panel. The defined parameters for analysis were 5 clusters and 30 iterations; however, only 3 clusters were achieved after 30 iterations. An RGB image of the panel is shown in Fig. 6b, and the spatial distribution of pixels belonging to each cluster is demonstrated in Fig. 6d by different colors. The spectra of each cluster center are shown in Fig. 6c. The spectrum of each cluster center has the same color and number as those in the spatial overview of pixels. The percentages of pixels in each cluster are mentioned in the legend.
The spectra of the cluster centers show that the properties of pixels over the whole panel are homogeneous and suggest that the mean spectrum represents the whole panel well. The spectra of cluster centers are similar to each other which is an evident for identical chemical structures over all of the panel. These results confirm that NIR-HSI is a powerful tool for understanding the spatial differences in the applied coatings and relating them to the observed differences in the mechanical properties of the applied coatings. Figure 7a shows the mean spectra of a commercial methyl phenyl group containing silicone resin solution in xylene and n-butanol (red line, BND12 panel in Table 1), a commercial organosilane (with a chemical name of n-(2-aminoethyl)-3-aminopropylmethyldimethoxysilane) (green line, BND11 panel) and the crosslinked silicone resin containing the organosilane (blue line, BND3 panel).

Silicone resin with organosilane
The peaks in the spectrum of liquid silicone resin at 1144, 1182, 1400, 1678, 1744, and 1776 nm are attributed to the vibrational modes of -CH 3 groups present in a silicone resin. Phenyl group's presence in the PS can be confirmed by the peak at 2174 nm whereas the SiH group can be confirmed by the peak at 2332 nm. 38 As previously mentioned, the peaks at 1547 nm and 2022 nm present in the spectrum of organosilane are attributable to the amine groups in it. 39,40 After physical drying, the peaks attributable to the amine groups are still present in the spectrum of cured PS (i.e., the blue line in Fig. 7) indicating that the amine groups of the organosilane did not react with other moieties of the PS. This was expected because the silicone resin used in this work did not have functional groups which could have reacted with the amine functional groups of the used organosilane at  room temperature. Based upon these results, it can be concluded that the NIR-HSI camera can detect as supplied and physically dried silicone resins, organofunctional silanes with an acceptable accuracy. Figures 7c and 7f show the spatial heterogeneity in the PS sample based upon two absorptions, i.e., the 1547 nm absorption related to the amine group of organosilane and 1678 nm absorption related to the -CH 3 groups of PS. It is evident that by using different absorption peaks, one can explore different defects in a coating. For example, by using 1678 nm absorption, the spatial distribution of craters in the PS sample (indicated by the dark spots in Fig. 7f) can be detected more clearly than by using the 1547 nm absorption.
k-means clustering analysis of PS sample (BND3 panel) is depicted in Figs. 7d and 7e. The spectra of the cluster centers in Fig. 7d are very similar to each other, but Fig. 7e shows that there is spatial heterogeneity in the chemical composition of the applied film which may be attributed to the reasons discussed above, such as nonideal mixing of the components, slow diffusion of the mixture components, and faster evaporation of solvents (liquid silicone resin used was dissolved in xylene/n-butanol mixture).

Polyurethane
Polyurethane (PU) (BND4 panel in Table 1) was formed by reacting a commercial hydroxy functional acrylic resin (BND7 panel) with a poly(isocyanate) curing agent (BND10 panel). Figure 8a shows the mean spectra of the uncured hydroxy functional acrylic (red line), poly(isocyanate) (green line) and the cured PU (blue line). In the spectrum of commercial hydroxy functional acrylic resin, the peaks present at 1140, 1417 and 2043 nm, 1913 nm can be attributed to the -CH groups, hydroxyl (OH) groups and carbonyl (-C=O) groups, respectively. 41 In the spectrum of poly(isocyanate) curing agent, the peaks at 1482 nm and 2049  nm can be attributed to the overtone of -NH and stretch overtone of the hydrogen bonded carbonyl group present in the urea, respectively, and the peak at 1913 nm can be attributed to the carbonyl group of the isocyanurate present in the curing agent. 16,42,43 Hexamethylene diisocyanate (HDI)-based poly(isocyanate) curing agents are composed of several oligomers depending upon the polymerization mechanism and isocyanurate group is present in most of these oligomers. Detailed discussion about the structure of various oligomers present in HDI-based poly(isocyanate) curing agents can be found elsewhere. 44 Some researchers have attributed the broad peak around 1920 nm to the overlapping bands resulting from the carbonyl groups and the adsorbed water. 45 The shoulder at 2146 nm has also been attributed by different researchers to the isocyanate group. 16,46 It is important to mention that urea in the curing agent was probably produced by the well-known side reactions. 47 After reaction, the peaks confirming the formation of urethane group (i.e., the repeating unit in a PU polymer) can be seen at 2027 and 2179 nm. 16,43 Figures 8c and 8f show the spatial variation of the isocyanate group in the cured PU sample obtained by using the absorptions at 1482 and 1913 nm. Since both the absorptions are related to the isocyanate group, it appears that the distribution of the curing agent is uniform over the whole sample. However, the presence of residual isocyanate absorption peaks indicate that the reaction has not completed. The two bright spots on the left side of the sample indicate a defect during sample preparation.
k-means clustering analysis of PU sample (BND4 panel) is shown in Fig. 8d   cluster centers in 8d are very similar to each other except the small cluster 1. This cluster is also detected in Figs. 8c and 8f demonstrating the presence of two bright spots on the left side of the sample corresponding to a defect during sample preparation. The spectrum of the cluster 1 shows the peaks at 1482 nm and 1913 nm attributed to the residual isocyanate groups and it can be seen that the unreacted curing agent is accumulated at two places mainly. The reason for this accumulation of the unreacted curing agent is unknown but most probably it is related to a mixing issue during sample preparation or film application. With the naked eye, it would have not been possible to identify such a spot concentrated with the residual curing agent (compare RGB image shown in Fig. 8b with 8e and 8f).
In general, it is evident that by employing k-means clustering spatial heterogeneity of the model, PU coating becomes visible.

Different extenders used in model epoxy-amine systems
A variety of extenders are used to enhance the properties (e.g., mechanical and/or anticorrosive) and reduce the production cost of the commercial organic coatings. Therefore, to study more realistic coatings, some model epoxy-amine coatings were prepared with different extenders. The extenders used in this work included CaCO 3 , talc, feldspar, and alumina. Note that, only one extender was dispersed at a time in the epoxy followed by mixing with the curing agent just before the application with an applicator. In all formulations, extender content was kept constant at 15 wt%. All applied films were cured for 7 days at room temperature before scanning with the HSI camera. Figure 9 shows the mean spectra of cured model coatings with and without extenders. It can be seen that the mean spectra of the model epoxy-amine coatings with or without different extenders are very similar and the observed peaks are attributable to the organic part of the coatings i.e., the (partially) cured epoxy-amine network. The peaks around 1390 nm and 1908 nm are attributed to the hydrogen bonded -OH groups and the interactions between the adsorbed water and -OH groups, respectively. According to Mijovic et al. 48 peak around 1908 nm can be used to estimate the moisture content in different materials. Krauklis et al.5 have shown that for monitoring the content of adsorbed water in cured epoxy-amine samples the peak around 1908 nm is more reliable. The sharp peak at 1389 nm in the spectrum of epoxy-amine coating filled with talc can probably be attributed to the combined effect of structural -OH groups present in talc and -OH groups produced during epoxy-amine cure reaction. Figure 9 also shows that the formulation with talc probably had the highest amount of adsorbed water (comparing the peak height at 1908 nm) which was in agreement with supplier data about the moisture content of different extenders used here (i.e., the talc had the highest moisture content of around 0.5% among different extenders used in this work). The reference spectra of the extenders were not obtained in this work, and the aim here is not to study the factors influencing the peak heights of hydroxyl groups in a NIR spectrum of filled coatings. It is important to mention that the concentration of different extenders used in the commercial formulations can be significantly different from that used in this work (i.e., 15 wt%). Furthermore, commercial coatings mostly use combinations of different extenders. Therefore, the results shown in this work may not represent typical more complex coatings. Future work could investigate how the concentration of different extenders affects the spectra and whether NIR-HSI cameras can be used to detect the differences between various extenders (i.e., chemical composition, particle sizes, and moisture content) used in the organic coatings.
It is important to highlight that the samples mentioned above were model systems composed of cured binder and, in some cases, with an extender applied by using an applicator. Nevertheless, this work shows that the presence of different functional groups in commercial organic binders can be detected by employing an NIR-HSI setup and k-means clustering can help in understanding the spatial chemical heterogeneity of the coatings. In order to prepare this technique for operation, further studies could analyze the complete and sprayed coating formulation with the NIR-HSI. The results shown in this work using model coatings represent a feasibility study for the application of NIR-HSI technology in the coatings industry. More detailed work is needed to train models using sprayed commercial coatings followed by real-life validation of the results by employing the trained models.

Distinguishing between binders
To show the potential of using NIR-HSI combined with k-means clustering in distinguishing chemically different binders, all four panels coated with the cured binders (i.e., epoxy, phenolic, PS, and PU) were considered within one frame as shown in Fig. 10a for the analysis and the k-means clustering was applied on them as an assembly (Fig. 10b). The spectra of the cluster centers are shown in Fig. 10c. Four cluster centers were used because there are four different binders in the fused image. Each of the clusters found by k-means was related to the binder which constituted the majority of its pixels. The confusion matrix of this analysis which shows the accuracy of distinction between different binders is shown in Fig. 10d. Each row of the confusion matrix represents the classification percentages of pixels for each panel, whereas each column of the confusion matrix shows the percentages of pixels classified as specific binder in each panel. It is evident that the phenolic and PS binders were distinguished with more than 90% accuracy, while that of epoxy and PU was around 70% which may be attributed to the very   similar spectra of cured epoxy and PU used in this work (blue spectra shown in Figs. 4a and 8a, respectively). These results confirm the capability of NIR-HSI in distinguishing chemically different (cured) binders with an acceptable level of accuracy. However, it is important to mention that more detailed work is required in this regard as the samples used in this work were model coatings which do not represent either the actual commercial coatings with complex formulations or the environments in which inspection would occur. This example of k-means clustering demonstrates the potential of hyperspectral data for distinguishing between coatings. Since k-means, even though it is an extremely simple form of clustering, achieves decent classification accuracy of the 4 clearcoats, more sophisticated clustering or classification algorithms will likely achieve even higher accuracy.

Conclusions
The results discussed in the above sections show that the NIR-HSI camera can provide reliable information about the underlying chemistry of the commercial coatings (e.g., binders, curing agents etc.). Not only are the recorded spectra comparable to NIR spectra previously reported by other researchers using laboratory NIR spectroscopy, but they also show spatial patterns which reveal the distribution of materials across a surface. This information can be used in various ways of commercial interest, e.g., for the identification of the defect development in its early stages, surface analysis of the substrates and coatings which is important during coating application, in understanding and connecting the spatial heterogeneity in an applied coating to the observed defects during its service life, inspection of the coating condition after a certain service time, differentiating between different layers of an applied coating system, etc.
To prepare hyperspectral imagers for remote inspection of industrial surfaces, further work should determine how robust the spectra are to contaminants such as dust and soot and should verify the relationship between absorption intensity and molecular density for the target materials. Furthermore, because the HSI datacubes for these panels are on the order of several hundred megabytes even though the panels themselves are only about 100 cm 2 , hundreds of GB of data may be acquired during the remote inspection of an entire vessel. Determining how to deal with these large data sizes on remote agents is a critical aspect toward utilizing hyperspectral imaging in remote inspection. Moreover, spectral libraries are currently in diverse formats and spread across many sources. Aggregating the spectra of common and expected materials into common formats for use by remote agents will facilitate their on-board processing and identification of target defects or inhomogeneities. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/ licenses/by/4.0/.