## 3 Results and Discussion  
### Data Pre-processing  
The outlier detection results showed that seven samples from each cultivar were located outside the confidence area at a 99% confidence level. After moving these 14 samples, the remaining 746 spectra of two cultivars were plotted together in Figure 2a. As shown in Figure 2a, it can be easily observed that the seed samples from cultivar H8 and cultivar H168 had almost the same absorption peaks, suggesting that the internal components in sweet corn seed kernels of the two cultivars are highly similar. The broad peaks around 1210 nm and 1460 nm could be assigned to the second overtone vibration absorption of the -CH functional group. These peaks were mainly caused by the absorption of carbohydrate content because more than half of the carbohydrate content in sweet corn seeds contained abundant -CH bonds. For the same reason, two adjacent peaks around 1724 nm and 1760 nm corresponded to the first overtone vibration absorption of the -CH\({}_{2}\) and -CH, respectively, and another two adjacent peaks around 2310 nm and 2348 nm were related to the combination bands absorption of -CH\({}_{2}\) and -CH [44]. When studying Figure 2b, slight differences can be observed around the four above peaks between two cultivars after removing the scattering effects by processing with MSC. In Figure 2c, the Savitzky-Golay first derivatives of the spectra showed that all spectral curves maintain the same crests and troughs. However, the difference in amplitude of some crests and troughs could somehow be highlighted. [PERSON] et al., (2016) reported that the differences around 1700 nm and 1748 nm were assigned to the -CH combination and overtones stretching due to absorption by -CH\({}_{2}\) and -CH\({}_{3}\), and they also indicated that the wavelengths around 2275 nm corresponded to -OH stretching, which represented the carbohydrate content [21].  
The boxplot in Figure 3 shows the spectral angle values between sample spectrums and the reference spectrum with different pre-processing methods while using the mean spectrum of cultivar H8. The top and bottom of the box were the 25 th and 75 th percentiles. The horizontal dotted line inside the box represented the median value within the cultivar. The upper and lower whiskers represented the maximum and minimum values within the cultivar, respectively. It can be clearly observed that all the spectral angles were smaller than 0.3 rad, indicating two group of spectrums were highly similar. While comparing the difference of two cultivars, the spectral angles from cultivar H168 were overall higher than the cultivar H8 because the mean spectrum of cultivar H8 was used as the reference spectrum. However, the distributions of spectral angle values from two cultivars were highly overlapped, even though different pre-processing methods were applied. The Savitzky-Golay first derivative methods magnified the range of the angle values. On the contrary, the MSC methods narrowed the range down since they made the data more uniform after reducing the scattering effects. The smoothing methods resulted in almost the same distributions of spectral angles as the original data. It was hard to find a threshold to separate these two cultivars perfectly based on the spectral angles. The same pattern was found when using the mean spectrum of cultivar H168, but the result is not shown in this paper.  
Figure 3: The boxplots of the spectral angle values between all sample spectrums and the reference spectrum with different pre-processing methods (cultivar H8 in red and H168 in blue).  
Figure 2: The spectra collected from two cultivars of sweet corn seed samples. (**a**) The full-range wavelengths from 1000 nm to 2500 nm, (**b**) the spectra pre-processed by MSC (cultivar H8 in red and H168 in blue), and (**c**) the spectra pre-processed by the Savitzky–Golay first derivative (cultivar H8 in red and H168 in blue).