Automatic Detection and Classification of Foreign Bodies of Dumplings Based on X-ray
-
Graphical Abstract
-
Abstract
In view of the fact that foreign bodies in boxed dumplings seriously endanger consumers’physical and mental health and that traditional metal detectors can only detect metals and the results cannot be visualized directly,X-ray imaging technology and image processing technology were used to automatically detect five kinds of foreign bodies in boxed dumplings,including steel balls,thin wires,screws,stones and glass.Firstly,we extracted LBP,HOG and Gabor texture features to construct feature vectors,and used Support Vector Machine to recognize foreign bodies in dumpling images.In the image segmentation stage,a threshold segmentation algorithm combining the maximum entropy algorithm of additional offset with the particle swarm optimization algorithm of linear decreasing weight was proposed.The algorithm added an offset function to the entropy of the image target area and took the total entropy of the image as the fitness function of particle swarm optimization algorithm to obtain the optimal threshold of image,and realized the image segmentation of foreign body dumplings.In the foreign body classification stage,the roundness,aspect ratio,eccentricity of the foreign objects in the binary image of the dumplings,and the gray mean,variance,entropy,third moment,the seven invariant moments,the LBP features of the minimum circumscribed rectangular area of the foreign bodies in the gray image were extracted to construct feature vectors.Then we used the BP neural network,Support Vector Machine,K-neighboring,AdaBoost and Naive-bayes classifier to classify five kinds of foreign bodies.The experimental results show that the recognition rate of the image recognition method for foreign body dumplings is 99.52%.Compared with segmentation algorithms of Otsu,K-means,the maximum entropy based genetic algorithm(KSW-GA),and genetic neural network(GA-BP)based,the segmentation result of proposed algorithm is more accurate.The classification results of BP neural network are superior to those classifiers,and the overall recognition rate is 98.90%.This study provides a new idea for on-line automatic detection of foreign bodies in food,and has important practical significance for ensuring food safety.
-
-