| Machine vision is an indispensable part of automatic fruit and vegetable sorting system.The paper processes the image based on the vision system,obtaining the coordinate and angle information of the target and sends it to the robot to classify the fruit and vegetable.Based on the project requirements,the design of the system includes hardware,image acquisition,image analysis,classification,capture,communication,program running,to meet the accuracy and speed requirement.The hardware part use equipment including industrial camera,light source,lens,IO line,Kuka robot and other equipment.The software adopts image processing software of Halcon,Visual Studio2013 development platform and industrial camera of debugging software.The combination of software and hardware is one of the difficulties of the project to secondary development.The main contents of the paper include:(1)Analysis and type of selection,design scheme and calculation parameters of Hikvision industrial camera,lens and annular light source;(2)Theoretical analysis of image preprocessing;(3)Gaussian mixture model and multilayer perceptron model are used for grading operation of the target;(4)Analysis and calibration of internal and external parameters of the camera;(5)Calculation of robot’s compensation error and selection of communication protocol;(6)Design the industrial software interface,as well as the debugging and running of the program,and test the comparison of similar software.The algorithm of fruit and vegetable contour extraction was studied and a hierarchical model was established;The newly designed fruit and vegetable grading system has high stability,strong reliability,improved overall performance and accelerated sorting speed. |