Winter jujube is sweet,crispy and rich in vitamins,which is one of the best-selling fruits in the autumn and winter fruit market.As consumers pay more attention to fruit quality,in order to improve the competitiveness of winter jujube in the fruit market,fruit growers increased the key indicators of grading winter jujube to four,namely fruit surface defect,fruit diameter,fruit shape index and fruit surface coloring ratio.The stricter grading work of winter jujube has exposed the problems that the fruit growers are inefficient in grading,easily affected by objective factors,and the labor cost is too large.At the same time,it also exposed the problems that the winter jujube grading machine is easy to damage the surface of winter jujube and the indicator of grading is insufficient.In view of the current problems in grading winter jujube,this thesis designs a set of intelligent winter jujube detecting and grading system based on machine vision,introducing machine vision into the detecting and grading task of winter jujube,determining the development idea of the algorithm of detecting and grading winter jujube according to the four indicators of grading winter jujube,establishing the model for detecting winter jujube with surface defects through a deep learning model,developing the extraction algorithm of three grading indicators of fruit diameter,fruit shape index and fruit surface coloring ratio through image processing algorithm,eliminating the winter jujube with surface defects through the air suction robot arm,realizing the intelligent interaction between fruit growers and the system through the human-computer interaction platform,and finally achieving the purpose of intelligently detecting and grading winter jujube.The main work of this thesis:(1)Design of intelligent winter jujube detecting and grading system based on machine vision.Firstly,analyze the sore points of manual grading and winter jujube grading machine,such as inefficiency and unreasonable grading,so as to determine the grading requirements and use this to design the overall scheme of the intelligent winter jujube detecting and grading system.And then the scheme of the winter jujube carrier equipment,the winter jujube image acquisition equipment,the eliminating device of winter jujube with surface defect,and the real-time detecting algorithm of winter jujube with surface defect,the grading algorithm of winter jujube and the human-computer interaction platform in the intelligent winter jujube detecting and grading platform are designed respectively.Finally,choose the software environment of the system.(2)Construction of real-time detecting model for winter jujube with surface defects based on improved SSD.The research objects of this thesis are three kinds of winter jujube with surface defects and surface normal winter jujube from Shaanxi Dali.Firstly,in order to realize the real-time detection of winter jujube with surface defects,this thesis chooses SSD as detecting model,and replaces the backbone of SSD with MobilenetV3 which has less computation,and establishes the MobileNetV3-SSD to lay the foundation for real-time detection.Secondly,the ratio of defect to surface area was analyzed,and it found that the scales of the three defects were different.Therefore,RFB was introduced to realize the ability of the model to extract the features of winter jujube with surface defects at multiple sacles,and in order to reduce the influence of introducing this module to the real-time model,the convolution structure of RFB was improved;finally,the distribution of defects is analyzed,and it found that the positions of three kinds of defects are random.Therefore,the spatial attention module(SAM)in CBAM is replaced by the squeeze excitation block(SE)to enhance the ability of the model to locate the defect features of winter jujube.(3)Research and development of image grading algorithm for winter jujube.Firstly,the overall process design of the algorithm is carried out according to the extraction order of three grading indexes,namely fruit diameter,fruit shape index and fruit surface coloring ratio.Then three grading index extraction algorithms are designed:extracting the image of winter jujube by ROI;extracting the contour of winter jujube by weighted average grayscale and image segmentation algorithm of winter jujube;extracting the fruit diameter feature of winter jujube by the minimum circumscribed circle;the fruit shape index of winter jujube is extracted from the ratio of the circumference to the perimeter;the coloring ratio of the fruit surface of winter jujube is extracted by analyzing the corresponding pixel value range of ochre red on the fruit surface of winter jujube under the H-channel of HSV;the grading algorithm of winter jujube is designed through the judgment tree to realize the grading of winter jujube.Finally,the calculation and conversion algorithm of the center coordinates of the winter jujube with surface defects is developed,so that the air suction robotic arm can complete the winter jujube with surface defects eliminating work according to the world coordinates.(4)Development of winter jujube with fruit defects eliminating algorithm based on cooperation of double air suction robot arm.Firstly,the real-time center coordinate updating algorithm of winter jujube with fruit defects is designed,in order to provide the location information of defect winter jujube for the eliminating algorithm.Secondly,the D-H method is used to complete the modeling of the air suction robot arm,and solve its forward and inverse kinematics.Then complete the cooperatively eliminating algorithm according to the assigned area of elimination.Finally,a quintic polynomial is used to complete the path planning algorithm for eliminating defect winter jujube.(5)Design of interactive interface of platform and test the intelligent winter jujube detecting and grading system.First,through the PyQt5 design interface of platform:create a sub-interface of real-time detecting winter jujube with surface defects for fruit growers to monitor the each winter jujube with surface defect in the current batch at any time;create a sub-interface for query of winter jujube quality database for fruit grower to query the grade of winter jujube in each batch.Finally,the performance tests of the real-time detecting model for winter jujube with surface defects,the grading algorithm for winter jujube image and the winter jujube with fruit defects eliminating algorithm are carried out in turn.The test results show that the real-time detecting model for winter jujube with surface defects based on improved SSD can achieve a mean average precision(mAP)of 91.89%and a detecting speed of 40.85FPS.And the accuracy of grading algorithm for winter jujube and the accuracy of double air suction robot arms to eliminate winter jujube with surface defects are 97.11%and 98.00%respectively. |