An agricultural machine navigation positioning method and device based on an agricultural scene three-dimensional semantic map, a medium and a product

By constructing a three-dimensional semantic map and performing semantic consistency checks and matching, the problem of insufficient positioning accuracy and stability in agricultural autonomous driving was solved, and high-precision and stable navigation for agricultural machinery was achieved.

CN122306060APending Publication Date: 2026-06-30ZHEJIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2024-12-27
Publication Date
2026-06-30

Smart Images

  • Figure CN122306060A_ABST
    Figure CN122306060A_ABST
Patent Text Reader

Abstract

This application discloses a method, device, medium, and product for agricultural machinery navigation and positioning based on a 3D semantic map of an agricultural scene, relating to the field of agricultural automation navigation. The method includes constructing a 3D semantic map of the target agricultural scene and acquiring camera images and camera poses of the target agricultural scene; generating a semantic point cloud of the target agricultural scene in a global coordinate system based on the camera images and camera poses; performing a semantic consistency check on the 3D semantic map and the semantic point cloud in the global coordinate system; if the semantic consistency check passes, triggering point cloud matching and determining whether the semantic matching degree between the semantic point cloud of the target agricultural scene in the global coordinate system and the corresponding point cloud in the 3D semantic map exceeds a set threshold; if the semantic matching degree exceeds the set threshold, performing camera pose correction to complete agricultural machinery navigation and positioning using simultaneous localization and mapping (SLAM) technology. This application can accurately correct SLAM positioning errors and improve the accuracy of agricultural machinery navigation and positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of agricultural automation navigation, and in particular to a method, device, medium and product for agricultural machinery navigation and positioning based on a three-dimensional semantic map of an agricultural scene. Background Technology

[0002] With the continuous improvement of agricultural automation, automatic driving technology for agricultural machinery has gradually become a key technology for improving agricultural production efficiency and operational accuracy. Automatic driving systems for agricultural machinery typically rely on high-precision navigation and positioning systems to achieve autonomous navigation and path tracking. Currently, agricultural automation equipment mainly relies on technologies such as GPS (Global Positioning System), RTK (Real-Time Kinematic), and visual SLAM (Simultaneous Localization and Mapping) for positioning and navigation in field operations. However, these technologies have certain limitations in complex agricultural environments.

[0003] GPS and RTK technologies can provide high-precision positioning information, but their positioning and navigation performance deteriorates significantly in environments with obstructions (such as trees or buildings) or unstable signals. Visual SLAM technology acquires environmental image data through cameras to achieve autonomous positioning and map building, but it is prone to accumulating pose errors during long-term operation, especially in farmland environments lacking obvious feature points, which can cause positioning deviations in agricultural machinery. Furthermore, complex environments such as farmland contain numerous dynamic factors, making traditional positioning methods ill-suited to handle environmental changes and real-time navigation requirements.

[0004] To address the shortcomings of existing technologies, high-precision semantic maps and multi-source data fusion methods have gradually become research hotspots in the field of agricultural autonomous driving in recent years, as exemplified by CN109448127A and CN118518091A. Semantic maps not only contain spatial geometric information (such as buildings and roads) but also semantic information about the environment (such as object types and functions). By combining the semantic information in the map with the positioning system, the accuracy and stability of positioning can be effectively improved, as illustrated by CN113313824A and CN114359493A.

[0005] While semantic mapping and multi-source data fusion theoretically offer higher accuracy in positioning and navigation, current technologies still face many challenges, particularly in real-time updates and efficient matching within dynamic agricultural environments. How to achieve high-precision navigation through efficient map-building methods, accurate semantic information fusion, and low-cost hardware remains a critical issue that agricultural autonomous driving systems urgently need to address. Summary of the Invention

[0006] The purpose of this application is to provide a method, device, medium, and product for agricultural machinery navigation and positioning based on a three-dimensional semantic map of an agricultural scene, so as to improve the accuracy of agricultural machinery navigation and positioning.

[0007] To achieve the above objectives, this application provides the following solution:

[0008] Firstly, this application provides a method for agricultural machinery navigation and positioning based on a three-dimensional semantic map of an agricultural scene, including:

[0009] Construct a 3D semantic map of the target agricultural scenario;

[0010] The system acquires camera images and camera poses of a target agricultural scene; the camera images are acquired using a ZED2 binocular camera; the camera images include RGB images and corresponding depth images; the camera pose is determined using the ORB-SLAM3 algorithm.

[0011] Based on the camera image and the camera pose, generate a semantic point cloud of the target agricultural scene in the global coordinate system;

[0012] Semantic consistency is verified between the 3D semantic map of the target agricultural scene and the semantic point cloud of the target agricultural scene in the global coordinate system;

[0013] If the semantic consistency check passes, point cloud matching is triggered, and it is determined whether the semantic matching degree between the semantic point cloud of the target agricultural scene in the global coordinate system and the corresponding point cloud in the 3D semantic map exceeds the set threshold.

[0014] If the semantic matching degree exceeds the set threshold, camera pose correction is performed to complete the agricultural machinery navigation and positioning using simultaneous localization and mapping (SLAM) technology.

[0015] Optionally, a three-dimensional semantic map of the target agricultural scene is constructed, specifically including:

[0016] Acquire a multi-view image dataset of the target agricultural scene; the multi-view image dataset includes image data of the target agricultural scene from different perspectives.

[0017] Key feature points of the multi-view image dataset were extracted using the scale-invariant feature transform algorithm.

[0018] Based on the key feature points, the FLANN library is used to determine the preliminary sparse point cloud of the target agricultural scene;

[0019] The preliminary sparse point cloud is mapped to three-dimensional space using triangulation to obtain the preliminary three-dimensional sparse point cloud of the target agricultural scene;

[0020] Based on the preliminary 3D sparse point cloud, a multi-view stereo reconstruction algorithm is used to determine the 3D dense point cloud of the target agricultural scene;

[0021] Based on the three-dimensional dense point cloud, a three-dimensional semantic map of the target agricultural scene is determined.

[0022] Optionally, based on the three-dimensional dense point cloud, a three-dimensional semantic map of the target agricultural scene is determined, specifically including:

[0023] The random sample consensus algorithm is used to filter, remove outliers, remove noise, and downsample the 3D dense point cloud to obtain the processed 3D dense point cloud;

[0024] Based on the processed 3D dense point cloud, semantic segmentation is performed using a point cloud segmentation model to determine the segmented 3D dense semantic point cloud; wherein, the point cloud segmentation model is obtained by training the PointNet++ model using a first training dataset;

[0025] The segmented 3D dense semantic point cloud and its corresponding spatial coordinates are transformed to the UTM coordinate system to obtain the transformed 3D dense semantic point cloud;

[0026] Based on the transformed 3D dense semantic point cloud, a 3D semantic map of the target agricultural scene is obtained using point cloud stitching technology, according to the viewpoint and acquisition time.

[0027] Optionally, based on the camera image and the camera pose, a semantic point cloud of the target agricultural scene in a global coordinate system is generated, specifically including:

[0028] Based on the camera images, a semantic image is determined using a semantic segmentation model; wherein, the semantic segmentation model is obtained by training the SegFormer model using a second training dataset;

[0029] The semantic image and the corresponding depth image are aligned using timestamps to obtain aligned semantic images and aligned depth images;

[0030] The pixels and spatial coordinates of the aligned semantic image and the aligned depth image are associated to generate a local semantic point cloud in the camera coordinate system.

[0031] Based on the camera pose, the local semantic point cloud in the camera coordinate system is transformed to the global coordinate system to obtain the semantic point cloud of the target agricultural scene in the global coordinate system.

[0032] Optionally, if the semantic consistency check fails, the current camera pose is maintained.

[0033] Optionally, if the semantic matching degree does not exceed a set threshold, the current camera pose is maintained.

[0034] Optionally, the camera pose correction process specifically includes:

[0035] The semantic point cloud in the global coordinate system that matches the category of the marker in the three-dimensional semantic map is selected to obtain the first candidate point cloud;

[0036] The point clouds in the 3D semantic map that are consistent with the marker categories in the semantic point cloud in the global coordinate system are selected to obtain the second candidate point cloud;

[0037] Based on the first candidate point cloud and the second candidate point cloud, the iterative nearest point algorithm is used to optimize the transformation matrix.

[0038] The current camera pose is corrected based on the optimized transformation matrix.

[0039] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene as described above.

[0040] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene as described above.

[0041] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene as described above.

[0042] According to the specific embodiments provided in this application, this application has the following technical effects:

[0043] This application provides a method, device, medium, and product for agricultural machinery navigation and positioning based on a 3D semantic map of an agricultural scene. First, a 3D semantic map of the target agricultural scene is constructed, and camera images and camera poses of the target agricultural scene are acquired. Second, based on the camera images and camera poses, a semantic point cloud of the target agricultural scene in a global coordinate system is generated. Then, a semantic consistency check is performed between the 3D semantic map of the target agricultural scene and the semantic point cloud of the target agricultural scene in the global coordinate system. If the semantic consistency check passes, point cloud matching is triggered, and it is determined whether the semantic matching degree between the semantic point cloud of the target agricultural scene in the global coordinate system and the corresponding point cloud in the 3D semantic map exceeds a set threshold. Finally, if the semantic matching degree exceeds the set threshold, camera pose correction is performed to complete the agricultural machinery navigation and positioning using simultaneous localization and mapping (SLAM) technology. This application constructs a 3D semantic map and matches it with the real-time semantic point cloud of the camera, performs a semantic consistency check, and determines whether camera pose correction is needed, thereby accurately correcting SLAM positioning errors and improving the accuracy of agricultural machinery navigation and positioning. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart illustrating an agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene, provided in an embodiment of this application;

[0046] Figure 2 This is a schematic diagram illustrating the workflow of three-dimensional semantic map construction and pose correction provided in an embodiment of this application;

[0047] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0049] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0050] This application proposes a 3D semantic map generated based on RTK UAV oblique photography and semantic segmentation technology. By matching it with the real-time semantic point cloud of the camera, the SLAM positioning error is accurately corrected, thereby improving navigation accuracy and stability.

[0051] In one exemplary embodiment, such as Figure 1 and Figure 2 As shown, a method for agricultural machinery navigation and positioning based on a 3D semantic map of an agricultural scene is provided, including the following steps:

[0052] S1: Construct a 3D semantic map of the target agricultural scenario.

[0053] As an optional implementation, S1 specifically includes:

[0054] S11: Obtain a multi-view image dataset of the target agricultural scene; the multi-view image dataset includes image data of the target agricultural scene from different perspectives.

[0055] In practical applications, oblique imagery data (multi-view image datasets) are acquired using DJI Magic 3E drones equipped with RTK systems to collect field data. Oblique photography equipment is used to obtain multi-angle images of the target agricultural scene. During image acquisition, the drone flies along a predetermined flight path to ensure a high overlap rate for each image.

[0056] Flight mode setting: Intelligent posing mode (combination of vertical and tilt photography).

[0057] Flight parameter settings:

[0058] Flight altitude: 50m (vertical GSD is 1.34cm / pixel).

[0059] Gimbal tilt angle: 30° (GSD tilt is 1.55cm / pixel).

[0060] Heading overlap: 80%.

[0061] Lateral overlap rate: 70%.

[0062] The altitude difference between adjacent images should not exceed 30m.

[0063] The difference between the maximum and minimum flight altitude should not exceed 50m.

[0064] The difference between the actual flight altitude and the design flight altitude should not exceed 50m.

[0065] After the flight, the following data will be acquired: image data, UAV POS data (Positioning System Data, including heading, pitch angle, roll angle, rotation matrix, translation vector, etc.), and high-precision RTK positioning information.

[0066] During the data acquisition process, several representative ground control points were selected for GPS measurements, which served as spatial correction references for the imagery and 3D point cloud.

[0067] Like control point selection:

[0068] The project survey area needs to have more than 5 high-level horizontal (or vertical) control points for accuracy control.

[0069] When selecting control points, the placement requirements must be fully considered, and the control point placement should be combined with the placement plan.

[0070] Choose terrain surveying points with good visibility to the sky, avoiding obstruction by buildings, trees, or other terrain features, and where the points and targets can be clearly identified.

[0071] Once the RTK system has stabilized, observations and data recording begin. Before observations can begin, the RTK system needs to reach a stable state. This means that the received satellite signals are of good quality and the positioning accuracy meets preset standards. Stability is typically assessed by monitoring indicators such as the number of satellites, signal strength, and positioning accuracy. Once the RTK system is stable, surveyors begin recording data. This data typically includes the coordinates (longitude, latitude, and elevation) of each control point, as well as the observation time.

[0072] Observation time: 20 seconds for each control point; observe twice to ensure data accuracy.

[0073] Accuracy requirements:

[0074] The difference between planar coordinate components is controlled within 1.5cm-2cm.

[0075] The vertical coordinate component is controlled within 2cm-3cm.

[0076] The plane coordinates and elevation of control point measurements are recorded to 0.001m.

[0077] After data acquisition is completed, key feature points are extracted from the image data using feature extraction and matching algorithms, and then converted into a preliminary 3D sparse point cloud using triangulation. Next, multi-view stereo matching and depth estimation techniques are used to densely reconstruct the sparse point cloud, fill in the gaps, and generate a more complete and detailed 3D dense point cloud. The specific process is as follows: S12-S15.

[0078] S12: Extract key feature points from the multi-view image dataset using the scale-invariant feature transformation algorithm.

[0079] S13: Based on the key feature points, use the FLANN library to determine the preliminary sparse point cloud of the target agricultural scene.

[0080] In practical applications, the SIFT (Scale-Invariant Feature Transform) algorithm is used to extract salient feature points from the image data acquired in the first process, and fast feature matching is performed using the FLANN (Fast Library for Approximate Nearest Neighbors) library. This step significantly improves the speed and accuracy of feature matching, thereby generating a preliminary sparse point cloud.

[0081] S14: The preliminary sparse point cloud is mapped to three-dimensional space using triangulation to obtain the preliminary three-dimensional sparse point cloud of the target agricultural scene.

[0082] S15: Based on the preliminary three-dimensional sparse point cloud, a multi-view stereo reconstruction algorithm is used to determine the three-dimensional dense point cloud of the target agricultural scene.

[0083] Triangulation is used to map matched feature points (preliminary sparse point cloud) into 3D space, generating a preliminary 3D sparse point cloud. Since point clouds obtained through feature matching are often porous and sparse, model details are frequently missing. Therefore, the spatial coordinates of each pair of feature points are calculated using images from multiple viewpoints. The relative position and orientation between the two viewpoints are solved using the fundamental matrix or essential matrix. Then, combined with camera intrinsic parameters and known relative poses, the 3D point cloud is reconstructed. In other words, by calculating the essential matrix, the rotation matrix R and translation matrix t for the current image captured by the drone are obtained.

[0084] Fundamental Matrix:

[0085] The fundamental matrix is ​​a matrix that describes the relationship between corresponding points in two images, and it is usually calculated using the eight-point algorithm. This method requires at least eight pairs of matching feature points.

[0086] The steps to calculate the fundamental matrix are as follows:

[0087] Normalized matching points: Normalize the matched feature points to improve the stability of the calculation.

[0088] Constructing the matrix: Constructing a matrix equation based on the matching points.

[0089] Calculate the fundamental matrix: Solve for the fundamental matrix using singular value decomposition (SVD) and force its rank to 2 (by setting the smallest singular value to 0).

[0090] Essential Matrix:

[0091] The essential matrix is ​​a special case of the fundamental matrix, taking into account the camera's intrinsic parameters. It can be calculated using the relationship between the fundamental matrix and the camera intrinsic parameter matrix.

[0092] The steps to calculate the essential matrix are as follows:

[0093] Obtain the camera intrinsic parameter matrix (K), including focal length and principal point position.

[0094] The essential matrix is ​​calculated using the formula E = KT·F·K, where F is the fundamental matrix and K is the camera intrinsic matrix of the image.

[0095] Relative pose estimation:

[0096] Extract the relative rotation matrix R and translation vector t from the essential matrix. This is typically achieved by SVD decomposition of the essential matrix.

[0097] The decomposition of the essential matrix yields four possible solutions (two rotation matrices and two translation vectors), and the correct solution needs to be determined through triangulation or other methods.

[0098] The formula for generating sparse point clouds is:

[0099] P 3D =Triangulate(P1,P2,R,t).

[0100] Where P1 and P2 are the matching feature points from two different perspectives, and R and t are the POS data of the UAV.

[0101] Subsequently, after the sparse point cloud is generated, dense reconstruction is performed using the MVS (Multi-View Stereo) algorithm. The MVS algorithm generates a higher-density point cloud by matching multiple views of the same 3D point in multi-view image data, utilizing epipolar geometric constraints and disparity information.

[0102] In practical applications, the RANSAC algorithm is used to eliminate incorrect matches, and finally, triangulation techniques are used to recover the three-dimensional spatial positions of the feature points. Given a set of points (x... i ,y i This includes outliers; any two points (x, y) are randomly selected from the set of points. n ,y n ), (x m ,y m The specific representation of RANSAC is as follows:

[0103] Parameter calculation:

[0104]

[0105] b = y n -k·x m (2)

[0106] Anomaly detection:

[0107]

[0108] If d i If the threshold value is greater than ε, then the point is considered an outlier and is removed. ε is a user-defined threshold.

[0109] S16: Based on the three-dimensional dense point cloud, determine the three-dimensional semantic map of the target agricultural scene.

[0110] In practical applications, when constructing 3D semantic maps, deep learning models are used to perform semantic segmentation on point clouds, labeling static objects (such as houses, utility poles, etc.) as fixed landmarks, generating point cloud data with spatial coordinates and semantic labels. For static objects in agricultural scenarios (e.g., houses, roads, crops, signal towers, etc.), they are set as "fixed landmark semantics" names. The semantics of these objects are also mapped using different numerical flags, denoted as S_{name}_flag. Where:

[0111] name∈N object , representing the name of the current object, N object This is a set of names for all objects in the scene (such as houses, roads, crops, signal towers, etc.).

[0112] flag∈Z + , representing the numerical mapping corresponding to this semantic, Z + Let f(x) be a set of positive integers representing the category labels of objects, where flag > 0. For example, if the category name of a house in a point cloud is "house" and the semantic label value is "1", then it is denoted as S_house_1.

[0113] Furthermore, during the segmentation process, the model not only identifies object categories but also recognizes the spatial distribution of objects based on geometric features, ensuring that landmarks are accurately labeled on the map. The spatial location of static landmarks will be labeled using the UTM (Universal Transverse Mercator) global positioning coordinate system. The data record format is p map =(X map ,Y map Z map ,flag), where (X map ,Y map Z mapThe ') represents the spatial location of the point cloud, and 'flag' is its corresponding category label. In summary, the storage format for static marker data is [S_{name}_flag, (X... map ,Y map Z map The key-value pairs are defined as follows: [flag].

[0114] As an optional implementation, S16 specifically includes:

[0115] S161: The random sampling consensus algorithm is used to filter, remove outliers, remove noise, and downsample the 3D dense point cloud to obtain the processed 3D dense point cloud.

[0116] In practical applications, the RANSAC (Random Sample Consensus) algorithm is used to filter dense 3D point clouds, removing outliers and noise. Simultaneously, a voxel grid filter is employed for downsampling, with a voxel size of 0.05. By adjusting the voxel size, the sparsity of the point cloud can be controlled, retaining only one representative point within each voxel, typically the voxel center. This method effectively reduces redundant data while preserving the geometric features of the point cloud.

[0117] S162: Based on the processed 3D dense point cloud, semantic segmentation is performed using a point cloud segmentation model to determine the segmented 3D dense semantic point cloud; wherein, the point cloud segmentation model is obtained by training the PointNet++ model using the first training dataset.

[0118] In practical applications, the first step is to define the markers: During the semantic map construction process, point cloud processing software such as CloudCompare is used to label the markers in the point cloud according to their categories. Marker categories include: Tower (signal tower / power pole), Fields (farmland), Tree (tree), House (house), Car (vehicle), etc., and are defined as follows:

[0119] name∈N object ={Tower, Fields, Tree, House, Car}, flag∈

[0120] {1, 2, 3, 4, 5}.

[0121] Therefore, the markers are named S_Tower_1, S_Fields_2, S_Tree_3, S_House_4, and S_Car_5 respectively.

[0122] Subsequently, the PointNet++ model was used to perform semantic segmentation on the point cloud, identifying the object category to which each point belongs. By learning the features of each point, this model can effectively handle irregular point cloud data and provide accurate classification results.

[0123] S163: Transform the segmented 3D dense semantic point cloud and its corresponding spatial coordinates to the UTM coordinate system to obtain the transformed 3D dense semantic point cloud.

[0124] In practical applications, the segmented semantic point cloud and its spatial coordinates are converted to the UTM coordinate system for map integration. Each marker, its spatial coordinates, and semantic label are stored as key-value pairs, in the following format: map = {S_Tower_1, (X... Tower ,Y Tower Z Tower [,1)],[S_Fields_2,(X Fields ,Y Fields Z Fields ,2)],[S_Tree_3,(X Tree ,Y Tree Z Tree ,3)],[S_House_4,(X House ,Y House Z House ,4)],[S_car_5,(X car ,Y car Z car ,5)]}.

[0125] S164: Based on the converted 3D dense semantic point cloud, according to the viewpoint and acquisition time, a 3D semantic map of the target agricultural scene is obtained using point cloud stitching technology.

[0126] Using point cloud data from multiple perspectives and acquisition times, point cloud stitching technology is employed to align and fuse them into a complete 3D model. During the stitching process, landmarks are precisely located using spatial coordinates and semantic labels. Poisson reconstruction is then used to transform the point cloud into a smooth 3D surface model. Semantic labels are incorporated into the reconstruction equation, allowing the normal vector information of each point to work in conjunction with its category, thereby removing sparsity and improving map realism. The specific formula is as follows:

[0127]

[0128] Where f is the reconstructed surface function; It is the normal vector; λ is the balance coefficient, which controls the consistency between the geometric shape and the semantic category. weight(p) map_i Let p be a point. map_iThe higher the weight of the marker, the greater its weight; δ(class(p) map_i -c) The Kronecker function ensures that only the semantic point cloud of the markers affects the objective function. This function is defined as:

[0129]

[0130] Subsequently, voxelization is used to divide the 3D space into small volumetric units (voxels). The point cloud within each voxel is then classified to reduce sparsity and improve map detail. In unstructured scenes, a strategy for dynamically adjusting voxel sizes can be introduced to accommodate the detail requirements of different areas. Higher resolution voxels are used for high-detail areas (such as buildings and trees), while lower resolution voxels are used for more open areas (such as farmland). For the classification problem of each voxel, the average normal and density of points within the voxel can be defined.

[0131]

[0132] Where, p map_i It is voxel V ijk The number of points within a voxel is m, where m is the number of points within that voxel. This is determined by calculating the average position within each voxel. This enables more refined classification of point clouds, and stores the point cloud category information as a feature of each voxel.

[0133] The voxel size is dynamically adjusted based on different semantic tags. This allows for the generation of appropriate detail levels for areas with significant structural differences, such as farmland and buildings. Specifically, the dynamic voxel unit is set to:

[0134] Where ρ represents the number of points in a unit volume of point cloud (usually the number of points per cubic meter of point cloud), and α is a modulating factor used to control the voxel size; a larger α results in smaller voxels, and vice versa. Different modulating factors α are selected based on different types of markers.

[0135] Farmland area (point cloud label is 2): α is set to 0.5, which is suitable for sparse areas.

[0136] For fixed landmarks such as utility poles / signal towers and buildings: α is set to 2, which is suitable for areas requiring high precision details.

[0137] Vehicles (potentially moving landmarks): Set to 1 to adapt to dynamically changing environments.

[0138] Trees (markers affected by environmental and seasonal changes): Set to 1.5 to balance accuracy and computational efficiency.

[0139] In practical applications, point cloud processing and map building algorithms (such as point cloud stitching, mesh modeling, voxel method, etc.) are used to integrate the spatial coordinates and semantic labels of each static landmark into the 3D map. That is, label name and label value mapping fields are added to the point cloud ply file to form a semantically enhanced map model.

[0140] Mesh modeling involves transforming mesh-modeled point cloud data into a 3D surface model, which can smooth complex geometric structures (such as farmland and buildings) and integrate object categories with geometric surfaces to form semantically rich 3D maps.

[0141] S2: Acquire camera images and camera poses of the target agricultural scene; the camera images are acquired using a ZED2 binocular camera; the camera images include RGB images and corresponding depth images; the camera poses are determined using the ORB-SLAM3 algorithm.

[0142] In practical applications, agricultural machinery is equipped with binocular cameras, and the SLAM algorithm is run to estimate the camera's coarse pose. SLAM extracts image feature points and uses visual odometry to estimate the pose, generating a SLAM-based local coordinate system pose. Despite accumulated errors, SLAM provides a preliminary estimate for subsequent point cloud generation.

[0143] S3: Generate a semantic point cloud of the target agricultural scene in the global coordinate system based on the camera image and the camera pose.

[0144] A binocular camera acquires images in real time and generates depth maps. Objects in the images are classified through semantic segmentation, and local semantic point clouds are generated by combining depth information. These point clouds contain the three-dimensional coordinates (local coordinate system) and semantic categories (e.g., houses, utility poles). Specifically...

[0145] As an optional implementation, S3 specifically includes:

[0146] S31: Based on the camera image, a semantic image is determined using a semantic segmentation model; wherein the semantic segmentation model is obtained by training the SegFormer model using a second training dataset.

[0147] In practical applications, RGB images and depth maps captured by binocular cameras are published in real time. The RGB images are semantically segmented using the SegFormer deep learning model to generate corresponding semantic images.

[0148] S32: Align the semantic image and its corresponding depth image using timestamps to obtain aligned semantic images and aligned depth images. In practical applications, considering the delay of model segmentation, timestamps are used to align the currently published semantic image and its corresponding depth image.

[0149] S33: Associate the pixels and spatial coordinates of the aligned semantic image and the aligned depth image to generate a local semantic point cloud in the camera coordinate system.

[0150] In practical applications, the pixel and spatial coordinates of the aligned semantic image and the aligned depth image are associated to generate a local semantic point cloud. Specifically, each frame of image and its corresponding depth map are timestamped to ensure that they come from sensor data at the same time.

[0151] t sync =t rgb =t depth (7)

[0152] Synchronization between the semantic map and the depth map is ensured by using timestamps. In this process, the depth value and semantic label of each pixel are combined to generate the corresponding 3D point cloud.

[0153] Camera hardware parameters include: camera RGB image I RGB The dimensions are W×H.

[0154] I RGB This is a depth map with dimensions W×H, where the depth value of each pixel (u,v) is D(u,v).

[0155] Segmented semantic image I semant The size is W×H, and each pixel (u,v) corresponds to a category label (u,v).

[0156] Using the camera intrinsic parameter matrix K, each pixel (u,v) can be converted into a 3D spatial point (X) in the camera coordinate system. camera_i ,Y camera_i Z camera_i The camera intrinsic parameter matrix is ​​typically a 3×3 matrix containing the focal length f. x f y and the principal point coordinates c x c y :

[0157] After ensuring synchronization between the semantic image and the depth image, the camera intrinsic parameter matrix K and the depth information depth(x) of the depth image are used. i ,y i ), which can divide each pixel (x) i ,y i Converting to a 3D point in the camera coordinate system (X) camera_i ,Y camera_i Z camera_i The specific calculation method is as follows:

[0158]

[0159] Based on the camera's depth and semantic images, each pixel can be converted into a point in three-dimensional space using triangulation methods, forming a local semantic point cloud. Specifically, for each transformed local semantic point cloud p... camera_i , (Z camera_i ,Y camera_i Z camera_i The semantic graph provides the three-dimensional spatial information of the point, while the class(p) of the marker to which the point belongs. camera_i ) and its numerical mapping label(p camera_i Thus, the local semantic point cloud representation in the camera coordinate system is obtained:

[0160]

[0161] Where (u,v) are pixel coordinates; D(u,v) is the depth value in the depth map; f x f y c x c y These are camera intrinsic parameters, which are fixed hardware parameters; label(u,v) represents the category label of the pixel in the semantic map.

[0162] S34: Combining the camera pose, transform the local semantic point cloud in the camera coordinate system to the global coordinate system to obtain the semantic point cloud of the target agricultural scene in the global coordinate system.

[0163] In practical applications, the local semantic point cloud is transformed to the global coordinate system. For each frame of image and depth image, the SLAM system outputs a rotation matrix and a translation vector based on the real-time estimated camera pose. This is a matrix with respect to the timestamp t. sync Related dynamic values.

[0164] To transform the real-time generated local point cloud from the camera coordinate system to the global coordinate system and eliminate accumulated errors in the SLAM algorithm, this implementation method uses real-time pose information provided by the SLAM system to perform this transformation. Specifically, the camera pose T... slam Typically determined by the rotation matrix R slam Translation vector t slam These parameters are jointly determined. They are calculated and output in real time using the SLAM algorithm. To accurately describe the transformation between the camera coordinate system and the global coordinate system, an initial transformation matrix T is also required. init This is used to align the local coordinate system with the global coordinate system. The camera's initial point is calibrated using GPS and transformed to the UTM coordinate system; the initial point is (X... init ,Y init Z initThe initial transformation matrix T can be calculated by combining the current pose of the camera with the SLAM equation (219177.032442969, 3399205.975156083, 0.93). init .

[0165] First, set the initial point P init =(X init ,Y init Z init Represented by its second coordinate:

[0166]

[0167] The origin of the camera coordinate system is denoted as P. slam_0 Therefore:

[0168] P init =T init ·P slam_0 (11)

[0169] Therefore, the solution is:

[0170]

[0171] Camera t sync The pose at time is Including rotation matrix Translation vector Its homogeneous coordinates are represented as:

[0172]

[0173] The initial pose is the identity matrix:

[0174]

[0175] Therefore, we can obtain t in the SLAM coordinate system. sync The coordinates are represented as:

[0176]

[0177] During the transformation process, accurate transformation of local point clouds in the global coordinate system is achieved. A timestamp t is also used for each frame of data. sync To ensure semantic point cloud and camera pose T slam Consistency between them.

[0178]

[0179]

[0180] Among them, T global This is the camera pose after transformation to the global coordinate system; Pglobal(i) These are the point cloud coordinates after transformation to the global coordinate system.

[0181] S4: Perform a semantic consistency check on the 3D semantic map of the target agricultural scene and the semantic point cloud of the target agricultural scene in the global coordinate system.

[0182] In practical applications, the semantic consistency check of marker point clouds is based on real-time camera pose and real-time semantic point clouds. It combines the camera's scanning range (depth, field of view) to determine the approximate scanning area on the map and then performs a semantic consistency check. If the semantic consistency check passes, point cloud matching is triggered; otherwise, the current camera pose is maintained. The specific process is as follows:

[0183] (1) The point cloud region scanned by the camera is determined by combining the camera's pose T in the current global coordinate system. global The camera's scanning area is used to determine candidate point cloud regions in the map at the current moment. Specifically, the camera's field of view θ... Fov and scanning depth range D range These are hardware parameters, and the boundary points of the camera's scanning area are defined as V. min and V max Therefore, the stereoscopic projection area P of the camera's field of view at time t can be obtained. scan_region for:

[0184] P scan_region =T global(t) ·[R slam(t )·[V min V max ]+t slam(t) (17)

[0185] V min and V max The specific calculation method is as follows:

[0186]

[0187] Given that the camera's scanning depth is 15m, this can be used as a pre-input variable to calculate the stereoscopic projection area of ​​the camera's field of view.

[0188] (2) Extraction of point cloud regions for candidate landmarks on the map: Based on the current stereo projection area of ​​the camera, extract P from the global map. scan_region [S_{name}_flag within the range, (X map ,Y map Z map The mathematical representation of the candidate point cloud region is:

[0189]

[0190] Where, p j =(X map_j ,Y map_j Z map_j ,flag j B(P) represents the semantic point cloud in a 3D semantic map. scan_region () represents the spatial boundary of the stereo projection area in the global coordinate system, indicating the camera's field of view and the spatial relationship of the point cloud on the map.

[0191] Point cloud p in the candidate point cloud region j =(X map_j ,Y map_j Z map_j ,flag j ) Located at P scan_region Strong constraints within are represented as:

[0192] The distance in the direction needs to be less than the camera scanning depth:

[0193]

[0194] Among them, D cameratomap ≤D range .

[0195] In the horizontal range (where the camera's field of view is on the xz or yz plane), it should be smaller than the camera's field of view width:

[0196]

[0197] Based on the real-time stereo projection area of ​​the camera, candidate region point clouds that intersect with its range are extracted from the 3D semantic map.

[0198] Candidate point cloud regions refer to areas on the map that the camera scans within a fixed range. Therefore, point cloud data from the map is directly extracted from the map data based on this range as candidate point cloud regions.

[0199] Its function is that, theoretically, when the camera generates a point cloud in real time, it should perfectly match all point clouds in its hardware scanning area. However, due to the existence of errors, it is difficult for the point cloud detected by the camera in real time to perfectly align with the point cloud in the candidate point cloud area. Therefore, only the intersection of the real-time and theoretical point clouds is taken as the accurate value.

[0200] (3) Semantic consistency test: After finding the point cloud that falls within the scanning area, a semantic consistency test is performed.

[0201] S5: If the semantic consistency check passes, point cloud matching is triggered, and it is determined whether the semantic matching degree between the semantic point cloud of the target agricultural scene in the global coordinate system and the corresponding point cloud in the three-dimensional semantic map exceeds the set threshold.

[0202] In practical applications, point cloud matching algorithms are used for point cloud matching. The goal of these algorithms is to register the point clouds by minimizing the error between the point clouds generated in real time by the camera and the map point clouds. To improve the efficiency and accuracy of the matching process, only point clouds that are semantically consistent and serve as landmarks are considered.

[0203] The real-time semantic point cloud region of the camera is P camera_area Therefore, it can be defined as being related to the candidate point cloud region P. map,candidate The semantic matching degree S between them match for:

[0204]

[0205] If the semantic matching degree S match Exceeding the set threshold S threshold (In this embodiment, the threshold is set to 0.8), which triggers camera pose correction. This process is defined as:

[0206]

[0207] S match That is, the similarity measure between camera point cloud and map point cloud; S threshold The set matching threshold determines whether camera pose correction is triggered.

[0208] Before matching, point clouds that are semantically consistent with the landmarks in the 3D semantic map point cloud are first selected based on semantic labels. Registration is completed by minimizing the error between the camera point cloud and the map point cloud. The goal is to match only point clouds belonging to specific landmark categories and ignore other point clouds. Specifically, the first candidate point clouds that are semantically consistent with the landmarks in the 3D semantic map are selected from the point clouds generated by the camera.

[0209] P camera_i ={p i ∈P camera |label i =flag j}(25)

[0210] Among them, P camera For the point cloud set generated by the camera, label i For the camera, point cloud midpoint p i Semantic numerical tags.

[0211] Similarly, a second candidate point cloud matching the camera point cloud label is selected from the 3D semantic map point cloud:

[0212] P map,candidate_j ={p j ∈P map |flagj =label i}(26)

[0213] Among them, P map For a 3D semantic map point cloud collection, flag j For the corresponding point p in the map point cloud j Semantic tags.

[0214] If the semantic consistency check fails, the current camera pose is maintained.

[0215] S6: If the semantic matching degree exceeds the set threshold, camera pose correction is performed to complete the agricultural machinery navigation and positioning using simultaneous localization and mapping technology.

[0216] If the semantic matching degree does not exceed the set threshold, the current camera pose is maintained.

[0217] As an optional implementation method, the camera pose correction process specifically includes:

[0218] The semantic point cloud in the global coordinate system that matches the category of the marker in the three-dimensional semantic map is selected to obtain the first candidate point cloud.

[0219] Point clouds in the 3D semantic map that match the marker categories in the semantic point cloud in the global coordinate system are selected to obtain the second candidate point cloud.

[0220] Based on the first candidate point cloud and the second candidate point cloud, the iterative nearest point algorithm is used for optimization to obtain the optimized transformation matrix.

[0221] The current camera pose is corrected based on the optimized transformation matrix.

[0222] In practical applications, the ICP (Iterative ClosestPoint) algorithm is used for pose optimization. For the selected matching point cloud P... camera_i and P map,candidate_j The ICP algorithm is used to optimize the transformation between them. The goal is to optimize the transformation matrix T by minimizing the Euclidean distance between the point pairs. opt :

[0223]

[0224] Among them, T opt It is a transformation matrix, representing the rotation and translation transformations that correct the camera pose; P camera_i P map,candidate_j These are the first and second candidate power sources and point clouds, respectively, after being filtered by semantic consistency test.

[0225] After matching is completed, the transformation matrix T is calculated through optimization. opt This achieves optimal registration between the camera point cloud and the map point cloud, thereby correcting the camera pose. The optimized camera pose not only corrects the error of the current camera pose but also serves as a loop closure constraint for pseudo-loop closure detection to correct the accumulated error of historical trajectories.

[0226] Specifically, using T current Indicates the current camera pose, using T opt The optimized camera pose can be obtained by transforming it.

[0227]

[0228] Pseudo-loop closure correction and historical trajectory correction: Historical trajectory correction adjusts the camera pose in the historical trajectory through loop closure detection and global optimization methods (such as graph optimization or nonlinear least squares optimization) to eliminate accumulated errors in the SLAM algorithm and solve the trajectory drift problem. The specific process is as follows:

[0229] First, loop closure detection and pose matching are performed. In loop closure detection, the pose of the current pose is calculated by matching the detected loops with the pose at a certain moment in the historical trajectory, providing constraints for subsequent pose correction. Further, the optimized camera pose is then... The lapsing constraint of the historical trajectory is introduced into the global optimization problem to optimize the historical trajectory T. history ={T1,T2,T3……,T n The camera pose in}.

[0230] This problem is described using a graph optimization process, where:

[0231] Each node T i It represents the pose of the camera at a certain moment.

[0232] Each edge represents the constraint relationship between camera poses.

[0233] The optimization objective is to minimize all constraint errors, including the error between the current pose and the map marker positions, and the error between adjacent poses in the historical trajectory. The specific optimization objective function is:

[0234]

[0235] Among them, T history ={T1,T2,T3……,T n} represents all camera poses in the historical trajectory. It is the pose at time i after point cloud matching and correction. ΔT ijIt represents the relative transformation between time i and time j obtained through loop closure detection. C is the constraint set, representing the pose matching constraints in loop closure detection.

[0236] This application proposes a navigation and positioning method for agricultural machinery based on a 3D semantic map of an agricultural scene. By combining a high-precision RTK system and a deep learning model, it significantly improves map construction accuracy and agricultural machinery positioning performance. Compared with traditional SLAM systems, this application utilizes precisely calibrated map markers and real-time point cloud matching to correct the agricultural machinery pose, effectively eliminating accumulated errors and pose drift in the SLAM algorithm.

[0237] By jointly optimizing semantic consistency testing and point cloud matching, this application performs semantic segmentation and accurate labeling of static landmarks (such as houses, utility poles, and signal towers) in agricultural scenarios, achieving high-precision pose correction in farmland, roads, and other agricultural environments. Furthermore, by correcting historical trajectories through pseudo-loop closure detection, it addresses the problem of lacking global consistency in traditional methods.

[0238] This application's multi-layered data processing and optimization workflow not only improves the accuracy of 3D map construction but also significantly enhances the reliability and operational efficiency of agricultural machinery positioning. Combined with high-precision markers and loop closure optimization algorithms, this application provides a more accurate and stable navigation solution for agricultural automation, promoting the development of intelligent agriculture.

[0239] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene.

[0240] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene.

[0241] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene.

[0242] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 3As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for agricultural machinery navigation and positioning based on a three-dimensional semantic map of an agricultural scene.

[0243] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0244] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0245] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0246] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0247] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0248] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. An agricultural machine navigation positioning method based on a three-dimensional semantic map of an agricultural scene, characterized in that, include: Construct a 3D semantic map of the target agricultural scenario; The system acquires camera images and camera poses of a target agricultural scene; the camera images are acquired using a ZED2 binocular camera; the camera images include RGB images and corresponding depth images; the camera pose is determined using the ORB-SLAM3 algorithm. Based on the camera image and the camera pose, generate a semantic point cloud of the target agricultural scene in the global coordinate system; Semantic consistency is verified between the 3D semantic map of the target agricultural scene and the semantic point cloud of the target agricultural scene in the global coordinate system; If the semantic consistency check passes, point cloud matching is triggered, and it is determined whether the semantic matching degree between the semantic point cloud of the target agricultural scene in the global coordinate system and the corresponding point cloud in the 3D semantic map exceeds the set threshold. If the semantic matching degree exceeds the set threshold, camera pose correction is performed to complete the agricultural machinery navigation and positioning using simultaneous localization and mapping (SLAM) technology. 2.The agricultural machine navigation positioning method based on the three-dimensional semantic map of the agricultural scene according to claim 1, characterized in that, Constructing a 3D semantic map of the target agricultural scenario, specifically including: Acquire a multi-view image dataset of the target agricultural scene; the multi-view image dataset includes image data of the target agricultural scene from different perspectives. Key feature points of the multi-view image dataset were extracted using the scale-invariant feature transform algorithm. Based on the key feature points, the FLANN library is used to determine the preliminary sparse point cloud of the target agricultural scene; The preliminary sparse point cloud is mapped to three-dimensional space using triangulation to obtain the preliminary three-dimensional sparse point cloud of the target agricultural scene; Based on the preliminary 3D sparse point cloud, a multi-view stereo reconstruction algorithm is used to determine the 3D dense point cloud of the target agricultural scene; Based on the three-dimensional dense point cloud, a three-dimensional semantic map of the target agricultural scene is determined. 3.The agricultural machine navigation positioning method based on the three-dimensional semantic map of the agricultural scene according to claim 1, characterized in that, Based on the three-dimensional dense point cloud, a three-dimensional semantic map of the target agricultural scene is determined, specifically including: The random sample consensus algorithm is used to filter, remove outliers, remove noise, and downsample the 3D dense point cloud to obtain the processed 3D dense point cloud; Based on the processed 3D dense point cloud, semantic segmentation is performed using a point cloud segmentation model to determine the segmented 3D dense semantic point cloud; wherein, the point cloud segmentation model is obtained by training the PointNet++ model using a first training dataset; The segmented 3D dense semantic point cloud and its corresponding spatial coordinates are transformed to the UTM coordinate system to obtain the transformed 3D dense semantic point cloud; Based on the transformed 3D dense semantic point cloud, a 3D semantic map of the target agricultural scene is obtained using point cloud stitching technology, according to the viewpoint and acquisition time. 4.The agricultural machine navigation positioning method based on the three-dimensional semantic map of the agricultural scene according to claim 1, characterized in that, Based on the camera image and the camera pose, a semantic point cloud of the target agricultural scene in the global coordinate system is generated, specifically including: Based on the camera images, a semantic image is determined using a semantic segmentation model; wherein, the semantic segmentation model is obtained by training the SegFormer model using a second training dataset; The semantic image and the corresponding depth image are aligned using timestamps to obtain aligned semantic images and aligned depth images; The pixels and spatial coordinates of the aligned semantic image and the aligned depth image are associated to generate a local semantic point cloud in the camera coordinate system. Based on the camera pose, the local semantic point cloud in the camera coordinate system is transformed to the global coordinate system to obtain the semantic point cloud of the target agricultural scene in the global coordinate system. 5.The agricultural machine navigation positioning method based on the three-dimensional semantic map of the agricultural scene according to claim 1, characterized in that, If the semantic consistency check fails, the current camera pose is maintained. 6.The agricultural machine navigation positioning method based on the three-dimensional semantic map of the agricultural scene according to claim 1, characterized in that, If the semantic matching degree does not exceed the set threshold, the current camera pose is maintained. 7.The agricultural machine navigation positioning method based on the three-dimensional semantic map of the agricultural scene according to claim 1, characterized in that, The camera pose correction process specifically includes: The semantic point cloud in the global coordinate system that matches the category of the marker in the three-dimensional semantic map is selected to obtain the first candidate point cloud; The point clouds in the 3D semantic map that are consistent with the marker categories in the semantic point cloud in the global coordinate system are selected to obtain the second candidate point cloud; Based on the first candidate point cloud and the second candidate point cloud, the iterative nearest point algorithm is used to optimize the transformation matrix. The current camera pose is corrected based on the optimized transformation matrix.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene as described in any one of claims 1-7.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene as described in any one of claims 1-7.

10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the agricultural machinery navigation and positioning method based on a three-dimensional semantic map of an agricultural scene as described in any one of claims 1-7.