The Surface Defects Detection of Citrus on Trees Based on a Support Vector Machine

Machine learning and image processing have been combined to identify and detect defects in mature citrus fruit at night, which has great research and development significance. First, a multi-light vision system was used to collect citrus UV images, and from these, 1500 samples were obtained, 80% of which were training and 20% were experimental sets. For a support vector machine (SVM) model with “2*Cb-Cr”, “4*a-b-l”, and “H” as the training features, the accuracy of the final training model in the experimental set is 99.67%. Then, the SVM model was used to identify mature citrus regions, detect defects, and output the defective citrus regions label. The average running time of the detection algorithm was 0.84097 s, the accuracy of citrus region detection was 95.32%, the accuracy of citrus defect detection was 96.32%, the precision was 95.24%, and the recall rate was 87.91%. The results show that the algorithm had suitable accuracy and real-time performance in recognition and defect detection in citrus in a natural environment at night.