Corresponding Author(s)



Objective: In order to solve the problem of inaccurate defect extraction caused by complex and variable color and irregular texture changes of tomato surface defects, the defect segmentation method based on image local variance with brightness correction was proposed. Methods: On the basis of using histogram threshold segmentation method to segment calyx and stem scar and the method of domain pixel weighted sum to replace the original pixel to complete the brightness correction, the gray image of tomato surface was divided into several image blocks, and the color of each block was characterized by image pixel variance, and then the defect and healthy area were separated. SVM model was used to detect the proportion of tomato surface defect area in the original tomato area. Results: Considering the brightness correction, the accuracy of tomato defect area extraction could be improved by 27.74%. On this basis, compared with the global threshold, dynamic threshold and regional growth algorithm, the defect extraction method based on image local variance could accurately achieve the quasi-deterministic and complete extraction of tomato surface defects, and the accuracy of the Gauss-SVM model with the defect area ratio as the input for tomato surface defect detection reached 96%. Conclusion: Considering brightness correction, the SVM defect extraction method based on image local variance is suitable for tomato surface defect detection.

Publication Date


First Page


Last Page





[1] 周海英, 化春键, 方程骏. 基于机器视觉的梨表面缺陷检测方法研究[J]. 计算机与数字工程, 2013, 41(9): 1 492-1 494. ZHOU H Y, HUA C J, FANG C J. Pear surface detection method based on machine vision research[J]. Computer and Digital Engineering, 2013, 41(9): 1 492-1 494.
[2] 刘军, 郭俊先, 帕提古丽·司拉木, 等. 基于机器视觉与支持向量机的核桃外部缺陷判别分析方法[J]. 食品科学, 2015, 36(20): 211-217. LIU J, GUO J X, PATIGULI S, et al. Discrimination of walnut external defects based on machine vision and support vector machine[J]. Food Science, 2015, 36(20): 211-217.
[3] MOALLEM P, SERAJODDIN A, POURGHASSEM H. Computer vision-based apple grading for golden delicious apples based on surface features[J]. Information Processing in Agriculture, 2017, 4: 33-40.
[4] IRERI D, BELAL E, OKINDA C, et al. A computer vision system for defect discrimination and grading in tomatoes using machine learning and image processing[J]. Artificial Intelligence in Agriculture, 2019, 2: 28-37.
[5] 夏垚, 胡步发, 张善福. 一种基于树莓派平台的脐橙品质分级方法[J]. 机械制造与自动化, 2022, 51(1): 128-131. XIA Y, HU B F, ZHANG S F. Quality grading method of navel orange based on raspberry Pi platform[J]. Machine Building & Automation, 2022, 51(1): 128-131.
[6] 张明, 王腾, 李鹏, 等. 基于区域亮度自适应校正算法的脐橙表面缺陷检测[J]. 中国农业科学, 2020, 53(12): 2 360-2 370. ZHANG M, WANG T, LI P, et al. Surface defect detection of navel orange based on region adaptive brightness correction algorithm[J]. Scientia Agricultura Sinica, 2020, 53(12): 2 360-2 370.
[7] LI J B, HUANG W Q, ZHAO C J. Machine vision technology for detecting the external defects of fruits: A review[J]. The Imaging Science Journal, 2015, 63(5): 241-251.
[8] CAO Y Y. Detection of fruit surface defects based on machine vision[J]. Journal of Physics: Conference Series, 2021, 1 952(2): 022048.
[9] 燕红文. 基于机器视觉的番茄损伤区域自动检测[J]. 无线互联科技, 2020, 17(11): 126-127. YAN H W. Automatic detection of tomato damage area based on machine vision[J]. Wireless Internet Technology, 2020, 17(11): 126-127.
[10] HASSAN N M H, NASHAT A A. New effective techniques for automatic detection and classification of external olive fruits defects based on image processing techniques[J]. Multidimensional Systems and Signal Processing, 2019, 30(2): 571-589.
[11] BEYAZ A, MARTINEZ GILA D M, GOMEZ ORTEGA J, et al. Olive fly sting detection based on computer vision[J]. Postharvest Biology and Technology, 2019, 150: 129-136.
[12] 马大国, 马岩. 基于 Gabor 特征的木材表面缺陷的分块检测[J]. 东北林业大学学报, 2013(10): 118-121. MA D G, MA Y. Gridding detection of wood surface defects based on gabor features[J]. Journal of Northeast Forestry University, 2013(10): 118-121.
[13] 郭慧, 王霄, 刘传泽, 等. 基于灰度共生矩阵和分层聚类的刨花板表面图像缺陷提取方法[J]. 林业科学, 2018, 54(11): 111-120. GUO H, WANG X, LIU C Z, et al. Research on defect extraction of particleboard surface images based on gray level co-occurrence matrix and hierarchical clustering[J]. Scientia Silvae Sinicae, 2018, 54(11): 111-120.
[14] TELEA A. An image inpainting technique based on the fast marching method[J]. Journal of Graphics Tools, 2004, 9(1): 23-34.
[15] 刘传泽, 罗瑞, 陈龙现, 等. 基于区域筛选分割和随机森林的人造板表面缺陷识别[J]. 制造业自动化, 2018, 40(9): 9-13. LIU C Z, LUO R, CHEN L X, et al. Surface defect recognition of wood-based panel based on regional screening and segmentation and random forest[J]. Manufacturing Automation, 2018, 40(9): 9-13.
[16] 熊俊涛, 梁翠晓, 林忠凯, 等. 基于支持向量机的柑橘表征缺陷荧光检测[C]// 2018粤港澳大湾区智能检测与协同创新青年论坛论文集. 广州: 中国仪器仪表学会, 2018: 294-300. XIONG J T, LIANG C X, LIN Z K, et al. Fluorescence detection of citrus characterization defects based on SVM[C]// Proceedings of 2018 Guangdong Hong Kong Macao Greater Bay Area Intelligent Detection and Collaborative Innovation Youth Forum. Guangzhou: China Instrument and Controlsociety, 2018: 294-300.
[17] 赵玉清, 杨慧丽, 张悦, 等. 基于特征组合与SVM的小粒种咖啡缺陷生豆检测[J]. 农业工程学报, 2022, 38(14): 295-302. ZHAO Y Q, YANG H L, ZHANG Y, et al. Detection of defective Arabica green coffee beans based on feature combination and SVM[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(14): 295-302.



To view the content in your browser, please download Adobe Reader or, alternately,
you may Download the file to your hard drive.

NOTE: The latest versions of Adobe Reader do not support viewing PDF files within Firefox on Mac OS and if you are using a modern (Intel) Mac, there is no official plugin for viewing PDF files within the browser window.