| As a specialty fruit of our province,pear is also one of the main export fruits in China.The quality inspection of pears is an important part of the sales.In China,the quality inspection of pears is mainly done manually.This will lead to problems such as inefficient detection and inaccurate results,which cannot guarantee the quality of the sale of pear.Therefore,This paper designs a system for detecting the quality of pears based on image features and BP neural network.This system classifies the pears by four image features:size,shape,color,and surface defects.The main work of this paper:(1)Image preprocessing of the pear.In this paper,grayscale processing,median filtering denoising,frequency domain image enhancement,Ostu segmentation target segmentation,Canny edge detection and contour extraction are performed.(2)Extract the image feature.First,calculate the size of the pear by extracting the transverse diameter of the pear.Secondly,use the Fourier descriptor to describe the shape of the pear numerically.Then,calculate the mean value of each color channel in the HSI color model of the pear image to estimate the maturity of the pear.Finally,extraction the surface defects of pears by using region growth method and Canny edge detection,which determine the type and size of the defect based on the color of the defect area and the number of pixels(3)Study on the application of BP neural network in pear quality inspection system.Design a neural network model of 3-8-3 structure by optimizing BP neural network algorithm parameters.The network model implicit layer transfer function uses the Sigmoid function,and the transfer function between the hidden layer and the output layer is a linear function.Defects are not used as network input as a criterion for the evaluation of external products.So,The network input layer consists of the volume of the pear,the shape of the pear,and the color of the pear.The network output layer consists of three levels of pear.This article uses the Microsoft Visual Studio platform combined with the MATLAB neural network toolbox for the experiment.Compare the detection result after the neural network training with the artificial detection result,the matching rate reaches 90%.The experiment shows that system for detecting the quality of pears based on image features and BP neural network is effective,and the system has high practicability. |