# Detection of Defective Features in Cerasus Humilis Fruit Based on Hyperspectral Imaging Technology
## 4 Conclusions  
In this study, hyperspectral imaging technology was used to identify the defect region of _Cerasus humilis_ fruit from qualitative analysis and feature recognition. Main research conclusions:  
1. The de-trending (De-T) spectral pretreatment method can better optimize spectral data, and the PLS model of spectral data after pretreatment has a relatively high accuracy, with the correlation coefficient of prediction (Rp) of 0.8571 and root mean square error of prediction (RMSEP) of 0.2964. Regression coefficient (RC), successive projections algorithm (SPA), and competitive adaptive reweighted sampling (CARS) algorithms were used to extract the characteristic wavebands of spectral data after baseline pretreatment, and the least squares-support vector machine (LS-SVM) model was established. It is concluded that the CARS-LS-SVM model was the best at detect  
Figure 10: The identification of _Census humilis_ fruit with defective features: (**a**) cracked sample; (**b**) insect damage sample; (**c**) rust spot sample.  
ing the defective (rust spot, insect damage, crack) and normal _Cerasus humilis_ fruit samples, with an accuracy rate of 93.2%. As can be seen from the detection results of spectral technology, it was impossible to detect all three defect types proposed in the paper using a single spectral technology. Therefore, the analysis and detection of the three defect types were also considered from the perspective of image processing technology.
2. On the other hand, images corresponding to eight sensitive bands (950, 994, 1071, 1263, 1336, 1457, 1542, and 1628 nm) selected by CARS were subjected to principal component analysis (PCA). Then, using the \"Imfill\" function, \"Canny\" operator, \"Regiongrow\" algorithm, \"Bwareaopen\" function and the images of PCA, the edge and defect feature of 105 _Cerasus humilis_ fruits could be recognized. The result of image discrimination shows that the detection precision of the algorithm was 88.57%. It can be seen from the research results that the image processing techniques could not identify all the defect samples.  
This study provides theoretical support and a basis for the online detection equipment of _Cerasus humilis_ fruit. However, in this study, fruits of similar weight and size were selected as research objects and the influence of different colors shades and sizes of fruits on the detection accuracy was not considered. Further research will consider adding fruits with different colors shades, sizes, and more types of defect characteristics, as well as collecting samples of _Cerasus humilis_ fruit from different varieties and locations to improve the robustness of the model, optimize the detection algorithm, and apply this processing to other fruits.  
Conceptualization, B.W.; methodology, B.W. and L.L.; software, B.W. and L.L.; data curation, B.W. and L.L.; writing--original draft, B.W. and S.Z.; writing--review and editing, B.W., S.Z. and H.Y. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Basic Research Project of Shanxi Province (Free Exploration) (Grant NO. 20220302123641).  
Not applicable.  
Data Availability Statement: Data are contained within the article.  
The authors thank the editor and anonymous reviewers for providing helpful suggestions for improving the quality of this manuscript.  
The authors declare no conflict of interest.