## 4 Hyperspectral Image Analysis Methods
### Hyperspectral Image Preprocessing  
Original hyperspectral data are generally not suitable for direct qualitative/quantitative analysis since artifacts, noises, and undesired signals are also collected owing to test environments and imperfect components in the imaging systems. Spectral and image preprocessing procedures aim to  
Figure 7: Line-scan hyperspectral reflectance imaging measurements of Golden Delicious apples: (**a**) reflectance images in the visible and near-infrared region for fruit surface inspection, reproduced with permission from [13]; Copyright Springer, 2011; and (**b**) scattering image for fruit internal quality evaluation based on absorption and scattering properties determined by spatially resolved diffuse reflectance.  
remove these effects to make the data independent of the measurement conditions and systems. For reflectance measurements, flat-field correction, which aims to reduce artifacts caused by pixel-to-pixel signal variations and distortions along the optical path, is a frequently used preprocessing method. White diffuse reflectance panels--with a reflectance factor close to 100% over a broad wavelength range--are usually used as standards to convert original absolute intensities in CCD counts to relative reflectance in percent (typically in the range of 0%-100%). For fluorescence flat-field corrections, several flat-field materials (e.g., white inkjet paper, fluorescein, and rhodamine B) are usually needed for different spectral regions (e.g., blue, green, and red) due to limited spectral ranges in fluorescence emission (<150 nm) [3]. In Raman measurements for food and biological materials, fluorescence signals are commonly acquired in laser-sample interactions. The weak Raman scattering signals can be easily overwhelmed by the strong fluorescence signals. Hence fluorescence correction is a major preprocessing procedure in Raman data analysis. Based on its mathematical nature, the fluorescence baseline can be eliminated using different algorithms, such as polynomial curve fitting, least squares, wavelet transformation, Fourier transformation, and derivatives [16]. Besides the aforementioned procedures, other preprocessing methods such as spectral smoothing, normalization, image masking, and spatial filtering can also be used to reduce various useless signals in the original image data.  
An example of fluorescence correction for Raman data of a carrot slice [14] is shown in Figure 8. Raman images were acquired using a step size of 0.07 mm by the line-scan hyperspectral system shown in Figures 2a and 5a (see 785 nm line laser on the carrot in Figure 2a), resulting in a 900 \(\times\) 900 \(\times\) 1024 hypercube (900 scans and 1024 bands). Fluorescence signals were observed in the original Raman spectra at four selected tissue areas (Figure 8e). An original single-band Raman image (Figure 8b) was dominated by the strong fluorescence from the periderm layer. After removing the fluorescence background by a baseline correction method using adaptive iteratively reweighted penalized least squares (airPLS) [17], three major Raman peaks became more evident at 1006, 1154, and 1513 cm\({}^{-1}\) (Figure 8f), which can be assigned to carotenoids in the carrot tissues. Because the periderm fluorescence was largely diminished in the corrected image at 1513 cm\({}^{-1}\) (Figure 8c), the carotenoid Raman signals became the major feature owing to the peak intensities at this wavenumber. A color map image (Figure 8d), which was created based on the pixel intensities of the 1513 cm\({}^{-1}\) corrected image, illustrates the relative concentration of the carotenoids and provides a better view of the carotenoid distribution over the carrot cross section than the color image (Figure 8a). The Raman chemical imaging method demonstrated in this example can be used to inspect Raman-active attributes (e.g., natural pigments) of other types of fruits and vegetables for monitoring quality, maturity, disease, and plant development.  
Figure 8: _Cont._