| China has become the world’s largest apple producing country,with apple planting area and yield accounting for over 50% of the world’s total.As of 2021,the apple planting area in China is 31.328 million acres,and the yield has reached 45 million tons.But currently,apple picking is mainly done manually,and the labor intensity during the picking period is high.With the transfer of agricultural labor to other industries,agricultural development faces the risk of severe population aging and labor shortage,and the cost of hiring agricultural workers is gradually increasing.It is urgent to widely introduce the automation technology of artificial intelligence into fruit picking,and picking robots will become the best alternative.The visual system,as the core part of the picking robot,has a crucial impact on whether the robot can smoothly pick fruits,and plays an important role in improving the recognition and positioning performance of target fruits.It is a key technology to improve the efficiency of the picking robot’s operation.Therefore,the research on visual detection algorithms for apple picking robots has important theoretical significance and practical application value.However,in the natural environment,the growth mode of apples is random and susceptible to changes in light intensity,branch and leaf occlusion,posing greater challenges to accurate recognition of target fruits.Therefore,this article takes apple targets in the natural environment as the research object,with the aim of improving the accuracy and speed of fruit recognition.It conducts research on apple target recognition problems under different lighting conditions,overlapping occlusion,and color differences.The main tasks completed include:(1)Theory related to image dataset acquisition and fruit recognition algorithms.By simulating the robot’s "eyes" with a handheld camera,the apple target was photographed from multiple angles,and a total of 1043 images were collected,including apple images affected by lighting changes,overlapping and branch occlusion,and color differences.The apple dataset was completed.Build a Python 3.7.8 development environment and use Visual Studio Code1.52.1 software to configure the Open CV library for algorithm compilation.Compare the segmentation performance of different color space color difference methods,Otsu method,K-means clustering algorithm,watershed algorithm,as well as the circular fitting effect of Hough transform,minimum circumscribed circle,and three-point circle determination method.(2)A method for apple recognition based on two-stage segmentation and region labeling gradient Hough circle transformation is proposed for apple targets affected by different lighting conditions.An adaptive brightness correction algorithm is used to correct the apple image with uneven surface brightness distribution to compensate for the missing details due to the influence of light.Extract the Cr component of the YCb Cr color space as a preprocessing sample,and use the improved Otsu algorithm for initial segmentation.This algorithm removes a large amount of background noise by introducing morphological open closed reconstruction filtering;By reducing the grayscale traversal range,the algorithm segmentation rate is improved.The watershed transform algorithm based on distance transformation is used for secondary segmentation,and the resulting watershed ridges will be used to construct the apple target contour.A minimum bounding rectangle box is set outside the contour to mark the area where the apple is located,and a gradient Hough circle transformation is carried out in the marked area to realize automatic recognition of apple targets.The recognition accuracy of this method in both forward and backward light is 90.75% and 89.79%,which is 15.03% and16.41% higher than the traditional Hough method.The average recognition time is 0.665 and 0.693 s,which is 0.664 and 0.643 s shorter than the traditional method.(3)A method for apple recognition and localization based on labeled watershed algorithm and curvature constrained three-point rounding method is proposed for fruits that overlap and are obstructed by branches and leaves in the natural environment.Bilateral filter with good edge preserving performance are used to smooth the image,suppress image noise,and protect important boundaries in the image to the greatest extent.Extract R-G color difference components based on apple color features for morphological open close reconstruction.Mark the generated regional maximum values inside the apple,and on this basis,perform distance transform watershed transform on the internal markers.The formed watershed ridges serve as external background markers.Combining internal and external markers,the original gradient amplitude image is modified using the forced minimum technique.The watershed algorithm is used to segment the modified gradient image and extract the contours of overlapping apple regions.Calculate the curvature of the apple contour,set the curvature value variation interval,remove abnormal contour segments,and perform segmented three-point rounding on the normal contour segments to reconstruct the complete contour of the apple target and complete the apple target localization.The average positioning overlap of this algorithm is 90.66%,which is 7.76%higher than the Hough transform algorithm,with an average positioning error of 6.25%,a decrease of 10.85% compared to the Hough transform algorithm,an average false negative rate and false positive rate of 9.34% and 0.85%,and a decrease of 7.76% and0.02% compared to the Hough transform algorithm.(4)A fruit target recognition algorithm based on image fusion and improved gradient field Hough transform is proposed for fruit targets with color differences caused by external conditions such as lighting.Using mean shift filtering to preprocess the image and remove a small portion of background noise.Extract normalized R-G and I components from RGB color space and YIQ color space respectively for pixel level image fusion,highlighting the fruit target area.In order to accurately identify and locate mature apple targets in the image,an improved Hough transform based on gradient field is proposed.This algorithm does not require subsequent processing on the basis of edge detection,and overcomes the shortcomings of the classical Hough transform,which requires a large amount of computation and occupies a large amount of memory,and the algorithm is time-consuming.The algorithm mainly improves the shape of fruit targets by first performing morphological processing on the fused images,Then a false circle elimination algorithm is constructed based on the apple binary image as the judgment standard to improve the detection accuracy of the fruit target and enhance the robustness of the algorithm.The recognition algorithm has a recognition accuracy of 100% for completely exposed red mature fruits,with 92.46% for fruit occlusion areas less than 1/2,and 81.87% for fruit occlusion areas greater than 1/2.The overall recognition accuracy is11.43% higher than the minimum circumscribed circle algorithm,with an average relative error of 0.215% for the center of the circle and 0.047% for the radius.It is0.279% and 0.322% lower than the minimum circumscribed circle algorithm,respectively. |