Visual inertial positioning method and system suitable for orchard and other unstructured dynamic environments

By employing a progressive optical flow tracing and structure-aware feature compensation method, the problems of low positioning accuracy and insufficient robustness of visual-inertial SLAM systems in orchard environments were solved, achieving high-precision positioning in weak texture and dynamic environments.

CN120820148APending Publication Date: 2025-10-21GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510920046.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Existing visual inertial SLAM systems suffer from problems such as IMU error accumulation, attitude drift, feature point loss, uneven distribution, unstable lighting, and GNSS signal attenuation in orchard environments, resulting in low positioning accuracy and insufficient robustness.

Method used

A progressive optical flow tracing and structure-aware feature compensation method is adopted, which combines Zero Velocity Update (ZUPT), RAFT optical flow, Lucas-Kanade optical flow and the improved EDLines algorithm to extract and track feature points, thereby enhancing the localization stability in weak texture and dynamic environments.

Benefits of technology

It improves positioning accuracy and robustness in unstructured dynamic environments such as orchards, adapts to changes in lighting and dynamic interference, reduces computational complexity, and meets the requirements of low cost and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120820148A_ABST
    Figure CN120820148A_ABST
Patent Text Reader

Abstract

The invention relates to a visual inertial positioning method and system suitable for dynamic and weak texture environments such as orchards. Relates to the technical field of agricultural robot navigation and perception, and the method comprises the following steps: step 1, acquiring synchronous sensing data acquired by an inertial measurement unit (IMU) and a camera, and correcting IMU errors when a quasi-static state is detected by using a zero-speed update (ZUPT) mechanism so as to suppress integral drift; 2, carrying out feature point initial matching between image key frames by adopting an RAFT global optical flow method to obtain a global consistency optical flow estimation result, and carrying out local fine tracking between adjacent frames in combination with a Lucas-Kanade (LK) optical flow algorithm to realize progressive optical flow tracking; 3, providing a structure perception feature translation strategy for the problem of feature sparseness of a weak texture region, and supplementing a line segment midpoint extracted by the improved EDLines algorithm as a sparse point feature into an optical flow path to improve feature distribution density and tracking stability; and step 4, the improved EDLines algorithm introduces an edge detection threshold value and a minimum line segment length filtering mechanism based on gradient adaptive adjustment to adapt to illumination changes and eliminate noise short line segments so as to enhance line feature extraction stability and geometric integrity. And step 5, inputting the displacement projection error of the feature points obtained through the above processing and the IMU correction data into a visual-inertial positioning and mapping (Visual-Inertial SLAM) framework to realize navigation positioning and map construction. The method disclosed by the invention has the characteristics of high real-time performance, strong robustness and adaptability to dynamic and weak texture environments, and can be widely applied to visual inertial navigation tasks of agricultural mobile platforms such as orchard robots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of agricultural robot navigation and perception technology, in particular to a visual inertial positioning method in a weak texture and dynamic orchard environment. Background Art

[0002] With the advancement of agricultural automation, orchard robots are playing an increasingly important role in tasks such as fruit tree monitoring, automated harvesting, and path navigation. To enable autonomous navigation and operation of orchard robots in complex environments, Visual-Inertial Simultaneous Localization and Mapping (Visual-Inertial SLAM) technology is widely used. This technology, which fuses information from cameras and inertial measurement units (IMUs) to achieve high-precision pose estimation, is a key technology for enabling intelligent orchard robots.

[0003] The existing visual-inertial SLAM system has the following significant problems in the orchard environment: First, the orchard terrain is rugged, which causes the robot to frequently make non-stationary movements, easily resulting in IMU error accumulation and attitude drift; second, the branches and leaves of the fruit trees are frequently disturbed by the wind, and the lighting conditions are unstable, which seriously affects the extraction and tracking of feature points in the image; third, there are large areas of weakly textured surfaces in some areas of the orchard, such as tree trunks, fruits or ground surfaces, and traditional point feature detection methods have difficulty in extracting sufficiently dense and evenly distributed feature points; fourth, fruit tree occlusion and GNSS signal attenuation often make navigation methods based on satellite positioning unusable.

[0004] First, existing technologies typically use methods based on point feature extraction and optical flow tracking, such as ORB-SLAM, VINS-Mono, and its optimized versions (such as VINS-Fusion). Although they have high positioning accuracy, feature points are easily lost and unevenly distributed in areas with rugged terrain, occlusion by fruit trees, and weak texture, resulting in tracking interruption or reduced accuracy. Secondly, some studies have attempted to introduce line features (such as PL-VIO and PL-VINS) to enhance structural information constraints, but they still rely on complex feature matching and optimization processes, which are computationally expensive. In addition, they lack effective adaptability to disturbances in fruit tree branches and leaves, changes in lighting, and weakly textured surfaces in dynamic scenes, and are prone to mismatching. In addition, although existing methods have attempted to use deep learning feature point detection, semantic segmentation, and IMU-assisted mechanisms to improve positioning performance in weak texture and dynamic environments, such methods generally have the disadvantages of high computational complexity, strong dependence on training data, insufficient adaptability, and difficulty in meeting low-cost and real-time requirements.

[0005] Therefore, there is an urgent need for a visual-inertial navigation method that is both real-time, robust, and capable of low-cost feature compensation, which is particularly suitable for orchard environments with dynamic, weak textures, and weak GNSS coverage. Summary of the Invention

[0006] The purpose of the present invention is to provide a visual-inertial positioning method and system suitable for unstructured dynamic environments such as orchards, so as to solve the problems of difficult feature extraction, low tracking accuracy, severe inertial drift, etc. in weak texture areas, dynamic interference scenes and non-stationary motion conditions in the existing technology, thereby improving the autonomous positioning accuracy and robustness of orchard robots in complex scenes.

[0007] To achieve the above objectives, the present invention provides a visual inertial positioning method based on progressive optical flow tracking and structure-aware feature compensation, which includes the following steps:

[0008] Acquire synchronized sensor data collected by the inertial measurement unit (IMU) and camera;

[0009] By introducing the Zero-Velocity Update (ZUPT) mechanism, the IMU data is error corrected when a quasi-stationary state is detected to suppress integration drift.

[0010] The RAFT global optical flow method is used to perform initial matching of feature points between image key frames to obtain globally consistent optical flow estimation results.

[0011] Based on the above initial optical flow results, the Lucas-Kanade (LK) optical flow algorithm is used to perform local fine tracking between adjacent frames to improve the feature continuity between neighboring frames;

[0012] To solve the problem of sparse features in weak texture areas, a structure-aware feature translation strategy is adopted to add the midpoints of line segments extracted from the image as sparse point features to the optical flow tracking path.

[0013] An improved EDLines algorithm is used to extract line features in images. Adaptive gradient threshold adjustment and minimum line segment length screening rules are introduced to improve the extraction density and stability of line features.

[0014] Compared with the prior art, the present invention has the following beneficial effects:

[0015] The present invention utilizes local sensor data collected by an inertial measurement unit (IMU) and a camera, and introduces a zero-velocity update (ZUPT) mechanism into the IMU signal to detect quasi-stationary states and suppress inertial error accumulation. During image processing, RAFT optical flow is used for global feature matching between key frames, and Lucas-Kanade (LK) optical flow is combined to complete local fine tracking between adjacent frames, constructing a progressive optical flow tracking process from coarse to fine and from global to local. To improve feature coverage in weakly textured areas, the present invention proposes a structure-aware feature translation strategy that converts the midpoints of line segment structures into point features, thereby enhancing the distribution density and tracking continuity of feature points. In addition, during the feature extraction process, the EDLines algorithm is improved by introducing an adaptive gradient threshold adjustment mechanism and a minimum line segment length screening strategy, thereby improving the extraction robustness and geometric integrity of line features. Combined with the above-mentioned improved methods, the present invention can maintain high positioning stability and accuracy in complex orchard environments such as dynamic interference, weak texture, uneven illumination, and GNSS unavailability, and is suitable for visual inertial navigation tasks of mobile platforms such as agricultural robots. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the present invention, the specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. The accompanying drawings are used to illustrate the principles and implementation methods of the present invention and do not constitute a limitation on the scope of protection of the present invention.

[0017] Figure 1 This is a structural block diagram of a visual inertial positioning system for an orchard robot provided by the present invention;

[0018] Figure 2 This is a comparison chart of the line feature extraction effects of the improved EDLines algorithm and the original EDLines algorithm in an orchard scene, where the left side shows the extraction result of the improved EDLines algorithm of the present invention, and the right side shows the extraction result of the original EDLines algorithm;

[0019] Figure 3 This is a comparison chart of the trajectories of the three comparison methods and the method of the present invention in the banana orchard scene;

[0020] Figure 4 This is a trajectory comparison diagram of the three comparison methods and the method of the present invention in the mango orchard scene;

[0021] Figure 5 This is a trajectory comparison diagram of the three comparison methods and the method of the present invention in the Huangpi orchard scene. DETAILED DESCRIPTION

[0022] The following embodiments of the present invention are described in detail with reference to the accompanying drawings. It should be noted that the following embodiments are used to illustrate the present invention, but do not constitute a limitation on the scope of protection of the present invention. Figure 1 As shown, the present invention provides a visual-inertial positioning system suitable for orchard environments, including an IMU module, an image acquisition module, a ZUPT error suppression module, a progressive optical flow tracking module, a structure-aware feature compensation module, and an improved line feature extraction module. The overall system is based on a binocular camera and an IMU sensor.

[0023] First, the image acquisition module is used to capture a sequence of images of the mobile robot in the orchard environment, while the IMU module simultaneously acquires acceleration and angular velocity data. The IMU data is input into the ZUPT module, which detects zero velocity. Zero velocity detection is a binary hypothesis: H0, where the robot is stationary, and H1, where the robot is in motion. It can be expressed as:

[0024] Where T(Z k ) and γ are the hypothesis detection statistics and adaptive thresholds of the robot's operating state at time k. The zero speed detection process is mainly divided into two stages: T(Z k ) and γ. k The calculation of ) includes four steps: acceleration variance detection, acceleration amplitude detection, angular rate energy detection and generalized likelihood ratio detection. Define y k It is the kth sampling of IMU, including three-axis acceleration and three-axis angular velocity y k =a x a y a z ω x ω y ω z

[0025] Let Z be the set of IMU data samples Z={y1,y2,…,y n}

[0026] Zero velocity detection using the generalized likelihood ratio detection method is achieved through a sliding window. Dataset Z k It is a sliding window centered on k, consisting of W data samples Z k =y k-W / 2 ,…,y k ,…,y k+W / 2 .Z k =y k-W / 2 ,…,y k ,…,y k+W / 2

[0027] Use the generalized likelihood ratio detection method to detect the probability of a sparse matrix by sliding the window Z k Get the detection statistic T(Z k )

[0028] Where W is the sliding window size T(Z k ) is the detection statistic at time k, and is the variance of the acceleration and angular rate noise, and is the average value of acceleration and angular rate, G is the acceleration due to gravity. The adaptive threshold method uses the detection statistic set T k The features (including mean, peak and variance) are used to determine the threshold at time k. Assume that T is a detection statistic T(Z k ) T={T(Z1),T(Z2),…,T(Z n )}

[0029] Adaptive threshold γ k (k∈[2,n-1]) can be centered on K in the dataset T through the W+1 element sliding window T k calculate T k =T(Z k-W / 2 ),…,T(Z k ),…,T(Z k+W / 2 )

[0030] Sliding window dataset T k The mean and variance of can be calculated as

[0031]

[0032] The final adaptive threshold γ k for

[0033] where μ k Hehe It's T k The mean and variance of K γ and α are key parameters for determining the dynamic threshold. γ is an empirical coefficient and α is an empirical constant that describes the significance of IMU error. Since the performance of IMU varies, K γ and α need to be determined through specific experiments.

[0034] When the system detects the zero state, it performs zero speed correction. In this process, we use the nonlinear least squares algorithm to optimize the speed. The general form of the nonlinear least squares problem is: vector, ρρ i Is the loss function used to deal with outliers. When there are no outliers, usually ρ i (t) = t. In our method v o3 ].

[0035] Secondly, in the image processing process, in order to enhance the tracking stability and positioning accuracy of feature points in the complex environment of the orchard, this system introduces a progressive optical flow tracking mechanism.

[0036] Specifically, between keyframes, the system first calls the RAFT optical flow network to perform dense optical flow estimation, obtaining the initial displacement field between the previous and next frames. The RAFT network primarily consists of three components: a feature encoder for extracting pixel-level image features, a correlation layer for generating four-dimensional correlation volumes between full-image pixel pairs, which are compressed to form low-resolution feature volumes, and a GRU-based iterative module for performing multiple rounds of optimization on the initial optical flow. This model possesses end-to-end global feature alignment capabilities, capable of producing highly consistent and accurate optical flow estimates in the presence of dynamic foreground interference and weakly textured areas.

[0037] The feature extraction part uses a convolutional network to extract features from the input image, and the feature encoder network (denoted as g θ ), respectively acting on the input images I1 and I2, mapping the images to dense feature maps with lower resolution. The feature resolution output by the feature encoder is 1 / 8 of the input image, i.e. g θ : Where D = 256. The feature encoder consists of 6 residual blocks, 2 at 1 / 2 resolution, 2 at 1 / 4 resolution, and 2 at 1 / 8 resolution. A context network is also used, which extracts features only from the first input image. The architecture of the context network is the same as the feature extraction network, denoted as h θ . Feature network g θ and context network h θ This constitutes the first stage of the method and only needs to be performed once.

[0038] When calculating visual similarity, given the features extracted from images I1 and I2 and To construct the correlation volume, we need to perform dot products on all pairs of eigenvectors. The correlation volume C can be efficiently computed by a single matrix multiplication.

[0039] We perform pooling on the last two dimensions of the relevant volume to construct a 4-layer pyramid C1, C2, C3, C4, with pooling kernel sizes of 1, 2, 4, and 8, respectively, and the step size is consistent with the corresponding kernel size. Therefore, the relevant volume C of the kth layer k The dimension is This design provides information about both large and small displacements, but by retaining the first two dimensions (corresponding to the dimensions of I1), it is able to retain high-resolution information, thereby enabling the recovery of the motion of small and fast-moving objects. The new feature map is generated by indexing the features in each level of the correlation pyramid. Given the current optical flow estimate (f1, f2), each pixel x = (u, v) in l1 is mapped to its estimated correspondence in l2: x' = (u + f 1 (u),v+f 2 (v)). We then define the x' local grid around it:

[0040] In the iterative update process, the update operator starts from the initial starting point f0 and estimates a series of flow estimates {f1,…,f N Each iteration generates an update direction Δf, which is applied to the current estimate: f k+1 =Δf+f k+1 .

[0041] Considering the high computational complexity of the RAFT model, in order to balance real-time performance and accuracy, this system only calls the network between key frames and limits its maximum number of iterations to 8 to generate a coarse-grained optical flow guidance field.

[0042] After obtaining preliminary optical flow, the system uses the displacement of feature points output by RAFT as tracking anchors, further guiding the Lucas-Kanade (LK) optical flow algorithm to perform local tracking and position refinement of sparse points between consecutive frames. This strategy implements a progressive optical flow tracking process from coarse to fine, and from global to local, effectively improving the robustness of feature tracking and positioning accuracy in complex orchard scenes.

[0043] The LK optical flow method is based on the assumption of constant brightness, namely: I(x,y,t)=I(x+Δx,y+Δy,t+Δt)

[0044] When the displacement is small, a first-order Taylor expansion is performed to obtain the linear equation: I x u+I y v+I t =0

[0045] Among them (I x )、(I y )、(I t ) are the partial derivatives of the image in space and time, respectively, and (u, v) is the optical flow of the pixel in the (x, y) direction. The LK method solves the optimal (u, v) by minimizing the following residual sum of squares within a local window:

[0046] Furthermore, to address the feature sparseness caused by large areas of weak texture in orchards, the system designed a structure-aware feature translation module. This module uses an improved EDLines algorithm to extract line features with continuous edge structures from the image. After line segment extraction, the system selects the midpoint of each valid line segment as a supplementary feature point and incorporates it into the optical flow tracking path. This strategy eliminates the need for complex line segment matching and naturally embeds structural features into the point feature tracking process, effectively improving point coverage density and tracking stability.

[0047] To ensure the quality and applicability of line segment extraction, two improvements were made to the EDLines algorithm.

[0048] 1. Introducing an edge detection threshold mechanism based on image gradient adaptive adjustment, automatically adapting to changes in light intensity and improving the consistency of line segment extraction;

[0049] Based on the original EDLines algorithm, an adaptive adjustment matrix is ​​added to the edge gradient threshold, which is calculated as follows:

[0050] Two matrices G1 x,y and G2 x,y Used to adapt to gradient changes of horizontal, vertical and diagonal lines G x,y =min{G1 x,y ,G2 x,y}

[0051] Where g(x,y) is the gradient of pixel (x,y), n is the noise suppression constant, and the anchor threshold is taken Finally choose G1 x,y and G2 x,y The minimum value G x,y as the pixel gradient threshold.

[0052] 2. Set the minimum line segment length threshold related to the image size to filter out short line segment false detections caused by random noise. After removing short line segments, sort the remaining line segments according to their length to facilitate line segment merging operations.

[0053] Assume the minimum threshold of the line segment is

[0054] Among them L min is the minimum length threshold, W and H are the width and height of the input image respectively; is rounded up; k is the proportional coefficient that can automatically adjust the length of the line segment according to images of different lengths and widths.

[0055] After removing the short segments, the remaining segments are sorted by length to facilitate segment merging. The longest segment among the short segments is selected to obtain two segments l1 and l2. The horizontal angles θ1 and θ2 between l1 and l2 are calculated. The angle calculation method between l1 and l2 is defined as |θ1-θ2|. If the angle between the two segments in the same direction is very small or the angle between the two segments in the opposite direction is very large, and the distance between the two segments is very small, then the segment pair is considered to be mergeable. The angle range of the segment pair satisfies the following conditions:

[0056] And the distance between the two line segments satisfies d <D th , D th If the straight line distance threshold is set, it is considered that the line segment pair l1 and l2 can be merged into line segment L m Select the two endpoints with the largest and smallest horizontal coordinates from the endpoints in l1 and l2 as the merged line segment L m The two endpoints of . Get the line segment L m Then calculate L again m Horizontal angle, calculate L m The angle between the original merged segments l1 and l2. If θ m <π / 90, the merging condition is met; otherwise, if the new segment deviates significantly from the original segment, the merging operation is abandoned.

[0057] To verify the performance of our method in complex environments, we conducted an experimental evaluation based on a publicly available visual-inertial SLAM dataset. The EuRoC dataset was used for this test. This dataset contains typical indoor flight scenes, encompassing diverse texture conditions, lighting variations, and various motion states, making it a highly challenging and representative environment.

[0058] In this experimental example (hereinafter referred to as Experimental Example 1), the visual-inertial positioning method proposed in the present invention was used to test multiple typical sequences and compared with three existing mainstream visual-inertial odometry methods, which were set as Comparative Example 1, Comparative Example 2, and Comparative Example 3 respectively.

[0059] Comparative Example 1: The test process is the same as that of Experimental Example 1, except that the VINS-Fusion method in the paper Qin T, Cao S, Pan J, et al. A general optimization-based framework for global pose estimation with multiple sensors [J]. arXiv preprint arXiv:1901.03642, 2019 is used.

[0060] Comparative Example 2: The test process is the same as that of Experimental Example 1, except that the PL-VIO method in the paper He Y, Zhao J, Guo Y, et al. PL-VIO: Tightly-coupled monocular visual–inertial odometry using pointandline features[J]. Sensors, 2018, 18(4): 1159 is used.

[0061] Comparative Example 3: The test process is the same as that of Experimental Example 1, except that the PV-VINS method in the paper Fu Q, Wang J, Yu H, et al. PL-VINS: Real-time monocular visual-inertial SLAM with point and line features[J].arXiv preprint arXiv:2009.07462, 2020. is used. PL-VINS is a monocular visual-inertial system optimization method with point and line features developed based on the point-based VINS-Mono.

[0062] Each of the above methods was run on multiple representative sequences from the EuRoC dataset, and the root mean square error (RMSE), maximum error (MAX ERROR), and mean error (MEAN ERROR) were used to evaluate the positioning accuracy. The experimental results are shown in Table 1.

[0063] Table 1

[0064] The method of the present invention showed better positioning accuracy and stability than the comparison methods in the vast majority of test sequences. In low and medium dynamic scenes such as MH02 and MH03, the RMSE of 0.098m and 0.244m were achieved respectively, which were improved by about 44.9% and 20.5% respectively compared with VINS-Fusion in Comparative Example 2. In sequences with strong dynamic interference such as MH04, the RMSE of the method of the present invention was 0.270m and the maximum error was 0.467m, which were both better than Comparative Examples 1 and 2. In weak texture sequences such as V1_02 and V2_02, the method of the present invention also achieved good performance in terms of accuracy and stability, and the error level was significantly lower than that of the comparison examples. In the most challenging V2_03 sequence, the RMSE of the method of the present invention was 0.134m and the maximum error was 0.350m, which was significantly better than the three comparison methods.

[0065] To further verify the applicability of the method of the present invention in a real orchard environment, a self-built orchard visual-inertial SLAM dataset was constructed based on a vehicle-mounted platform. The dataset was collected from three actual orchard scenes, including a banana orchard, a mango orchard, and a yellow fruit orchard, covering a variety of fruit tree structures, terrain undulations, fruit tree occlusions, lighting changes, and dynamic interference factors. The data acquisition equipment includes a low-cost binocular camera system (30Hz) and an inertial measurement unit (200Hz). The platform performs manual or semi-automatic cruising in areas without GNSS signal coverage, collecting paths of approximately 100-200 meters, and using a high-precision RTK reference trajectory as an evaluation benchmark. The method of the present invention was tested on this self-built dataset, and the experimental results are shown in Table 2.

[0066] Table 2

[0067] In the banana orchard scene, the RMSE of the method of the present invention is 0.088m, and the maximum error is 0.213m, which is significantly better than the comparison method, especially compared with the maximum error of PL-VIO (2.093m), which is significantly reduced, showing good adaptability to dynamic environments. In the mango orchard scene, the RMSE is 0.107m, and the overall error is stable, which is better than VINS-Fusion and PL-VIO. Although it is slightly higher than the RMSE of PL-VINS (0.090m), it performs better in error fluctuation control. In the kumquat orchard scene, the RMSE of the method of the present invention is 0.098m, and the maximum error is 0.186m, which are both lower than the comparison method. The maximum error is reduced by about 94.0% compared with PL-VIO, further verifying the stability and high precision of the method of the present invention in weak texture, uneven lighting and occlusion interference environments.

[0068] Figure 3A comparison chart shows the trajectory results of three comparison methods and the proposed method in a banana orchard scene. As can be seen from the chart, the proposed method maintains higher trajectory consistency and convergence stability in weak texture and occlusion environments, with a more consistent positioning trajectory and reference path, and smaller error fluctuations, demonstrating superior robustness and accuracy.

[0069] Figure 4 A comparison chart shows the trajectory results of three comparison methods and the proposed method in a mango orchard scene. As can be seen from the chart, the proposed method maintains higher trajectory consistency and convergence stability in weak texture and occlusion environments, with a more consistent positioning trajectory and reference path, and smaller error fluctuations, demonstrating superior robustness and accuracy.

[0070] Figure 5 A comparison chart shows the trajectory results of three comparison methods and the proposed method in a Huangpi orchard scene. As can be seen from the chart, the proposed method maintains higher trajectory consistency and convergence stability in weak texture and occlusion environments, with a more consistent positioning trajectory and reference path, and smaller error fluctuations, demonstrating superior robustness and accuracy.

Claims

1. A visual inertial positioning method suitable for dynamic and weak texture environments such as orchards, involving the field of agricultural robot navigation and perception technology, characterized by: The following steps are involved: Step 1: Acquire synchronized sensor data collected by the inertial measurement unit (IMU) and camera, and use the zero-velocity update (ZUPT) mechanism to correct the IMU error when a quasi-stationary state is detected to suppress integration drift. Step 2: Use the RAFT global optical flow method to perform initial feature point matching between image key frames to obtain globally consistent optical flow estimation results. Combined with the Lucas-Kanade (LK) optical flow algorithm, local fine tracking is performed between adjacent frames to achieve progressive optical flow tracking. Step 3: To address the sparse feature problem in weak texture areas, a structure-aware feature translation strategy is adopted. The midpoints of image line segments extracted by the improved EDLines algorithm are added as sparse point features to the optical flow tracking path to improve feature distribution density and tracking stability. Step 4: By introducing an edge detection threshold mechanism based on image gradient adaptive adjustment and a minimum line segment length filtering mechanism, the EDLines algorithm is improved to adapt to lighting changes and remove short noisy line segments, thereby enhancing the stability and geometric integrity of line feature extraction; Step 5: Input the IMU correction data, progressive optical flow tracking results, and structure perception feature compensation results obtained above into the visual-inertial simultaneous localization and mapping (SLAM) framework. Through state prediction, feature tracking and matching, joint optimization, and map updating, robot navigation positioning and map construction in the orchard environment are achieved.

2. The method according to claim 1, characterized in that The ZUPT mechanism includes: Detection statistics are calculated through acceleration variance detection, acceleration amplitude detection, angular rate energy detection and generalized likelihood ratio detection; The mean and variance of the detection statistics set are calculated using a sliding window, and adaptive zero-speed detection is achieved based on a dynamic threshold. When the zero velocity state is detected, the IMU velocity is optimized and compensated by the nonlinear least squares method to suppress the integral drift.

3. The method according to claim 1, characterized in that The progressive optical flow tracking method comprises: Between key frames, the RAFT global optical flow method is used to extract features through the feature encoder, construct correlation bodies, and perform a few rounds of iterative optimization based on the GRU iterative module to obtain globally consistent and highly accurate optical flow estimation results. Between adjacent frames, the RAFT optical flow estimation result is used as the feature tracking anchor point, combined with the Lucas-Kanade (LK) optical flow algorithm to perform fine tracking and position correction of sparse features in local areas.

4. The method according to claim 1, wherein In the structure-aware feature translation strategy, the midpoints of valid line segments extracted by the improved EDLines algorithm are selected as sparse point features and added to the RAFT and LK optical flow tracking paths to improve the feature density in weak texture areas.

5. The method according to claim 1, wherein The joint optimization includes taking IMU measurement residuals, feature point reprojection errors and line segment geometric constraint errors as optimization targets, and performing joint nonlinear optimization solutions under a sliding window or graph optimization framework to achieve accurate positioning and mapping.

6. A visual inertial positioning system suitable for dynamic, weak-texture environments such as orchards, characterized by: include: IMU module, used to collect acceleration and angular velocity data; An image acquisition module, used for acquiring synchronous image sequences; ZUPT error correction module, used to correct IMU data when a quasi-stationary state is detected; RAFT global optical flow tracking module and LK local optical flow tracking module form progressive optical flow tracking; The structure-aware feature compensation module is used to execute the improved EDLines algorithm and generate supplementary feature points; The joint optimization module is used to input the IMU correction results, optical flow tracking results and feature compensation results into the SLAM framework to achieve navigation positioning and mapping.