A method for identification and matching of the picking point for mature litchi under structural environment

Chen Xiong, Cao Xiaoman, Zou Xiangjun

Key Lab of Key Technology on Agricultural Machine and Equipment, South China Agricultural University, China

Received: July 26, 2017 | Published: September 11, 2017

Correspondence:
Zou Xiangjun, Key Lab of Key Technology on Agricultural Machine and Equipment,
College of Engineering, South China Agricultural University, Guangdong, China, Email
; ;

Citation:
Xiong C, Xiaoman C, Xiangjun Z. A method for identification and matching of the picking point for mature litchi under structural environment. J Appl Biotechnol Bioeng. 2017;3(6):465‒468. DOI:
10.15406/jabb.2017.03.00085

A method to identify the picking point of the whole mature litchi fruit and its matching method based on binocular stereo vision under the structural environment is proposed in this paper. The mature litchi clusters in the extracted image were segmented by using the improved K-means clustering algorithm. The region of interest (ROI) of the Litchi stems is set based on the characteristics of the center of the litchi fruit region and the minimum circumscribed rectangle. Corner extraction from the main fruit bearing branch of litchi was carried out by Harris algorithm. The customized function of circle distance is used to determine the optimal corner, and then cumulative probability Hough linear detection of the Litchi stems is used to determine the straight line of the picking point. Finally, the two-dimensional pixel coordinates of the picking point are determined. Then the three-dimensional coordinates of litchi picking points are obtained by SGBM stereo matching algorithm. The experimental results show that the matching success rate of picking points can reach 86.63%. It provides the foundation for litchi harvesting robot to pick litchi fruit successful.

In recent years, fruit and vegetable harvesting robots have become a research hotspot. Among them,^{1} South China Agricultural University of China on litchi harvesting robot done a lot of research and developed a litchi picking robot which mainly divided into visual systems and execution systems from the structural point of view.^{3,4} The visual system captures the scene in the real world through two industrial cameras just like the human eye, and then uses the developed software algorithm to identify the litchi fruit and its picking point. Finally, the three-dimensional coordinates of the point are calculated on the basis of the picking point in the matching left and right images.^{3,4} The execution system picks up the litchi fruit by controlling the end-effector after acquiring the three-dimensional coordinates of the picking point from the visual system.^{5} It can be seen that the identification of litchi fruit and the matching of picking points by binocular vision system are the primary steps to pick litchi fruit successful.

The shape of litchi is a string of fruit, therefore it cannot be directly stereo matched by using the centroid or edge characteristics of circular fruit.^{6,7} Based on the characteristics of the hue information of the litchi color image, the three-dimensional matching method based on the hue space is adopted to study the litchi picking point. Because the color information of the scene in the color image of litchi has the same characteristics, the method of stereo matching for the picking point of litchi was carried out by using the method of region stereo matching based on hue space. The method is not only computationally intensive, but also has good effect only on the calculation and matching research of picking point whose parent branch is regular and linear.^{8} A scheme of combined algorithms of Harris and improved SIFT to compute picking point of litchi and achieve its stereo matching was proposed. Corner extraction from the branch of litchi was carried out by Harris method.

The two-dimensional pixel coordinates of the picking point are calculated by combining with the centroid of litchi fruit area identified and the minimum circumscribed rectangle. Then, the computed picking point was described with a characteristic vector of SIFT, and its binocular stereo matching based on cosine distance similarity of SIFT was also proposed. In this paper, combined with K-means clustering algorithm, cumulative probability Hough linear detection, SGBM stereo matching algorithm and the usually used Harris algorithm which can quickly and effectively extract a large number of useful feature points in the region of rich texture,^{9-11} a method to calculate and match picking points of litchi is proposed to solve the calculation and stereo matching of picking points on the litchi whose parent branch have complex shape.

Results

Calculation of the picking points of litchi image

Identification of litchi fruit: After the S component of HSV color space is extracted, the S-component graph is segmented by improved K-means clustering algorithm which selects the gray value of the two highest peaks of the S component histogram to initialize the cluster centre in order to reduce the iteration times and time of the algorithm.^{12,13} After the segmentation is completed, the function of area threshold is used to remove the small area background, and the voids are filled to obtain the binary image of litchi fruit as shown in Figure 1A.

The solution of the external rectangle of litchi image: The maximum connected domain is extracted from the identified litchi fruit image. The litchi outline image area is set to 1 (white), the remaining area pixel value is set to 0 (black), (0 for the background, 1 for the litchi fruit target). In order to solve the coordinates of litchi centroid,^{14} according to the definition of image centroid, the coordinates of litchi centroid can be solved by the following formula:

Where
$(\text{x \xaf},\text{y \xaf})$
is the coordinates of Centroid (x, y) is the coordinates of the pixel,
$\text{f}\left(\text{x},\text{y}\right)$
is the pixel value of the image at the point (x, y).

The coordinates of litchi centroid are shown in Figure 1B. After obtaining the coordinates of centroid, the minimum circumscribed rectangle of the maximum connected domain is obtained, where the width of the rectangle is w and the height is h. In order to reduce the interference of the environment to locate the picking point,^{15} ROI of the branch was set according to the minimum circumscribed rectangle of the litchi centroid and the litchi profile where the width W of ROI was 0.4w and the height H was 0.3h. As shown in Figure 1C.

Figure 1 Obtaining the image of ROI.

The obtaining of calculation picking points: First, a function
${C}_{i}\left({x}_{i},{y}_{i}\right)$
named circle distance should be defined, where
${C}_{i}\left({x}_{i},{y}_{i}\right)$
is the number of all points that satisfy the condition
$\left\{\left(x\uff0c\text{y}\right)|\sqrt{{\left(x-{x}_{i}\right)}^{2}+{\left(y-{y}_{i}\right)}^{2}}\le R\right\}$
,
$\left({x}_{i},{y}_{i}\right)$
is the coordinates of each Harris corner detected,
$\left(\text{x,}y\right)$
is the pixel coordinate whose pixel value is not zero, R is the threshold radius should be set manually.^{8} Using the Harris algorithm, combined with the above function, the process of calculation picking point is proposed in this paper as follows: The Harris corners of the litchi branch were detected in the ROI of the branch of litchi, whose coordinates is
$\left({\text{x}}_{\text{i}},{\text{y}}_{\text{i}}\right)$
, the effect is shown in Figure 2A. According to the function definition to calculate the function value of each corners, and using the idea of the extreme value algorithm to obtain the maximum value of the function Ci whose coordinates is set to
$\left({\text{x}}_{\text{a}}{\text{,y}}_{\text{a}}\right)$
, the effect is shown in Figure 2B.^{16} Then, the litchi branch was detected by using cumulative probability Hough linear detection in the ROI only if the ordinate of the starting point and ending points of the straight line is less than ya, the effect of the test is shown in Figure 2C. And the maximum length of each straight line is obtained. The slope of the longest straight line is K. Finally,
$\left({\text{x}}_{\text{a}}{\text{,y}}_{\text{a}}\right)$
as a starting point, the slope of K for a straight line, the picking point is on the straight line. Binarization and Canny edge detection for the litchi branch to extraction the intersection point of the edge of the litchi branch and the line. The intersection point which the ordinate is the smallest is the picking point we need. The result of the picking point is shown in Figure 2D.

Figure 2 Extracting process of the picking point of litchi.

The stereo matching of picking points based on SGBM

The principle of SGBM algorithm: The core step of the SGBM algorithm is as follows: select matching primitives; construct the cost energy and function based on scan lines of multiple directions;^{17} obtain the optimal solution of energy cost and function. The basic process of the algorithm is:

Matching pixel-by-pixel. The function
$d({\text{x}}_{\text{i}},{\text{y}}_{\text{i}},{\text{I}}_{\text{L}},{\text{I}}_{\text{R}})$
defines the possibility of the two points that are the same.

Where xi and yi are the image points on the left and right scanning lines. The gray scale at the point x on the left scan line is defined as IL(x); IR is obtained by the sample point linear interpolation of the right scanning line.

Using one-dimensional constraint to approximate two-dimensional constraint. Eight paths are set at intervals of 45° near the P. Calculate the minimum cost path Lr (p, d) through the 8 paths in order to approximate the two-dimensional constraint matching calculation.

The calculation of parallax. The calculation of disparity is obtained by the way of iterations. First, using the random parallax image to correct the right image and then match to generate a new parallax image.^{18} It is also possible to use a hierarchical calculation method to calculate the parallax image as an initial value in the case of a half resolution and then using the parallax image obtained to calculate recursively.

Delete the mistaken matching. When the matching of the same name point of left and right image is completed, using the point in the right image to match the same name point in the left image. If the two pairs of parallax are different,^{19} they are considered invalid.

The stereo matching of picking points: SGBM stereo matching is essentially an improved dynamic programming method, which improves the accuracy of matching results while preserving the high efficiency of dynamic programming. The SGBM algorithm is insensitive to the influence of illumination and has the strong robustness to noise. In this paper, SGBM algorithm is used to solve the three-dimensional coordinates of litchi picking point，which makes a good foundation for Litchi harvesting robot to work in the field. The stereo matching step of picking point is as follows Figure 3.

Figure 3 The stereo matching step of picking point.

Experimental

The acquisition of matching images is based on a laboratory environment. The model of two cameras are the Chinese Microvision EM200C, the camera is installed and debugged as a relatively parallel state. Using Windows7+VS2013+OPENCV3.0 as the test platform.^{18,19} It is need to calibrate the left and right camera calibration before taking the picture in order to obtain the camera parameters and distortion parameters, and then stereo calibration should be done to get the rotation matrix and translation matrix between the two cameras. Finally, stereo rectify is to get a complete row alignment image and make stereo matching more simple and reliable. Figure 4A & 4B are imaging situation in the left and right camera of the same litchi string.

Figure 4 The image in left and right camera and the image of picking point.

Select Figure 4A to calculate the picking point. Calculate the minimum circumscribed rectangle of the litchi fruit region and draw an external rectangle, the effect is shown in Figure 1B. Harris algorithm was used to extract the corners of the litchi stems. A total of 79 corners were detected. The effect is shown in Figure 2A. Count the circle distance function value of each corner, and obtain the corner (which is a corner of Harris) with the largest value of the circle distance function is
${C}_{9}\left({x}_{9,}{y}_{9}\right)$
whose coordinates is (337, 146), the effect is shown in Figure 2B, using cumulative probability Hough linear detection to detect the litchi stems, finally obtain the two-dimensional pixel coordinates of litchi picking point (352, 119), the effect of the picking point in the original image is shown in Figure 4C. The calculation of picking points and SGBM stereo matching for the collected 76 images. The rate of matching is up to 86.63%, Which can meet the precision requirement of visual positioning of litchi harvesting robot.

Conclusion

This paper presents a method to Identify the litchi fruit based on K-means clustering algorithm, to detect the line based on cumulative probability Hough linear detection and to detect the corner based on Harris algorithm in the ROI of litchi stems, finally, the two-dimensional pixel coordinates of the picking point is obtained. Then using the SGBM stereo matching to match the picking point of litchi to obtain the three - dimensional coordinates of litchi picking point. The experiment result shows that the recognition success rate of litchi picking point was 86.63%.

Acknowledgements

This work was financially supported by the National Natural Science Foundation of China (No. 31571568), Supported by Science and Technology Planning Project of Guangdong Province.(No.2015A020209111), science and technology project of Huizhou city (No.2014B040008006).

Xiong Juntao. Study on vision position of litchi picking manipulator on complex on complex environment. Guangzhou, China: South China Agricultural University; 2012.

Luo Lufeng, Zou Xiangjun, Juntao Xiong, et al. Automatic positioning for picking point of grape picking robot in natural environment. Transactions of the Chinese Society of Agricultural Engineering. 2015;31(2):14–21.