**Figure 5.**

*Diffuse reflection measurement (solid black) of PDMS spray-on metalic surface, vs. LM (dashed red) (from [36]).*

experiment, where PDMS was sprayed on a metallic surface and measured with EC-QCL, using the apparatus of in **Figure 1**. The droplet's size distribution was between a few microns and dozens of microns, where the majority was 10 microns and less. To resolve the thickness parameter (L) for the LM (see Eq. (2), where δ = δ(λ)), the LM was calculated repeatedly for all the desired thickness range and correlated to the experimental results, while the best correlation is presented in the figure. Nonuniform coverage means non-uniform thickness and non-continuous coverage; hence the LM can provide an estimation of the 'effective thickness' (ET) and relative surface coverage using the following:

$$\mathbf{I}(\boldsymbol{\lambda})\_{\text{total}} = \mathbf{a}\mathbf{I}(\boldsymbol{\lambda})\_{\text{PDMS}} + (\mathbf{1} - \mathbf{a})\mathbf{I}(\boldsymbol{\lambda})\_{\text{Subs}} \tag{3}$$

where α is the coverage factor, Itotal IPDMS and ISubs are the total spectral measurement, PDMS contribution, and reflected intensity of the substrate, correspondingly. It was found that the lab experiment corresponds to 2 μm ET and 2% coverage.

As demonstrated in **Figures 3** and **4** for layers, and in **Figure 5** and Ref. [36] for sprayed traces, the spectral scattering of different ET expresses in non-identical spectral responses, i.e., different peaks heights and locations. **Figure 5** and Ref. [36] exemplify that fitting the best correlated LM result to unknown dissemination results in high certainty identification [36]. Using this approach of forcing the LM over non-uniform coverage, we can circumvent the requirement of the different scattering models to characterize the morphological properties of the analyte and provide identification and also a good estimation of its coverage features.

### **3. Detection and identification in the SWIR**

Although, the absorption spectrum of the invisible range was discovered in 1800 was at the near-infrared (NIR) [37–39], it was almost ignored until the 1950s, as it was not considered for analytical purposes. Spectroscopic investigation of chemicals, for various purposes, was perused in the longer wavelengths, i.e., 7– 14 μm, which provides specific information regarding the molecular structure of materials, which are expressed in distinctive narrow absorption peaks. The spectroscopy in the VIS-SWIR range (sometimes referred to as NIR, 800–2500 nm) exhibits broad overlapping peaks resulting from combinations of overtones and transitions in the MWIR. Theoretically, under the assumption of harmonic potential, part of the transitions is forbidden, resulting in low absorption. In the 1950s, SWIR spectroscopy was pushed forward due to technical and analytics progress, i.e., the development of lead sulfide semiconductor detectors and improvement in computing and data analysis techniques—chemometrics [40]. Consequently, this spectral range became more prominent in industry and research, providing rapid, nondestructive measurements for various fields [41, 42]. Another difference between SWIR and MWIR is the increased penetration depth of SWIR which effects the diffusion of the reflected light, as illustrated in **Figure 6**. As seen from the figure, the reflection of light from a solid sample occurs in two forms—specular and diffuse reflection. In contrast to MWIR, which is reflected from the surface, radiation in the SWIR will penetrate the sample and therefore is affected both by absorption and scattering. Various studies utilized this property for the investigation of deeper layers of samples, such as fruits and vegetables having penetration depth between 1 and dozens of microns [43, 44], or near-surface (�1 mm) as in soil [45]. Another advantage of using SWIR is the lack of blackbody radiation from the sample and the high SNR of detectors. For example, among other advantages and

*Reflectance Spectra Analysis Algorithms for the Characterization of Deposits… DOI: http://dx.doi.org/10.5772/intechopen.101301*

#### **Figure 6.**

*Reflection measurements—spectral (red) and diffuse (green) reflection. In cases where the beam penetrated the sample, it suffers.*

uses of SWIR spectroscopy, Manely indicated the increased penetration depth (compared to the MWIR), that can be utilized to rapidly analyze biological materials such as food products without sample preparation [41].

Reflectance measurements produce a large amount of data that have to be analyzed in real-time. For example, Park et al. utilized reflectance spectroscopy for real-time in-line poultry fecal detection [46]. They placed a dedicated camera to measure the reflectance spectrum in every pixel in the image—a hyperspectral imager (HSI—see **Figure 7**). The HSI was integrated into the production line, so both the data acquisition and interpretation are performed in real-time with no need for exhaustive sample preparation techniques. Similarly, Sendin et al. described the application of SWIR HSI for the quality and safety evaluation of cereals which are an essential part of the global population diet [42]. The HSI measurements can be performed in various scales enabling monitoring of a single grain to detect, for example, fungi, or on a larger scale to determine the overall cereal stock quality. Another area in which spectroscopy in the SWIR gained popularity is geophysical mapping. Goetz, one of the pioneers in this vibrant field of

#### **Figure 7.**

*An illustration of the HSI measurement. A scene is sampled in various wavelengths resulting in multiple images, which are referred to as a data cube. Each pixel in the data cube contains both spatial and spectral information. The right side of the figure shows the reflectance spectrum extracted from a pixel in the upper left corner of the image.*

research, recognized the future advantages of imaging remote sensing in the 1980s, for the identification of earth surface materials by their reflectance spectra [47]. For example, Ben-Dor et al. mapped soil properties using air-born HSI in the visible SWIR range (DAIS-7915) [48]. They developed methods to map soil organic matter, soil field moisture, saturated moisture, and soil salinity. These studies and many others utilize the robustness of the spectral measurements in the SWIR. However, two challenges have to be considered; the first one is the atmosphere effect of the reflected light, and the second one is data analysis. Brook and Ben-Dor, developed a calibration technique that utilizes targets placed in the trajectory of the airborne sensor [49]. The calibration process (supervised vicarious calibration—SVC), is performed during the mission and accounts for sensor properties and atmospheric interference.

Data analysis also received significant attention, and several algorithms have been introduced over the years to detect sample anomalies or specific target materials in imaging and non-imaging spectroscopy. Manolakis and Shaw described several algorithms for analyzing HSI data [50]. In general, these algorithms are designed to find indications for a phenomenon of interest. For example, the presence of a specific material that exceeds the naturally occurring variability in the sample, which is to be expected in many real-life applications such as process control, geophysical mapping and other applications in which sample preparation is impractical. Some of these algorithms can resolve common situations in remote sensing, where the target material occupies only a portion of the sampling area, i.e., linear mixing between the reflectance spectrum of the target material and unknown background material. However, in some specific cases, non-linear mixing may also occur since the incoming light might pass through a thin film of one material and then be reflected by the background material that supports this film—"intimate mixing", in which the resulted spectrum is a dot product of the film and the supporting material [51]. Kendler et al. developed an algorithm that automatically resolves non-linear mixing between background and target materials by utilizing the benefits of HSI [23, 52]. The algorithm seeks a pixel without the target material (clear background) having a similar reflectance spectrum supporting the target material (target pixel). Once such clear background is located in the image, the pure spectrum is extracted and compared to a library reference. It was also shown that the quality of extraction of the pure spectrum increases as the physical distance between the clear background and the target pixel decreases [53]. Conversely, in non-imaging spectroscopy, such a process may be impractical. This is exemplified in **Figure 8**, presenting normalized laboratory measurements of commercial granulated sugar and powdered sugar (<125 μm), disseminated over PVC and laminated wood surfaces. The measurements were conducted with a spectrometer (ASD FieldSpec® 4 Hi-Res) at 350–2500 nm using a custom accessory sampling contact probe consisting of a Halogen lamp and a collecting fiber as input. This tabulated figure accentuates the diversity and complexness of SWIR reflectance spectroscopy described above, by presenting significant spectral differences of four different types of measurements of the same chemical. It shows that both the surface and the physical state of the sample affects the reflected spectrum in a way that cannot be eliminated using a simple non-linear unmixing model.

Therefore, it is concluded that utilizing SWIR spectroscopy for a minute amount of material placed on a surface might pose a significant analytical challenge. Although, a simple unmixing model can be applied in some cases**,** where the background surface is opaque, the sample has low light scattering and absorption, and the measurement is performed using an imaging spectrometer. However, it is hard to guarantee such a set of conditions in many cases that may be ubiquitous in reallife applications.

*Reflectance Spectra Analysis Algorithms for the Characterization of Deposits… DOI: http://dx.doi.org/10.5772/intechopen.101301*

**Figure 8.** *Diffuse reflectance of sugar (granulated and powdered) on PVC and wood surfaces.*

#### **3.1 Classification of powdery residuals**

Spectral detection and classification of powdery and condensed materials for security, safety, food industry hygiene, etc., was suggested at various spectral regions, from THz [13, 14, 54, 55] through the MWIR [12, 34, 35], SWIR [56, 57] and more. However, in lower wavelengths (VIS-SWIR), most powders, especially finegrained powders, appear visually similar and therefore hard to distinguish, have little color and texture, and appear white (due to scattering). Also, the spectral contribution of the carrying surface tends to blend with the powder's spectrum, as discussed above. The literature shows many examples for powders and materials detection and classification, utilizing the availability and low cost of using the visual and near IR ranges for that task. Spectral imaging and computer vision was employed by Zhi, who showed reasonable classification accuracy (60–70%) for discrimination of 100 powders, using three cameras (RGB, NIR, SWIR) and 12 minutes acquisition time [58]. Classification of surfaces materials, also by computer vision, was used by capturing the micro-geometry and reflectance properties of the surfaces, using a photometric stereo sensor with a 3 cm working distance [59]. These examples require expensive light sources or complicated measurement apparatus, despite the use of the visual regime, which is supposed to be cheaper and less complex. This section presents the VIS-SWIR non-imaging spectral measurements and data analysis approach, for powders on various surfaces, with low hardware and software requirements, for powders detection and identification through classification.

#### *3.1.1 Data acquisition and analysis*

Different powders (sodium carbonate, Arizona dust, tryptophan, tenax, caffeine, hepes, copper) were disseminated on various surfaces (ceramics, laminated wood, PCV, cardboard, Perspex, acrylic glass, Teflon, painted and bare car metal, plastics, marble stone, pebble), and their VIS-SWIR spectrum was acquired using a non-imaging spectrometer. The data were collected using a spectrometer (Filedspec4 from ASD, with 2151 sampling points from 350 to 2500 nm) and a sampling contact probe consisting of a Halogen lamp and a collecting fiber as input. For each surface, various measurements were conducted, having different concentrations of powder per unit surface. Thus, a large dataset was collected, comprised of a range of intensities, and different relations between absorption peaks. Another source of spectral diversity is the size, shape, and orientation of the measured particles, which affects their scattering properties. It is worth noticing that due to these scattering effects, the orientation (pivot) of the surface also affects its reflected spectrum. These measurements produce a diverse dataset, well suitable for statistical learning methods, aka machine learning.

Supervised learning (classification) is the process of predicting the category of a given data point, based on a label train-set. The learning algorithm is supplied with a labeled train-set, in which every measurement is labeled in advance and learns the mapping function between the new input data and its response (label). Some data sets are linearly separable, and can be processed with linear algorithms such as SVM (support vector machine), while other problems require a higher-order hyper-plane to resolve the data. Applying some effort (such as kernel methods) enables linear learning algorithms to learn non-linear decision boundaries. Another approach to 'upgrade'simple algorithm performance is ensemble learning, in which weak learners are ensemble together to provide predictions that outperform the use of a single type of these learners, and to learn more complicated decision boundaries. One of these algorithms is random forest (RF, also known as tree bagger), which uses classification trees [60] and bootstrap aggregation random processes. The RF algorithm is trained using 70% of the data (training set), and the produced model is tested on the rest of the unseen data (test-set). On the train set data, RF performs a process of bootstrap aggregation (bagging) in which a subset of the train set (2/3) is randomly picked iteratively to produce a classification model whose results are examined on the rest third of the data- the validation set. This random process, and the random selection of predictors at each tree node, decrease the variance errors and enable the production of another measurement of the predictor—the "out-ofbag error" (OOBerr). By comparing the errors produced with and without each predictor, the OOBerr scores each predictor to note its contribution to the learning process. For further reading about RF, see Breiman [61–62].

**Figure 9** presents the confusion matrix<sup>1</sup> presenting the classification results of the aforementioned powders and surfaces, showing total accuracy of almost 90%, and high true positive rates (TPR, noted in the right vertical column). Note that the presented powders appeared white and indistinctive to the human eye, except copper that is in the form of metallic reddish flattened flakes. Nonetheless, all powders (except tryptophan) were classified with a similar TPR. The measurements are not normalized by the surface signature, exemplifying the strength of the classification process, which learns to ignore the distracting influence of the carrying surface.

As explained, the OOBerr parameter evaluates the contribution of each predictor (i.e., wavelength) to the learning process. By using only some of the top influencers, it is possible to avoid bad predictors, and reduce the required data volume, thus

**<sup>1</sup>** The confusion matrix compares the true class with the predicted class for each class. The diagonal terms represent the true classification, and its ratio to the total matrix represents the accuracy.

*Reflectance Spectra Analysis Algorithms for the Characterization of Deposits… DOI: http://dx.doi.org/10.5772/intechopen.101301*

**Figure 9.** *Confusion matrix—classification of powders on surfaces, using hyper-spectral data.*

speeding the whole process. **Figure 10b** illustrates the importance of all 2151 predictors from the OOBerr computation, where the top 5% are marked in black. The confusion matrix in **Figure 10b** shows RF classification with these 108 selected features. We see that the classification performance is almost unchanged, and the accuracy has an insignificant decrease of 0.4%.

## **3.2 Application: classification of wheat yellow rust disease**

Wheat is one of the world's major crops and provides a substantial amount of starch, proteins, vitamins, and dietary calories worldwide. One of the major threats, on a global scale, to wheat production is Yellow Rust (YR) disease, which is the most damaging disease of wheat on a global scale and causes an annual loss of millions of tons of wheat harvest valued at around 1G USD. Due to global warming and the evolution of YR strains adapted to higher temperatures, YR damages wheat crops in areas where it had not been previously reported. The spores are carried with the winds and reaches high altitudes so it can travel long distances. YR has a complex life cycle that includes several hosts and spore stages, which eventually appear as yellow particles (size of a few dozens of microns) covering the leaf surface, as seen in **Figure 11** left. Managing yellow rust can be utilized through the application of fungicides [63, 64], using resistant plants [65], and tracking [66]. While using resistant varieties is an efficient strategy, it poses some challenges for YR detection for two main reasons: (1) co-evolution of the host wheat and the fungal pathogen, might enable YR to overcome the YR-resistant genes mechanism. Hence, resistant plants also need monitoring for disease detection. (2) The Hypersensitive Response (HR) of a resistant leaf appears to be visually similar to YR disease. This is exemplified in **Figure 11** (right), presenting HR and YR early stages, which are visually hard to discriminate. This situation resembles the abovedescribed detection of powder on a carrying surface, where the surface is the green leaf, and the powder is the powdery particle of YR spores. Therefore, applying similar measurements and data processing methods can successfully classify the disease stages and HR response for the early detection of YR in the field.

*Colorimetry*

**Figure 10.**

*(a) Confusion matrix—classification of powders on surfaces, using top 5% important predictors presented in (b).*

#### **Figure 11.**

*YR symptoms on susceptible and resistant wheat leaves. Left—fully developed YR. Right: resistant (top) and susceptible (bottom) wheat leaves response to YR. The top leaf exhibits HR symptoms, which is visually similar to YR early symptoms in the lower leaf.*

*Reflectance Spectra Analysis Algorithms for the Characterization of Deposits… DOI: http://dx.doi.org/10.5772/intechopen.101301*

#### **Figure 12.**

*True positive rates (TPR) of early stages of sporulation vs. four levels of the predictors set: hyperspectral (all 2151 wavelengths), predictor-selection (top 5% important); multi-spectral (5-bands), and RGB.*

**Figure 12** illustrates the results of the classification process. The VIS-SWIR spectrum of hundreds of wheat leaves in various stages was acquired and classified with RF. Some of the leaves were green and healthy, some susceptible to YR, exhibiting sporulation in several stages (from the onset of sporulation; sporulation early stages; final sporulation stages), and some resistant leaves exhibiting several stages of HR (early stages and fully developed HR). The figure presents the TPR of sporulation early stages at four different data dimensions. Using all 2151 predictors produces a TPR of 92.2%. Using the feature selection process described in the previous section produced a slight decrease (TPR of 90.2%), using only 108 predictors. Further directionality reduction to five spectral bands (conventional agricultural imager) results in a TPR of 88%. Using only RGB channels results in a TPR of 78.4%. This noteworthy result pledges that YR detection does not require expensive specific hardware, and enables on-site monitoring by non-experts.

#### **4. Summary/conclusions**

Spectral light reflection can be used for the identification of particulate and condensed chemicals. In controlled situations, such as laboratory measurements, the sample can be manipulated to provide consistent high-quality reflectance spectra that can be used to characterize and identify the sample at hand. Such manipulations involve classical sample treatment techniques such as purification, grinding, and pressing to a pellet. However, standoff sensing of un-manipulated samples results in noisy measurements, requiring more sophisticated data analysis to extract meaningful information. LWIR spectrum does contain specific, unambiguous information of the molecular structure, but it involves scattering phenomena that require an adapted model, accounting for the sample's physical geometrical properties. A simple unified model was suggested to bypass this issue using a simplified model. A different analysis method was demonstrated in the case of light scattering in the SWIR. In this case, the reflectance spectra are broader and weaker, and a machine-learning model is used to classify the sample according to its typical reflectance. An additional consequence of the machine-learning model is the assessment of the contribution of each wavelength to the accuracy of the classification. Using only the important wavelength can speed up the computation and simplify the measurement, thus enhancing the usability of reflectance spectroscopy.
