# Evaluation of Baby Leaf Products Using Hyperspectral Imaging Techniques
## 2 Materials and Methods
### Image Pre-Processing and Spectral Wavelength Selection  
The spectral data acquired by the Spectral Scanner followed a rigorous electronic and optical calibration procedure. This process ensured that the spectral data were normalized against the maximum reflectance and effectively purged of electronic noise. The instrument performed, thanks to its appropriately compiled software, the normalization of the spectral data following the equation of [PERSON] et al. (2007) [PERSON] et al. (2007). \[R_{c,\lambda}=\frac{R_{\lambda}-D_{\lambda}}{W_{\lambda}-D_{\lambda}} \tag{1}\]  
Hyperspectral systems generate a multitude of reflectance data, at many wavelengths. Specifically, in the case of the instrument used and with the operating modes set, about 60,000 spectra with 261 wavelengths each were obtained. Therefore, strategies were put in place to identify the wavelengths that were truly influential, and thus usable for training the mathematical model. Specifically, the large dataset (261 wavelengths) obtained from the hyperspectral imaging system was analyzed using the \"Feature Selection Minimum Redundancy Maximum Relevance\" (FS-MRMR) algorithm. The method used a progressive addition scheme to populate an empty set S containing the best wavelength to be used for the mathematical model. For this purpose, the algorithm used an interdependence function (I) [PERSON] et al. (2007), which indicates the interdependence or not of a pair of wavelengths (\(\lambda\)), and a mutual information quotient (MIQ) value to rank the features (wavelengths). The MIQ (Equation (2)) includes two indices, \(V_{\lambda}\) and \(W_{\lambda}\), which indicate the relevance and redundancy of the response variable (with respect to actual leaf moisture percentage). \[MIQ=\frac{V_{\lambda}}{W_{\lambda}} \tag{2}\]  
where  
\[V_{\lambda}=I(\lambda,y) \tag{3}\]  
\[W_{\lambda}=\frac{1}{|S|}=\sum_{zz\in S}I(\lambda,z) \tag{4}\]  
A simplified schematic of the algorithm can be seen in Figure 1 The set S, thus defined, comprises the most influential and usable wavelengths for constructing the prediction model. Following the selection of these influential variables, it was necessary to eliminate the outliers. An outlier is defined as a data point that deviates from the available data population according to established standards of variation. Mathematically, this concept can be summarized by referencing the mean and standard deviation of a given data population. \[\mu_{k}=\frac{1}{N}\sum_{i=1}^{N}x_{i} \tag{5}\]  
where \(\mu\) is the mean of a population k of data and  
\[\sigma_{k}=\sqrt{\frac{1}{N-1}\sum_{i=1}^{N}\lvert x_{i}-\mu\rvert^{2}} \tag{6}\]  
where \(\sigma\) is the standard deviation of the population of N data. A data point within a population may be classified as an outlier if it deviates beyond two standard deviations from the mean (i.e., less than \(\mu-2\sigma\) or greater than \(\mu+2\sigma\)). Considering the data population's structure as a 57,000 \(\times\) 261 matrix, outlier elimination was strategically focused on the wavelength exhibiting the highest variability: wavelength 213, centered at 1460 nm. Once these outliers were identified, their associated spectra  
Figure 1: Algorithm operation flow diagram. and corresponding response variable values were subsequently removed. This determination and elimination process was meticulously executed through a custom-developed computational algorithm. The decision to use the FSMRMR method was dictated by the need to improve the effectiveness of existing vegetation indices. In fact, these vegetation indices use simple mathematical functions both to be universal, and work on vegetation in general, but also to require less computing power. This, however, is countered by an accuracy of measurement of the desired parameter.