Lemon Defect Detection Based on Seagull Algorithm Optimization–Support Vector Machine Model
摘要
There are numerous types of surface defects on lemons, and the characteristics of these defects exhibit significant similarities, particularly in terms of overlapping color and texture features. This similarity poses considerable challenges for traditional detection methods regarding both feature extraction and classification accuracy. To address this issue, this study proposes a novel classification method that integrates the seagull optimization algorithm (SOA) and support vector machine (SVM), with yellow lemons chosen as the research subject. The study encompasses five typical defects: dry scar, insect spot, sunburn, mold spot, and mechanical injury. By integrating image processing techniques such as median filtering, Otsu threshold segmentation, and HSV (hue, saturation, value) color space conversion, three key features—color, geometry, and texture—are extracted to construct a comprehensive and discriminative feature system. Experimental results demonstrate that the SOA-SVM model achieved an average classification accuracy of 94.3% across the five defect types, outperforming other comparison models such as particle swarm optimization support vector machine (PSO-SVM) and gray wolf optimization support vector machine (GWO-SVM). Beyond achieving higher accuracy, the method also exhibits strong robustness and adaptability to variations in fruit surface appearance, thereby highlighting its practical value. This approach provides reliable technical support for lemon quality classification and intelligent agriculture applications, while also showcasing potential for broader use in multi-variety fruit defect detection and real-time grading systems.