In recent years,with the steady development of the country and the improvement of social science and technology level,the quality requirements of fruits and vegetables are also getting higher and higher.To this end,this paper proposes an intelligent picking robot to solve the demand of labor force for fruit and vegetable planting enterprises,reduce production costs,and use the cost for enterprise development,contributing to the development of society.Among them,the vision system is the key to the realization of commercialization of intelligent fruit picking robots,which requires high accuracy,stability and detection speed of the captured images.Therefore,it is of great significance and economic value to study the intelligent picking robot.Apple is taken as the research object to carry out the experiments of fruit detection and recognition and binocular vision positioning.The experimental scheme of this research is as follows:Based on the YOLOv5 target detection algorithm,in view of the fruit images under the conditions of branches and leaves occlusion,fruit overlap and light influence caused by the environment,the offline data enhancement method which combines Mosaic9 data enhancement and data oversampling method is used to increase the number of small and medium-sized images taken to improve the detection rate of small targets.Then,CA module of coordinate attention mechanism was introduced to improve the attention of fruit samples to improve the image detection accuracy of the model.Then focus loss function was used as classification loss to solve the problem of deviation caused by negative samples in training,and EIo U loss function was introduced to improve the convergence speed of the model and improve the regression stability.Take a picture of the fruit target with a binocular camera,and then obtain the threedimensional parameters of the camera’s position through Zhang Youzheng’s calibration method.Then use the Matlab calibration box to calibrate the image.Use the local stereo matching algorithm to stereo correct the image,and obtain the three-dimensional coordinates of the target fruit’s centroid.Then convert it into physical coordinates to realize the positioning function.After the actual measurement and comparison,obtain the positioning result with an error of ± 15 mm,it can be used for actual positioning operation.The binocular vision based on fruit recognition and location method provided in this study obtained the recall rate R reached 91.25%,the average accuracy reached91.03%,the F1 value reached 91.83%,with the improved YOLOv5 under the above influence conditions.It can lay a foundation for the design of vision system of fruit picking robot. |