Citrus surface defect is one of the important indicators to measure the quality of citrus.At present,China’s citrus surface defects detection mainly relies on manual,there are labor-intensive,low efficiency,subjective and other problems.The poor quality of citrus after detection seriously affects the sales price of citrus,restricts the high-quality development of citrus industry.Therefore,it is great significant to study on automatic detection technology of citrus surface defect.This paper takes citrus as the object and conducts a study on the detection methods of citrus surface defect based on image processing and machine learning technology under visible RGB imaging conditions.So that it can provide a basis for automatic detection technology of citrus surface defect.The main contents and conclusions are summarized as follows:(1)Image preprocessing and region of interest extraction research.The image acquisition device was built to collect the citrus sample images,and then the image pretreatment and background removal were carried out.Aiming at the problem that the uneven illumination of citrus surface affects the extraction of regions of interest,a brightness correction method based on improved Gamma algorithm and guided filtering was proposed to correct the brightness of citrus image.The experimental results showed that after brightness correction,the sound peel area of citrus in high brightness,while the area of interest in low brightness.And the global brightness segmentation threshold was set as 0.9,which could effectively segment the area of interest completely.(2)Defect and stem/calyx feature extraction and selection.The region of interest includes fruit defect and stem-calyx.It is necessary to construct the detection and classification model to extract the characteristic parameters of the region of interest.For this purpose,18 color moment feature parameters,4 gray scale coeval matrix texture feature parameters,2 shape feature parameters of eccentricity and circularity are extracted from the region of interest.The extracted feature parameters are objectively analyzed by Relief algorithm,and finally 14 feature parameters by feature weight that contribute to classifying fruit stem/calyx and defect are selected as feature variables for constructing the classification model of fruit stem/calyx and defect.(3)Defect and stem/calyx classification based on IAO-SVM model.In order to improve the classification accuracy of defect and fruit stem/calyx,the Improved Aquila Optimizer(IAO),which applies a backward learning mechanism with a nonlinear inertial weighting strategy,is proposed to improve the optimization performance.And Improved Aquila Optimizer was used to Support Vector Machine(SVM)for the optimizing of factor c and kernel parameter g of SVM.Setting the average classification accuracy of ten-fold cross-validation as the fitness function to construct a classification recognition model of fruit defect and stem/calyces.The classification test results showed that compared with the constructed BP,SVM,PSO-SVM and AO-SVM classification models,the IAO-SVM model had the best classification performance,and the classification accuracy,sensitivity and specificity are 95.83%and 93.33%and 98.33%,respectively,with an improvement of 2.5%-10%,1.66%-10%and 3.33%-11.66%for the three indicators.The IAOSVM classification model could effectively classify fruit defect and stem/calyx.(4)Experiments of citrus surface defect detection.a citrus surface defect detection method was constructed based on the image processing algorithm and classification model.Experiments of citrus surface defect detection based online sorting production line were carried out.Citrus images collected by the sorting line at the speed of three per second were used as experiments samples,and offline detection was performed.The results showed that the accuracy of citrus surface defect detection was 95.00%and the overall detection time for a single image are 0.158 seconds.The defect detection effect was satisfactory. |