| Apple grading can increase its product value attributes.According to Apple’s classification standards,external quality characteristics are important.The broad application prose of machine vision can be used for non-destructive inspection of the external characteristics of apples.In order to improve the classification accuracy,the extraction method of the three important features of apple classification,namely the apple grading,color,and texture of red Fuji apples are optimized and combined with defects and fruit-shaped features are comprehensive classification.The main contributions of this thesis are as follows::(1)An apple texture extraction method based on the fusion of circular neighborhood LBP operator and partial gray-scale compression expansion co-occurrence matrix is proposed.The gray level co-occurrence matrix can identify the change amplitude,adjacent interval,and gray direction in the image,but it is greatly affected by the illumination.Combining the advantages of the illumination invariance of the circular neighborhood LBP operator and the advantages of obtaining any number of neighborhood pixels and circular patterns of any radius,the method is fused,and gray scale compression and gray matrix are performed on some gray information The expansion process keeps the original gray level unchanged for the remaining gray levels,and selects the feature mean in the dominant direction as the final result to obtain more accurate apple image texture features.A method for calculating the actual fruit diameter based on threshold segmentation is proposed.The required segmentation threshold is obtained by the equation of the distance and the actual size of the pixel.Then,a threshold function is used to fit the pixel diameter to a linear function to obtain the actual fruit diameter.Compared with the overall linear fitting,the accuracy is improved.(3)A red component extraction algorithm for the pre-analyzing threshold region is proposed.Different environments affect the extraction of color components.The red extraction threshold on the H component in the HSV color model cannot be adaptive.This paper proposes a method for pre-analyzing the red segmentation threshold on the H component.Firstly,manual red area calibration is performed on part of the collected images,and the color threshold area of the calibration area is counted to obtain the highest frequency color threshold area as the red extraction threshold area in this paper.(4)Combining defects and fruit-shaped features,a decision tree and SVM model based on particle swarm optimization are used for decision fusion and classification.Finally,based on this,using C#,OpenCV and MySQL technology to carry out system architecture design,database design,algorithm modular packaging and user interface design,to achieve the Red Fuji Apple classification system. |