The invention discloses a self-adaption improved gradient information-based fruit surface defect detection method. The method comprises removing background of a RGB
color image, carrying out binaryzation, individually extracting edge, carrying out expansion once to obtain a contour edge expansion image, converting the
color image into a
gray level image, carrying out calculation to obtain a normalized gradient image, carrying out statistics by a gradient
histogram so that gradient information self-adaption improvement is realized, automatically calculating an
image segmentation threshold value, acquiring an improved gradient
binary image by image threshold segmentation, removing the contour edge expansion image of the improved gradient
binary image to obtain a difference image, carrying out expansion hole-filling
corrosion and median filtering treatment on the difference image to obtain a fruit surface defect image. The method realizes detection of surface different brightness characteristic defects under the condition of nonuniform globoid
surface brightness, utilizes
image segmentation threshold self-adaption calculation, is free of artificial selection, can be realized easily, and has an application potential in fruit and agricultural product quality
machine vision on-line detection.