Font Size: a A A

Application Of Machine Vision In Apple Defect Recognition And Color Classification

Posted on:2020-05-08Degree:MasterType:Thesis
Country:ChinaCandidate:Y H JiFull Text:PDF
GTID:2393330578467162Subject:Control engineering
Abstract/Summary:PDF Full Text Request
China's apple cultivation area is extensive,with large mass production and a wide variety.However,due to the fact that China's fruit production and processing enterprises generally use manual grading and mechanical grading,compared with foreign grading technology,the grading accuracy is low,and the quality of the same batch of apples is uneven,which makes China's apples trade in the international trade market with small volume and low price.The use of machine vision technology to automatically grade the quality of apples can effectively improve the classification accuracy and efficiency,not only to meet the needs of various consumer groups,bring good benefits to enterprises,but can also improve the export volume and export price of apples,increase foreign exchange earnings.This paper takes Red Fuji apples in Yantai as the research object,and studies the two characteristics of apple fruit defects and colors based on machine vision technology.The main research contents are as follows:(1)In the image preprocessing stage,this paper analyzes the characteristics and application of RGB and HSI color models.By adding white noise to the gray image,the denoising effect of several common filtering algorithms is compared and evaluated by using the signal-to-noise ratio PSNR,and the fast median filtering method with relatively good validity and real-time performance is selected.(2)In the image segmentation stage,Comparing the grayscale and gray histograms in the six component spaces of R,G,B,H,S,and I,it is found that the contrast between the background and the target is higher in the S component space and the gray histogram exhibits a standard double peak.It is most beneficial to use the global threshold method for image segmentation.By analyzing several typical global threshold segmentation methods,an adaptive threshold segmentation method,the largest inter-class variance method(Otsu method),is selected.For the noise region caused by the transmission chain in the background of the divided binary image,the method of deleting small area object in the morphological filtering is used to process,and a good denoising effect is obtained.(3)A method of fruit surface defect recognition based on Canny edge detection operator is proposed.The image of apple fruit obtained after image segmentation was detected by first-order Roberts operator,Sobel operator,second-order LoG operator and Canny operator.The edge extracted by Canny operator is the most complete.There are no false edges.In order to divide the defect area and obtain the percentage of the area of the defect area,the defect area is filled by the cavity filling method,and the opening operation in the morphology is introduced to remove the interference caused by the edge of the fruit.(4)Considering that the appearance quality of the apple is not only high in coloring rate,but usually the color distribution is relatively uniform.Therefore,when extracting color features,not only the Hue component but also the mean and variance of the R,G,and B components that reflect the color distribution are selected as the feature parameters.Because the number of characteristic parameters is more unfavorable for grading,a color feature parameter optimization method based on Fisher coefficient and K-means is proposed.By calculating the Fisher coefficient of each characteristic parameter,the global optimization of classless and the local optimization of classification(classification of coloring rate and color distribution)are carried out according to its size,and the two optimization methods are evaluated by K-means algorithm.The class results show that the global optimization works better.Then,the PSO algorithm optimized support vector machine is used to automatically divide the color grade of Apple,and the number of feature parameters retained in the global optimization mode is tested one by one.When the seven feature quantities with higher Fisher coefficient are retained,the grading is performed.The correct rate is the highest,reaching 92%.Finally,the GUI products for hierarchical operation,display model parameters and classification results were designed with Matlab software.
Keywords/Search Tags:machine vision, apple defect recognition, color grading, edge detection, feature parameter optimization
PDF Full Text Request
Related items