Font Size: a A A

Research On Apple Surface Defect Based On Image Processing

Posted on:2021-06-12Degree:MasterType:Thesis
Country:ChinaCandidate:Y M WangFull Text:PDF
GTID:2481306476952549Subject:Control theory and control engineering
Abstract/Summary:PDF Full Text Request
Apple,as the fruit with the highest production volume in China,is welcomed by consumers.However,the sorting process of defective fruit after apple picking requires a lot of manpower,resulting in low efficiency and poor accuracy of apple classification.Therefore,the automatic detection technology of apple's surface defects is of great significance to liberate the labor force and improve the competitiveness of apple in China.In this paper,Red Apple is the research object and image processing technology is used to detect its surface defects.The main work is summarized as follows:(1)Image collection and preprocessing.Image acquisition is the first step to realize the automatic detection technology.The image acquisition system in this paper includes sealed carton,white background paper,symmetrical white LED lights,color camera and computer.The RGB images collected need to be preprocessed for filtering and graying.Image filtering helps to reduce image noise.In this paper,the filtering effects of mean filter and median filter are compared.The experimental results show that the median filter is better.In order to reduce the calculation dimension in the subsequent processing,the image needs to be gray-scaled.Four methods of image graying are introduced,namely the component method,the maximum value method,the average method and the weighted average method.Finally,the component method is used to grayscale the apple image.(2)Defect extraction.The defect extraction result is an important basis for judging whether the apple image is defective or not.The defect extraction process includes background separation,brightness correction and threshold segmentation.In order to eliminate background interference,Apple images need to be separated from the background.In this paper,the B component map is used in combination with threshold segmentation and hole filling technology to obtain the background separation template.Multiply the apple gray image to complete the background separation.The Lambertian reflection phenomenon and the possible strong reflection phenomenon in the apple images are not conducive to defect extractions.Therefore,a brightness correction algorithm is used to eliminate the reflection effect and correct the apple images circle by circle,and then the open operation is used to eliminate the long fruit stems to optimize the brightness correction effect.Finally,the histogram threshold segmentation method is used to extract the defect candidate areas,the extraction accuracy rate reaches 100%.(3)Feature extraction.Defect candidate areas include real defects and calyx fruit pedicels.In order to correctly distinguish various types of defects and calyx fruit pedicels,the defect candidate areas need to be classified,and feature extraction is the basis for completing the classification.A total of 10 feature parameters are extracted in the defect candidate areas,including 6 color feature parameters(average of R,G,B,H,S,V)and 4 texture feature parameters(energy,moment of inertia,correlation,uniformity property),the extraction methods include the full-point method and the point-selection method.(4)Apple image classification.In this paper,apples in images are divided into three categories: normal fruit,defective fruit,and other defective fruit.Support Vector Machine is used to complete the classification.In the linear kernel function,polynomial kernel function,Gaussian kernel function and Sigmoid kernel function,the Support Vector Machine with Gaussian kernel function has the best classification effect,the classification accuracy rate reaches 94.3%.In order to shorten the classification time,the point-selection method is used to extract feature parameters and optimize the classification algorithm according to the number of defect candidate areas.The final classification speed reaches 2 every second,and the classification accuracy rate reaches 95.1%.
Keywords/Search Tags:defect extraction, defect classification, brightness correction, fruit stem elimination, feature extraction, Support Vector Machine
PDF Full Text Request
Related items