| Honeysuckle plays an important role in the pharmaceutical industry and has become an important component of many drugs.However,there are still some technical difficulties to be overcome in the industrialization of honeysuckle production,especially in the aspect of honeysuckle picking.At present,honeysuckle is picked manually and can not reach the level of automation and intelligence.To solve this problem,this paper realizes the recognition and location of honeysuckle through image processing algorithm and stereo matching technology.But when using Canny algorithm to segment honeysuckle image,the traditional Canny algorithm has some shortcomings.On this basis,the shortcomings of the algorithm are analyzed.An adaptive Gauss-median filtering method is proposed to replace the Gauss filtering,and Ostu double threshold is used to calculate the connection edge.The traditional Canny algorithm is improved and verified.The main contents of this paper are as follows:Firstly,this paper studied the image processing algorithm and positioning principle.The global threshold segmentation algorithm,Canny algorithm and K-means clustering algorithm were analyzed,and then the binocular vision mathematical model and stereo matching principle are described to provide a theoretical basis for honeysuckle positioning.Secondly,the system platform is built and the binocular camera is calibrated.The selection of camera and lens is determined according to the size of field angle,and the system platform is built according to the overall scheme.Then,using Zhang Zhengyou calibration method,the camera calibration program is compiled,the binocular camera is calibrated,and the internal and external parameters of the camera are obtained,which is fully prepared for the later stereo matching.Thirdly,the honeysuckle recognition method is studied,and it is recognized by using color space model and edge detection algorithm.Firstly,the collected honeysuckle image is preprocessed.On this basis,the honeysuckle segmentation algorithm is studied,focusing on the Canny algorithm.In view of the problems of insufficient noise removal,clutter and loss of image edge information in the traditional Canny algorithm,an adaptive Gauss-median filtering method is proposed to replace Gauss filtering,and the Ostu double threshold calculation method is used to improve it.The improved Canny algorithm is applied to honeysuckle image recognition.Through comparison,it is found that the recognition effect of the improved Canny edge detection algorithm is significantly better than that of the traditional Canny edge detection algorithm.Then,30 groups of honeysuckle pictures were collected under different conditions to verify the effectiveness of the algorithm.Through the analysis of the experimental results,it was found that the better recognition effect accounted for 86% at night,73% at dusk and 26.6% at noon,indicating that the improved Canny algorithm has good practicability under weak light conditions and poor application effect under strong light conditions.Then,based on the principle of binocular stereo vision,the ranging and positioning of honeysuckle is studied.Firstly,the limit correction of the honeysuckle image is carried out,and then the NCC stereo matching method is adopted.The honeysuckle image in the left camera is mainly used,and the matching search is carried out in the right camera to find the centroid coordinates of the honeysuckle in the two images,match,get the parallax and calculate the depth distance.Then carry out the experimental verification.Through the verification,the coordinates and coordinate errors are obtained,and the error analysis is carried out.Through the analysis,it can be seen that the causes of the error mainly come from the three aspects of camera calibration error,platform construction error and image acquisition error.Finally,using Halcon and C# language for joint programming,the man-machine interface is made,and the development of honeysuckle recognition and positioning system is realized. |