# Hyperspectral Imaging System with Rotation Platform for Investigation of Jujube Skin Defects
## 3 Results and Discussion
### Classification Models  
Table 1 shows the classification accuracy, estimated on the validation set, of SVM and ANN models trained by using HSI data obtained by linear and rotation scan respectively. The classification accuracy was high for all four models and ranged from 96.3% to 97.4%. It can be noted that the accuracy of ANN models was higher than that of SVM models, and the models trained with the use of rotation scan data had higher accuracy than those trained with the use of linear scan data. To analyze and evaluate the performance of the four tested models for discriminating skin features of the jujube and to show how the pixels with spectral data belonging to different classes were classified by the specific model, the confusion matrices of these models were created and shown in Tables 2 and 3. The rows of matrix represent actual classes and the columns denote predicted classes. The diagonal \begin{table}
\begin{tabular}{c c} \hline \hline
**Classification Model** & **Precision** \\ \hline Model 1 (SVM trained with linear scan dataset) & 96.3\% \\ Model 2 (SVM trained with rotation scan dataset) & 97.3\% \\ Model 3 (ANN trained with linear scan dataset) & 96.5\% \\ Model 4 (ANN trained with rotation scan dataset) & 97.4\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Classification results of support vector machine (SVM) and artificial neural network (ANN) models with the use of data set obtained by linear and rotation scan. Figure 5: The averaged reflection spectra of common skin defects and glare of the jujube in the wavelength range of 468–950 nm. entries of the matrixes denote the percentage of pixels of the properly-recognized cases, while each entry outside the diagonal means an error (the percentage of misclassification). The confusion matrixes show that glare was the class from which most correct classification was obtained (higher than 99.16%) for all models. This can be easily explained by the fact that the reflectance of the spectra, in the full spectral range, of glare was much higher than those of other classes (Figure 5). Confusion between decay and rusty spot was higher than that of any other pair of classes, and the second high confusion was between decay and black fungus. One reason of confusion between decay and rusty spot was probably due to the spectral characteristics of decay and rusty spots being relatively similar in the full wavelength range used in this study. Another reason for the confusion between these classes was because decay and rusty were not mutually exclusive. The development of decay could occur on not only normal surface but also rusty surface, thus the pixels selected from decayed rusty surface could pertain to class decay and class rusty. However, in this work, single-output classification models were used so only one label could be assigned to pixels on decayed rusty surface. Therefore, confusion between decay class and rusty surface class could occur. To overcome this problem, multi-label classification models would be required, but this was beyond the scope of this work. The possible reason of confusion between decay and black fungus could be due to the large variation of reflectance of decay surface. Fungal infections that occurred on jujube surface typically caused a rapid decay in the area surrounding the fungal infection spot. As a jujube ripen, the color of skin changes from green to yellowish. The colors of decay or rot were highly dependent on the maturity stages of the jujube. In RGB image, the color of decay on mature green jujubes was much darker than that of ripen jujubes and was close to the color of black fungus. In this work, data labeling was based on visual assessment of surface features in the RGB image. Thus, it was challenging to differentiate dark decay and black fungus on green mature jujube surface by visual assessment of the surface features of the jujube in the RGB images. Therefore, labeling error about decay and black fungus could occur and lead to the confusion between classes of decay and black fungus.