## 3 Methodology
### Spatial Location of Sugarcane Nodes Based on Binocular Vision  
#### 3.3.1 Stereo Matching Based on SIFT Feature Points  
After the identification and plane location of the sugarcane nodes, we needed to locate the nodes in space. In the binocular stereo vision system, stereo matching is the most important step to get the spatial position information of objects. The stereo matching can find the correspondence of the same point in the two images taken by the left and right cameras. According to the different matching elements, stereo matching can be divided into matching algorithms based on the regional grey [16], the phase [17] and the features [18]. Due to the complex growing environment of sugarcane and frequent changes of field light, a feature-based matching algorithm that does not depend excessively on the image grey level and has good anti-interference performance against external factors is more suitable for the stereo matching of sugarcane nodes in this study. Scale-invariant feature transform (SIFT) [19] is a computer vision algorithm used to detect and describe local features in images by finding extreme points in spatial scales and extracting their position, scale and  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Stage** & **Parameter Name** & **Parameter Value** \\ \hline \multirow{4}{*}{Sparse training} & Training batch size & 8 \\  & Learning rate & 0.002 \\  & Epoch & 120 \\  & Sparseness rate & 0.001 \\ Channel pruning & Pruning rate & 0.6 \\  & Epoch & 120 \\ Fine-tune model & Training batch size & 8 \\ \hline \hline \end{tabular}
\end{table}
Table 2: The main parameter settings of the experimental dataset modelling.  
Figure 8: Sugarcane nodes identification and plane position detection based on improved YOLOv4.  
rotation invariants. It has good anti-interference performance against external light and noise. Figure 9 is the SIFT feature point extraction of the left and right cameras.  
The extracted feature points of the left and right images must be matched one by one. However, stem nodes covered or shaded by leaves are too similar to other sugarcane leaves in the field, so the feature points are often mismatched, as shown in Figure 10.  
In order to improve the matching accuracy, the matching constraints were introduced to eliminate the wrongly matched pairs. Random sample consensus (RANSAC) [20] is an iterative algorithm to correctly estimate the parameters of a mathematical model from a set of data containing outliers. \"Outliers\" generally refer to the noise in the data, such as wrongly matched points in the above matching. Therefore, we can eliminate these by introducing the RANSAC algorithm. On the other hand, after stereo correction, we have aligned the row pixels of the left and right images. Moreover, we can use the epipolar constraint whereby the connection between matching point pairs can only be a specific straight line in order to eliminate feature point pairs with inconsistent pixels in the right row of the left and right images. With the introduction of the RANSAC algorithm and the epipolar constraint, the mismatch problem has been basically solved, as shown in Figure 11.  
Figure 10: Schematic diagram of feature point error matching.  
Figure 9: SIFT feature point extraction effect of image collected by left and right cameras. (**a**) left camera. (**b**) right camera.