# Hyperspectral Imaging to Evaluate the Effect of Irrigation Water Salinity in Lettuce
## 3 Results and Discussion
### Models and Data Processing  
#### 3.3.1 Second Derivative and SNV Normalization: Principal Component Analysis  
Figure 5A shows the mean preprocessed spectra (SG D2 SNV) corresponding to the seven leaves from the calibration set for each salt treatment. This preprocessing procedure (SG D2 SNV) showed the best ability for sensing the effect of salinity once PCA was applied, and therefore these spectra were considered for the computation of the PCA model. The second derivative is a measure of the change in the slope of the spectral curve, and therefore it presents a value different from zero when there is a curvature on the spectra. It changes its value if there is a change in the curvature (typically when there is a lateral displacement of the spectra at red-edge area). Just at red edge (maximum slope, inflection point) the curvature is zero, and it becomes different from zero if the spectra move towards the right or towards the left. Peaks at 550 nm and 510 nm in the preprocessed spectra decrease with  
Figure 4: (**a**) First derivative mean spectra of the leaves of each saline treatment. Calibration set, \(n=28\) leaves (4 saline treatments \(\times\) 7 leaves); (**b**) zoom on the red edge. See Table 1 for abbreviations. the salinity level, so the slope of the spectra decrease with increased salinity. This concurs with the previously observed flattening process of the spectra as the salinity level increases. The first principal component (PC1) from the PCA applied on the SG D2 SNV preprocessed spectra, explaining a 94.46% of variance, was retained as the most related to the changes caused by the salt concentration in the leaves. The PC1 loadings are shown in Figure 5B. The projections of the mean spectra for the PC1 (scores) for each of the four salinity groups are presented in Figure 5C. Two regions of high loading values can be observed (Figure 5B), corresponding to the major regions with differences in the preprocessed spectra (Figure 5A): one is located at approximately 500-600 nm and the other occurs at the red edge region. The remaining wavelengths have loading values close to zero reflecting no changes in the slope at NIR region, above approximately 780 nm. However, there is an increase of the level of reflectance at this NIR region observed in the raw (without preprocessing) reflectance spectra, Figure 3A. This fact is deeply discussed in Section 3.2.1 and at the end of Section 3.2.2. The loadings of PC1 around 500-600 nm presents an approximation to the slope between 550 and 510 nm (Figure 5B). Looking to the values (in the loadings of PC1 in the Figure 5B) of \"\(y\)-axis\" at 550 and at 510 nm, it is shown that \"\(y\)-axis\" at 550 is higher and more positive than \"\(y\)-axis\" at 510 (that is negative). Thus, the inner product of PC1 by SG D2 SNV spectra at this region produces an approximation to the slope at this range. As the salinity level increases, the value of the slope (which is negative in this range) increases (because it becomes less negative). Figure 5: (**a**) Mean Savitzky-Golay algorithm (SG), second derivative (D2) and SNV pre-treated spectra of the leaves of calibration set for each saline treatment; (**b**) The first principal component (PC1) loadings from principal component analysis (PCA) applied on second derivative and SNV processed spectra; and (**c**) PC1 scores of mean spectra of the leaves of calibration set for each saline treatment (Ct, S1, S2 and S3 treatments, \(x\)-axis), with the mean values of each group are shown in red. In addition, the SG D2 SNV spectra showed a displacement to the right at the red edge region. PC1 also senses this displacement of the preprocessed spectra at 710 nm. Looking to the PC1 in the region comprises between 675 and 745 nm, the \(y\)-axis value at 675 nm and at 745 nm is lower and negative in comparison with \(y\)-axis value at 710 nm, which is positive.