Abstract:Homomorphic filtering and improved k-means algorithm were used to solve the problem of apple surface reflection and apple shadow caused by uneven light during apple grading. Before homomorphic filtering, the apple image was converted from RGB space to HSV space. Then the V component of HSV space was enhanced by homomorphic filtering to minimize the impact of uneven light. For the traditional K-means clustering algorithm, distance measurement method, determination of clustering number and initial center point were newly added, which can better remove the influence of apple shadow on image segmentation. The Qin Guan apples in Fu Xian county of northern Shaanxi were classified from five aspects, such as size, shape, quality, color and defect. Compared with the artificial and mechanical classification, the classification success rate reached 97%. Using homomorphic filtering algorithm and improved k-means algorithm to process apple images can greatly improve the accuracy of apple classification.