Sugarcane stem nodes based on the maximum value points of the vertical projection function.

: In order to solve the problem that the stem nodes are difficult to identify in the process of sugarcane seed automatic cutting, a method of identifying the stem nodes of sugarcane based on the extreme points of vertical projection function is proposed in this paper. Firstly, in order to reduce the influence of light on image processing, the RGB color image is converted to HSI color image, and the S component image of the HSI color space is extracted as a research object. Then, the S component image is binarized by the Otsu method, the hole of the binary image is filled by morphology closing algorithm, and the sugarcane and the background are initially separated by the horizontal projection map of the binary image. Finally, the position of sugarcane stem is preliminarily determined by continuously taking the derivative of the vertical projection function of the binary image, and the sum of the local pixel value of the suspicious pixel column is compared to further determine the sugarcane stem node. The experimental results showed that the recognition rate of single stem node is 100%, and the standard deviation is less than 1.1 mm. The accuracy of simultaneous identification of double stem nodes is 98%, and the standard deviation is less than 1.7 mm. The accuracy of simultaneous identification of the three stem nodes is 95%, and the standard deviation is less than 2.2 mm. Compared with the other methods introduced in this paper, the proposed method has higher recognition and accuracy.


INTRODUCTION
In recent years, with the development of a series of high-tech technologies such as modern information technology, biotechnology, and engineering technology, precision agriculture has rapidly developed and popularized. Applying computer technology to agricultural production, increasing crop yield and quality, and reducing costs are the main goals of precision agriculture (CHLINGARYAN et al., 2018;LEE et al., 2010). As an important research content of precision agriculture, machine vision can use the exclusive characteristics of the target object to achieve the functions of classification and navigation. In agriculture, it is mainly reflected in the identification and navigation of orchard, farmland irregular roads, and extraction of fruits and crop rows (BARBOSA et al., 2016;GARCíA-SANTILLáN et al., 2018;JI et al., 2011;JIANG et al., 2015;MONTALVO et al., 2012;RADCLIFFE et al., 2018;SONG et al., 2017;SURIYAKOON et al., 2017;ZHANG et al., 2018;LEI et al., 2019). Different methods are applied in different plant scenes to extract the target, and to achieve the effect of human eye recognition, so as to achieve the intelligent work of agricultural machinery.
Sugarcane is not only the main raw material for sugar production, but also the main source of income for farmers in sugarcane areas. As sugar cane cultivation has not been mechanized and automated, it takes a lot of manpower and time, which seriously affects the development of sugar cane industry. Therefore, the computer is applied to sugarcane cultivation, to achieve mechanization and intelligence, which is the development trend of the world sugarcane industry. Accurate identification of stem nodes is a difficult problem in the automatic cutting process of sugarcane seeds, and the application of machine vision to the identification of sugar cane stem is a good solution. Many scholars have done a lot of research in applying machine vision to the identification and positioning of sugarcane stem nodes. SHI et al. (2018) proposed a new method based on dual-density dual-tree complex wavelet and image straight line detection technology was proposed to complete the stem nodes identification, and good results were achieved. HUANG et al. (2013) got a binary image through traditional edge detection operation, and finally used Radon transformation to identify the edge line of the node. WEI-ZHENG et al. (2017), in view of the problem of similar color in stem node and interstem of sugarcane, proposed a stem section recognition method based on hyperspectral imaging technology, which can effectively identify and locate sugarcane stem nodes. MOSHASHAI et al. (2008) made a preliminary study on the identification of sugarcane stem nodes by using the method of grayscale image threshold segmentation. POTHULA et al. (2015) proposed a profile based algorithm using binary images, with an recognition rate of up to 99%.
Under certain conditions, the above methods could successfully recognize the sugarcane stem nodes, but there are some problems such as low recognition efficiency, difficult algorithm and long time-consuming. For the above problems, a new method of sugarcane identification is proposed in this paper. Firstly, in order to reduce the influence of light on image processing, the RGB color image is converted to HSI color image, and the S component image of the HSI color space is extracted as the research object and use the Otsu method to binarize the S component image. Then, the sugar cane and background are initially separated by the horizontal projection graph of binary image, which reduces the interference of the background to some extent and reduces the amount of image calculation. Finally, the position of sugarcane stem is preliminarily determined by continuously taking the derivative of the vertical projection function of the binary image, and the sum of the local pixel value of the suspicious pixel column is compared to further determine the sugarcane stem node.

Image acquisition
The main research object of this paper is black-skinned sugarcane produced in Guangxi. The experiments were carried out outdoors, so the images were acquired under natural light. The images were collected in June 2019, with an image size of 640×480. The image acquisition device uses an industrial camera (MER-132-43U3C-L of Daheng Image) with a model M1224-MPW2 lens. table 1 is the main parameters of the camera used in the experiment. Figure 1 is a physical picture of the camera and lens. Figure 2 is the experimental platform of this paper. The experimental platform mainly includes an operation control panel, a sugarcane conveying mechanism, a control system of the sugarcane delivery mechanism, image acquisition system, and an upper computer detection system. Sugarcane conveying mechanism is mainly composed of stepper motors, pulleys, belts, rack, V-grooves. Figure 3 displays the graphical user interface of the image processing system that was developed based on Labview2018 and Matlab2019a.

Color space conversion
In the identification process of sugarcane stem nodes, uneven illumination will affect the identification of stem nodes. Therefore, this paper converts the RGB image transmitted by the camera into a HSI image, and extracts the S component image as the research object, so as to ensure the color information and reduce the impact of uneven illumination. RGB image is converted to HSI image by formula (1) (2) (3). (1) Where R is the red component of the color image, G is the green component of the color image, B is the blue component of the color image.

Binarization and morphological processing
The S component image is processed by Otsu with the best global threshold. Because there are root bands, seed buds and leaf marks near the stem node. These interferences showed some holes in the binary image, which will affect the vertical projection function, and then affect the recognition rate of the sugarcane stem node. In this paper, morphological closed operation is used to fill holes, morphological closed operation can not only smooth the contours of the image, but also break the narrow discontinuities, eliminate the smaller holes (GONZALEZ et al., 2007), The formula is (4).
(4) 1. Firstly, image A is expanded by using structural element g, such as formula (5).

Interception of target area
In order to improve the accuracy of stem node identification, a white board is installed on the opposite side of the camera holder of the experimental platform, which is used as a background for shooting sugarcane images. Because sugarcane occupies only a part of the area in the photographed image, if the binary image of the whole S component image is taken as the research object, which will cause the image processing volume to be large, time-consuming, and possibly because the processing of background debris is not timely, thus affecting the extraction accuracy. In order to improve the processing speed and robustness of the algorithm, a horizontal projection histogram of binary image is used to intercept the sugarcane region. Pixel vertical projection method is a simple statistical method, which can achieve the extraction of targets. Horizontal projection formula is shown in (7).
Where (x, y) f is the value of the binary image point(x,y), K is image width, H is image height.

Recognition of sugarcane stem node
This paper mainly combines the maximum points of vertical projection function of binary image and local pixels sum to determine the position of sugarcane stem node. The morphological closed operation is used to process the binary image, so that the extreme points of the vertical projection function are less, thus reducing the position of the suspicious stem node and reducing the traversal time of the algorithm.
According to the S component map of the HSI color space, we can see that the position of stem node is brighter than other parts, so the gray  Ciência Rural, v.50, n.12, 2020. 5 value of stem node is larger than other parts. Based on this feature, a method based on the extreme points of vertical projection function of binary image is proposed to determine the position of stem nodes in this paper.
According to the feature of the stem node, it can be seen that the sugarcane stem node is more prominent than that of the inter-stem, and there is obvious transition of color between the stem node and the inter-stem, so the vertical projection value of the stem node is larger than other places. The specific representation is that the position of the stem node is located at the maximum value point of the vertical projection function of the binary image, but the color change in the inter-stem region of sugarcane is more complex, and there are scratches, wax powder and other interference, even if the binary image is processed by morphology, vertical projection map still has a lot of maximum points, which makes it difficult to extract sugarcane stem node. In this paper, taking the derivative of the vertical projection function of binary image to get the maximum points, and using the maximum points to build a new function, next taking the derivative again to find the maximum point. This circulation is repeated many times, and combined with the local pixel values sum methods proposed in this paper, the maximum value points at the stem node can be screen out. The flow chart of the sugarcane stem node extraction algorithm is shown in figure 4. The formula of vertical projection method is shown in (8). The local pixel summation formula is shown in (9).
(8) Where f (x,y) is the value of the binary image point (x,y), H is image width, K is image height.

(9)
Where h is image height.

RESULTS AND DISCUSSION
Sugarcane seedlings have single-bud, double-bud and multi-bud seedlings. In order to verify the feasibility of the method proposed in this paper, using single-stem node recognition, double-stem node recognition and three-stem node recognition to verify the algorithm. In this paper, the recognition process of three stem nodes is described in detail.
In this paper, different numbers of stem node image are obtained by adjusting the distance between the camera and the sugarcane entity. The distance is adjusted by the camera holder of the experimental platform. The actual length of sugarcane with triple stem nodes is 225 mm. The error is determined by comparing the position of sugar cane stem node pixel determined by this paper method with the position of sugar cane stem node pixel manually measured.

Three stem nodes recognition
The process and results of three stem nodes recognition are shown in figure 5. Table 2 shows the coordinates of maximum points of functions shown in figure 5h. Table 3 shows the coordinates of maximum points of functions shown in figure 5i. Table 4 shows the maximum point coordinates of the function shown in figure 5j.
The maximum and boundary points in   the maximum point 116 in Table 2 is:304. The pixel column corresponding to the boundary point 113 in table 2 is: 616. Using formula (9) to calculate the pixel value sum of 10 pixel column on two sides of each corresponding column above, whose results are shown in table 5. By comparing tables 2, 3 and 4, we can see that there are many maximum points of the binary image vertical projection function, so it is impossible to directly find the location of the stem node. Using the method proposed in this paper, the useless maximum points are filtered out, only the suspicious points of stem nodes shown in table 5 are left. By calculating the summation of the local pixel values(S) of suspicious points and comparing the size of S, the location of stem nodes is determined, and the final results are shown in Figure 5l.
The stem node area can be further subdivided into three parts, namely the root band edge, the root band, and the leaf scar peak. Figure 6 is a detailed view of the three locations of a typical node. As long as the detected position is within the three areas, it shows that the detection effect is good. In figure 51, the red line represents the position of the stem node determined by the error point in table 5, the light blue lines represent the position of the stem node determined by the red marked point in table 5. The light blue lines are well distributed in the cane node, which indicates that the algorithm proposed in this paper can well identify the position of sugarcane stem nodes.  SHI et al., 2018, MOSHASHAI et al., 2008, HUANG et al., 2013, POTHULA ET al., 2015 proposed several node recognition algorithms based on machine vision.

Methods contrastive analysis
The method comparison results are shown in table 6. It can be seen from table 6 that when the number of identified stem nodes is one, the success rate of the method proposed in this paper to identify stem nodes x 12  2208  57  2330  304  2321  323  2273  339  2221  399  2252  468  2222  26  2269  146  2159  310  2378  330  2237  397  2252  404  2252  606  2325 is 100%, which is better than the method mentioned in the literature (LU et al., 2010, MOSHASHAI et al., 2008, HUANG et al., 2013, POTHULA et al., 2015. In terms of time consumption, the method proposed in this paper takes the longest time of 0.3 s, which is less than the method used in literature (LU et al., 2010, MOSHASHAI et al., 2008, HUANG et al., 2013. The maximum average absolute error of the algorithm proposed in this paper is 1.197 mm and the maximum standard error is 2.213 mm, which indicates that the algorithm proposed in this paper has good performance in accuracy and real-time.

CONCLUSION
Aiming the problem of difficult identification of stem nodes in sugarcane seeds cutting process, a method of identifying sugarcane stem nodes based on maximum value points of vertical projection function was proposed. Firstly, in order to reduce the effect of light, the RGB sugarcane image is converted into the HSI image and the S component is extracted as the research object. Secondly, using Otsu method to binarize S component image, using morphological closed operation to process the binarization image, and using the horizontal projection map of the binary image to separate sugarcane from the background preliminarily. Finally, through the vertical projection function maximum points screening the possible stem node points, and combined with the local pixel summation method to determine the sugarcane stem node.
In order to test the feasibility of the algorithm proposed in this paper, we specially designed an automatic detection platform for sugarcane, and carried out corresponding experiments on the experimental platform. The experimental results showed that the method proposed in this paper can successfully extract the sugarcane stem node, especially to identify single stem node, the recognition rate is 100%, the processing time of each image is less than 0.19 s, the average absolute error is less than 0.45 mm.