Abstract:Abstract: The completely fruit surface image information is an important factor which will directly influence the detection results of fruit's surface color and defect. This paper took the common red delicious apple as the research object. An image feature extraction and matching method based on SIFT algorithm was proposed, and the multi-view fruit image were stitched effectively in this paper. The algorithm was helpful to obtain the completely fruit surface image information. Firstly, the fruits were rotated at fixed interval 15° angle and the multi-view of fruit continuous images was achieved. Based on the analysis of fruit image color space, the fruits target and the background were divided by 2 R-G-B channels for removing image noise. The target image was proposed by gray histogram equalization; hence the image's contrast was enhanced. The pre-paired image had special information which could be used for extracting feature points. After comparing with speeded-up robust features (SURF) and scale invariant feature transform (SIFT) algorithm, image feature points were detected between two images using SIFT algorithm. The average number of characteristic vector with 128 dimensions for each image was 2500. Because of large quantity and high dimensions of characteristic vector, significant amount of time was consumed when using the traditional K-D tree algorithm in searching matching points. To reduce the matching point of the existing area, a complete fruit image was divided into 16 regions, and four regions in the middle area with the most easily matching area for feature points were selected by multiple tests. A series of images collected by CCD camera only had lateral deviation between pre and post image. The searching scope of matching point was controlled in a narrow space between ±10 pixels through epipolar geometric constraint algorithm. Therefore, the mismatching rate was reduced and the images matching precision was improved. Finally, the mismatching points were rejected using the improved random sample consensus (RANSAC) algorithm, and it also could be further improved for matching precision. The initial translation matrix was obtained through rough matching points. The euclidean distance between pre and post image matching points selected randomly by using RANSAC was calculated. It was helpful to distinguish the interior point and exterior point. The final precisely matching points for each image were obtained based on presupposition threshold condition and point number condition. Calculating the center coordinates of the final match points for each image, the image of around the center coordinates for pre and post treated were reserved, and the translation matrix was generated at the same time. According to the translation matrix, the complete fruit surface image stitching was realized though stitching the images characteristics of pre and post. The experimental results indicated that the matching algorithm could dramatically reduce the mismatching rate and improved the average matching precision by 35.0%, the average matching time decreased from 7.8 s to 2.5 s, and the reduction rate was 67.8% compared with traditional K-D tree algorithm, and the reduction rate of matching results was 93.9%. This algorithm was also effective for the arbitrary pose fruit image on the test bench. This algorithm had good real-time performance, and it was invariance to scale, rotation, and affine transform, and it was effective for the randomly pose of spherical fruit images matching. This study provides an important reference for the quality detection and grade division of agricultural products base on machine vision.