## 3 Results
### Experimental Results and Comparisons
#### 3.2.3 Defect Segmentation Results of Improved SSR Image Enhancement and Region-Growing Algorithm  
In order to verify the effectiveness and practicality of the defect detection method in this paper, four representative apple images were selected as experimental images, which were compared and analyzed with the image segmentation method based on the genetic algorithm (with OSTU algorithm as the fitness function and roulette algorithm as the selection algorithm) and the segmentation method based on the canny operator for edge detection built into the machine vision module OpenMV. Figure 11a is characterized by a natural depression at the apple fruit stalk, which results in a certain degree of abrupt change in light reflectance near this region. The detection results of each method for this image are shown in Figure 11. The genetic algorithm-based segmentation method detected a large area of the fruit stalk, and the boundary between the normal surface and the fruit stalk was not obvious. The edge detection algorithm only had some detection ability for the deepest gray level zero part of the fruit stalk. Comparatively, the proposed segmentation method could detect the whole depressed area where the light reflectivity had changed abruptly, and the boundary was more reasonable, providing a more reliable texture basis for the subsequent identification of the peduncle calyx. Figure 11a is characterized by the same natural depression at the calyx of the apple and a significant uneven light reflectivity at the right edge of the apple. The detection effect of each method on this image is shown in Figure 12. In the extraction of calyx defects, the segmentation method based on the genetic algorithm had a better detection effect at the calyx, and the boundary between the calyx and the normal surface was more reasonable, but it was easily disturbed by the uneven light reflectivity phenomenon in the light-dark area. The segmentation method based on the edge detection algorithm had some over-segmentation phenomena for the calyx with complex textures. Comparatively, the proposed segmentation method still had good segmentation ability at the calyx defects while resisting the uneven interference of light reflectivity. Figure 12a is characterized by defects located within a dark zone caused by uneven light reflectivity, highlighting the disturbance caused by uneven light reflectivity. The detection effect of each method on this image is shown in Figure 13. The segmentation  
Figure 11: Effectiveness of each method for detection of apple stem images. (**a**) Original figure; (**b**) genetic algorithm segmentation result; (**c**) edge detection algorithm result; (**d**) segmentation effect of the proposed image segmentation method. Figure 12: Detection effect of each method on calyx images. (**a**) Original figure; (**b**) genetic algorithm segmentation result; (**c**) edge detection algorithm result; (**d**) segmentation effect of the proposed image segmentation method. method based on the genetic algorithm had a significantly lower edge detection accuracy in the light-dark region than in the light-bright region. The segmentation method based on the edge detection algorithm had a significant difference in the detection effect in the bright and dark zones caused by the uneven light reflectivity. In the bright area, the contrast between the gray intensity of the pixels at the edge of the defect and the edge of the normal surface was obvious, and the segmentation effect was more satisfactory. In the dark area, the original strong gray contrast at the edge became flat, and the detection effect of the edge detection algorithm was almost completely lost. Comparatively, the proposed segmentation method was not affected by the light and dark areas caused by uneven light reflectivity and had the same detection accuracy in the dark area as in the light area. Figure 14a is characterized by a more complex defect edge contour.