Classification Exploration on the Potato Epidermis by KNN Algorithm Combining HSV Color Space and Textural Features
(College of Information Science and Technology, Gansu Agricultural University, Lanzhou 730070, China)
Abstract
This paper realizes the accurate potato epidermis classification by using the KNN algorithm that combines the HSV color space and textural features. The collected potato epidermis images are converted from the RGB color space to the HSV color space, and the histograms of the hue, saturation, and brightness channels are calculated respectively. In terms of textural features, the GLCM (Gray Level Co-occurrence Matrix) is adopted to convert the images into grayscale images, and four feature values, namely energy, contrast, correlation, and homogeneity of the GLCM are calculated. Moreover, the LBP (Local Binary Pattern) histogram of the images is calculated through the LBP mode. Finally, these three kinds of features are concatenated into a one-dimensional array as the feature vector of the image, and the KNN (K-Nearest Neighbors) algorithm is utilized to achieve the potato epidermis classification. The results show that the accuracy is 95%, the average precision rate is 91.67%, the average recall rate is 95%, and the average F1-score is 92.22%. The research indicates that the combined features can significantly improve the classification accuracy, providing a new and effective approach for the quality detection and classification of potatoes.
Keywords
potato epidermis classification; HSV color space; textural feature; Gray Level Co-occurrence Matrix; KNN algorithm
References
- [1] Cui Yongwei, Du Conghui, Li Shujun Analysis and Prospect of the Development of Potato Seed Industry in China [J]. Agricultural Outlook, 2020, 16 (1): 71-76
- [2] Zhang Yusheng, Liu Yang, Gao Mingjie, etc Comparative Analysis of International Competitiveness of Chinese Potato Products [J]. Agricultural Outlook, 2020, 16 (9): 101-106
- [3] Jiang Hong, Yu Yongbo, Zhang Xiangfeng, etc Overview of external quality grading methods for potatoes [J]. Science, Technology and Engineering, 2022, 22 (14): 5519-5527
- [4] Liu Hao, He Fuqiang, Li Ronglong, etc Design of Potato Automatic Grading and Defect Detection System Based on Machine Vision [J]. Agricultural Mechanization Research, 2022, 44 (1): 73-78
- [5] Yang Jiapeng, Dong Rong Application of Machine Learning in Smart Agriculture [J]. Agricultural Engineering, 2024, 14 (7): 15-21
- [6] Tang Zhensan, Yuan Jianlong, Kang Lianghe, etc Research on Classification of Potato Peel Roughness Based on Image Feature Recognition [J]. Chinese Journal of Agricultural Sciences, 2023, 56 (22): 4428-4440
- [7] He Yuqing, He Yongning, Jing Bo, etc Monitoring method of crop types in sugarcane protected areas based on gray level co-occurrence matrix [J]. Smart City, 2021, 7 (11): 12-13
- [8] Jina, He Guorong Texture feature extraction method for kiwi shaped scar images based on grayscale recognition [J]. Automation and Instrumentation, 2019 (1): 159-162
- [9] Zhang Jinmin, Yang Tianxi Potato Sprout Eye Recognition Based on LBP and SVM [J]. Journal of Shandong Agricultural University: Natural Science Edition, 2020, 51 (4): 744-748
- [10] Yang Ying, Wen Xiaoling, Zhang Xiuhua Research on Rice Disease and Pest Identification Method Based on Direction Gradient Histogram and Local Binary Pattern Mixed Features [J]. Journal of Henan Agricultural University, 2021, 55 (6): 1089-1096
- [11] Liu Li, Feng Hongcai, Huang Qing Optimization algorithm for keyframe extraction of agricultural technology knowledge videos based on Sobel LBP [J]. Hubei Agricultural Science, 2022, 61 (20): 172-178
- [12] Chen Deqiang Research on Image Classification Based on Improved KNN Algorithm [D]. Guiyang: Guizhou University for Nationalities, 2020
Funding
Gansu Agricultural University Student Research Training Program Project (No. 202416022)
About the authors
Liu Shuai (2003-), male, Han ethnicity, from Huan County, Gansu Province, undergraduate student, research direction: data mining, machine vision; Kang Lianghe (1987-), female, Han ethnicity, from Huining, Gansu Province, lecturer, master's degree, research direction: artificial intelligence algorithm research.