| Safflower has high economic value and short picking cycle,so it is required that the safflower picker must harvest in time,which requires the mechanical arm to work efficiently and accurately.Among them,the spatial positioning of the safflower corolla is the basis for the accurate picking of the robotic arm.This study is to develop a visual system which can provide recognition and location of picking target for automatic picking robot.This paper takes the safflower under the background of the field as the research object,and on the basis of summarizing the relevant recognition and localization algorithms at home and abroad,two aspects of research are carried out.The first is to study the method that can accurately segment the safflower image;the second is to study how to use the visual technology to locate the safflower in the environment of the field.The main research work of this subject is as follows:(1)According to the growth environment of safflower,the scheme of safflower image and sample acquisition system was designed.A large number of safflower images with different angles and light backgrounds were collected under the background of the field,and their eigenvalues were analyzed in the RGB color space and the HSV color space respectively.(2)The applicability of the most commonly used image segmentation methods for safflower image segmentation were studied by comparison.The effects of Gaussian,mean,median and bilateral methods on safflower image denoising were compared and analyzed.The results show that bilateral filtering was more suitable for segmentation preprocessing of safflower images.Common threshold segmentation method,image segmentation method based on edge detection and clustering algorithm based on K-means were applied successively.The advantages and disadvantages of various algorithms were evaluated.The algorithm of image threshold segmentation was simple and the calculation time was short,but it was easy to have segmentation errors.However,the image segmentation method based on edge detection had a great difference in the effect of safflower edge extraction,and Prewitt and Sobel operators had the worst effect.Laplacian and Roberts operators were better;Canny operator worked best.However,no matter which operator extraction method,the contour was not closed.Moreover,the computation resources and speed of the algorithm were not ideal.The k-means clustering algorithm should give the number of safflower regions before segmentation,and the selection of this number has a lot to do with the actual situation.The applicability of this algorithm to the picking problem was not very strong.(3)A HSV preprocessing-color difference-fixed threshold segmentation method that can adapt to complex background changes and illumination changes was designed.This method converts the image in the RGB color space into the image in the HSV color space,uses the color features,and only retains the pixels that conform to the characteristics of the safflower.The grayscale image transformed by this model had a significant grayscale variation law;finally,the gray scale image was transformed into binary image by using fixed threshold method.A "dilated" morphological treatment was performed on the binary image.After processing,the segmented target contour area was closed and independent.After processing by the Sobel operator edge detection method,the edge curve of the target area was continuous and clear,which lays the foundation for obtaining the coordinates of the barycenter of the target contour area.The test results show that the HSV preprocessing-color difference-fixed threshold segmentation method has a great advantage in segmentation effect than the color difference-fixed threshold segmentation method,and the efficiency is higher.(4)The method of obtaining the coordinates of the center of gravity of the image under the condition of binocular vision was studied,and the calculation method of the depth coordinates was designed on this basis.Using this method,the location of the detected target safflower in the world coordinate system was realized.Finally,experiments were designed to verify the accuracy and rapidity of the algorithm.The test shows that the depth range is between 350 and 650 mm,and the picking accuracy in the X,Y,and Z directions is the highest,and the accuracy rate is higher than other ranges,which meets the picking requirements. |