| Red orange is an agricultural product with Wanzhou characteristics,it has high nutritional edible value,medicinal value and economic value due to its unique taste.Its picking and deep processing technology is relatively backward,especially in the sorting and grading process,it has always used traditional manual screening one by one.The situation of high labor intensity,low efficiency,and uneven classification is also easily affected by human subjective factors,but the efficiency of mechanical sorting High,but can only sort the fruit diameter,not the fruit shape,color and lesions.However,the emergence of machine vision technology can solve the above problems and improve fruit competitiveness,which is conducive to promoting the development of the red tangerine industry in the region in a better direction.In this paper,the red orange grading system based on machine vision is designed.Based on the collected images,multiple important characteristics of red oranges are extracted for analysis and detection,and a grading model is established based on the results to achieve online detection and classification of red oranges.In this paper,by analyzing the status of machine vision technology in agricultural product classification testing,according to the requirements of red orange classification testing,we designed and built a red orange classification system.Through the analysis and selection of industrial cameras,lenses,light sources,etc.in the system,it can ensure that high-quality red orange images can be collected.Through the setting of camera parameters,image acquisition is achieved;during image preprocessing,the characteristics of the two models in the color space are analyzed to determine their applicability;the noise reduction effects of several commonly used filtering algorithms are compared,and the noise reduction effect is selected A good filtering method that maintains edge detail.During image segmentation,the static threshold and dynamic threshold segmentation effects are compared,and dynamic threshold segmentation is used to resolve subtle changes in the image caused by factors such as ambient lighting and shooting angles,and the red orange is segmented from the background.In the image edge extraction,through the comparison of multiple edge extraction algorithms,the Canny operator is selected to find the most complete edge of red orange.According to the found edges and regions,a circle fitting method based on least squares is used,and the diameter of the fruit is measured after calibration;the shape of the fruit is based on the roundness.After removing the fruitpedicle,the color average of the HSV component is compared,and the average hue is used as the index of red and orange color grading.After extracting the defects of brown spot disease,the defect area ratio is used as the judgment index,and then the characteristics of fruit diameter,fruit shape,color,and lesion defects are comprehensively graded using the judgment tree classification method.Finally,combined with Halcon machine vision algorithm library and C# to develop an interactive interface,the written software is used for red orange grading test,and the average accuracy rate of the test is 90.5%,which can meet the requirements of red orange grading. |