Multi-camera cascade agricultural machinery warehouse indoor GNSS high-precision positioning method

Through multi-camera cascade and RTK calibration technology, combined with the YOLOv5 detection model, high-precision GNSS positioning in the agricultural hangar is achieved, solving the problem of poor positioning accuracy caused by weak GNSS signals, reducing costs and improving positioning accuracy and speed.

CN120491129APending Publication Date: 2025-08-15SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510489123.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing indoor positioning technology has the problem of weak GNSS signal in agricultural machinery hangars, and the existing methods are costly or complex in maintenance.

Method used

Using the multi-camera cascade method, the camera is installed in the agricultural machinery hangar and arranged according to the field of view overlapping criteria, combined with RTK and total station to perform high-precision calibration, build the agricultural machinery antenna data set and train the YOLOv5 detection model, and realize the communication between multiple agricultural machinery and multiple cameras through the communication protocol, and perform high-precision GNSS positioning.

Benefits of technology

It realizes high-precision positioning of agricultural machinery hangars in a GNSS-free signal environment, covers the entire field of view, eliminates blind spots in the field of view, reduces equipment and usage costs, and improves positioning accuracy and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491129A_ABST
    Figure CN120491129A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-camera cascading agricultural machinery warehouse indoor GNSS high-precision positioning method, which comprises the following steps: S1, installing cameras at the top in an agricultural machinery warehouse without GNSS signals, arranging the cameras according to a criterion that view fields of the cameras are partially overlapped, and obtaining an indoor scene image; s2, obtaining GNSS coordinates of a plurality of points in the view field of the camera by using a total station and RTK combined dotting; s3, an agricultural machine antenna data set is constructed, a YOLOv5 detection model is trained, agricultural machine double-antenna identification is carried out through the detection model, and center pixel coordinates of the agricultural machine double-antenna identification are extracted; s4, carrying out coordinate recalculation on the points in the camera view field overlapping region, mapping to the next camera view field, and completing multi-camera view field splicing; and S5, in an agricultural machine library without GNSS signals, communication between multiple agricultural machines and multiple cameras is completed by using a communication protocol, and the agricultural machines receive GNSS positioning coordinates in real time. According to the method, RTK and total station combined dotting is used as a calibration point, the pixel coordinates of the agricultural machinery antenna are obtained through computer visual identification, and the GNSS coordinates and the course of the agricultural machinery antenna are calculated through coordinate conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of indoor positioning technology, and in particular relates to a multi-camera cascaded indoor GNSS high-precision positioning method for agricultural machinery depots. Background Art

[0002] With the advancement and development of technology, indoor positioning is increasingly required in more and more scenarios. However, due to weak indoor GNSS signals, positioning accuracy is poor or even impossible. Improving positioning accuracy has become a major challenge that needs to be overcome. While many indoor positioning technologies exist, such as ultrasonic and infrared, visual indoor positioning is more convenient and appropriate due to its maintenance and construction costs. Therefore, a low-cost, high-precision agricultural machinery positioning method is needed to provide reliable data support for positioning, route planning into the garage, and speed control. Summary of the Invention

[0003] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the existing technology and propose a multi-camera cascade GNSS high-precision positioning method for agricultural machinery hangars.

[0004] In order to achieve the above object, the present invention adopts the following technical solutions:

[0005] A multi-camera cascade GNSS high-precision positioning method for an agricultural machinery hangar comprises the following steps:

[0006] S1. Install cameras on the roof of an agricultural machinery hangar without GNSS signals and arrange the cameras so that their fields of view partially overlap to acquire images of the indoor scene.

[0007] S2, GNSS position calibration, using the total station and RTK to obtain the GNSS coordinates of several points within the camera's field of view as calibration points in the world coordinate system;

[0008] S3. Build an agricultural machinery antenna dataset and train a YOLOv5 detection model. When agricultural machinery enters the camera's field of view, the YOLOv5 detection model performs real-time dual-antenna identification of the agricultural machinery and extracts the center pixel coordinates of each. Based on the correspondence between the pixel coordinates of known calibration points and the true GNSS coordinates, a spatial mapping model is constructed. A projection matrix is established using the direct linear transformation method to perform height compensation, converting the agricultural machinery antenna pixel coordinates to GNSS coordinates to determine the position and heading of the agricultural machinery.

[0009] S4, multi-camera cascade, recalculate the coordinates of points in the overlapping area of the camera field of view, map them to the field of view of the next camera, and complete the multi-camera field of view stitching;

[0010] S5. In an agricultural machinery warehouse without GNSS signals, the communication protocol is used to complete the communication between multiple agricultural machinery and multiple cameras, so that the agricultural machinery can receive GNSS positioning coordinates in real time.

[0011] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0012] 1. The present invention uses cascaded multi-camera deployment to cover the entire field of view of the agricultural machinery hangar, eliminating blind spots, and uses high-precision centimeter-level joint calibration technology of RTK and total station to set high-precision GNSS calibration points in a GNSS-free environment.

[0013] 2. The present invention constructs a mapping model based on the correspondence between the pixel coordinates of known calibration points and the real GNSS coordinates, and performs height compensation on the plane coordinates of the agricultural machinery antenna to make up for the horizontal offset of the antenna in the pixel coordinates, thereby achieving high-precision conversion from the pixel coordinates of the agricultural machinery antenna to the GNSS coordinates.

[0014] 3. When cascading multiple cameras, confidence-weighted fusion of adjacent camera coordinate transformation positioning is performed based on the geometric distance from the agricultural machinery antenna to the camera optical center and its historical error to suppress positioning errors at the edge of the camera's field of view. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flow chart of the method of the present invention;

[0016] Figure 2 It is a scene schematic diagram of the method of the present invention;

[0017] Figure 3 It is a schematic diagram of the height compensation principle in the method of the present invention;

[0018] Figure 4 This is a schematic diagram of the principle of calculating the heading angle of agricultural machinery in the method of the present invention;

[0019] Figure 5 1 is a schematic diagram of the multi-camera cascade principle of the method of the present invention. DETAILED DESCRIPTION

[0020] The present invention will be described in further detail below with reference to the embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0021] Example

[0022] like Figure 1 and Figure 2 As shown, the present invention provides a multi-camera cascade indoor GNSS high-precision positioning method for agricultural machinery storage, comprising the following steps:

[0023] S1. Install cameras on the roof of an agricultural machinery hangar without GNSS signals and arrange the cameras so that their fields of view partially overlap to acquire images of the indoor scene.

[0024] In this embodiment, step S1 is specifically as follows:

[0025] Based on the geometric dimensions of the agricultural machinery shed (length L, width W, height H), with the shed roof as the reference plane, multiple wide-angle cameras are installed at equal intervals d, and the overlap rate of the fields of view of adjacent cameras is ensured to be greater than or equal to 20%, so as to form a full-coverage monitoring network. The calculation method of interval d is:

[0026]

[0027] Among them, θ H is the camera field of view, H is the hangar height;

[0028] When the agricultural machinery moves along a preset path, the camera is triggered to synchronously capture images at a frequency of 10Hz, covering the entire posture of the agricultural machinery and obtaining a large amount of training sample data for subsequent detection model training.

[0029] S2, GNSS position calibration, using a total station and RTK joint point marking to obtain the GNSS coordinates of several points within the camera's field of view as calibration points in the world coordinate system; in this embodiment, step S2 includes:

[0030] Select three non-collinear control points P1, P2, and P3 in an open outdoor area to avoid electromagnetic interference sources and obstructions;

[0031] RTK is set up at each control point, using carrier phase differential technology, connected to the local CORS station or self-built base station to obtain its fixed solution. After each point is continuously observed and fixed, the three-dimensional coordinates (X, Y, and Z) of each control point in the WGS84 coordinate system are recorded. RTK ,Y RTK ,Z RTK );

[0032] The total station is set up at point S, the boundary between indoor and outdoor areas, and ensures that the three outdoor control points can be observed at the same time. After accurately placing the level total station, set the prism constant and meteorological parameters, aim at the prisms of P1, P2, and P3 in turn, perform two rounds of observation, input the corresponding GNSS coordinates measured by RTK into the total station control system, and solve the three-dimensional coordinates of point S (X S ,Y S ,Z S ) and establish an independent construction coordinate system with point S as the origin.

[0033] In the agricultural machinery shed without GNSS signal, N calibration points are arranged in a grid to cover the camera field of view. The horizontal angle, zenith distance and slant distance of the N calibration points are measured in sequence from point S, and the three-dimensional coordinates (X and Y) of the independent coordinate system are calculated using the polar coordinate formula. local ,Y local ,Zlocal ), the calculation formula is:

[0034]

[0035] Among them, S is the slant distance from the total station to the target point, Z is the zenith distance, and H is the horizontal angle;

[0036] Based on the RTK coordinates of the outdoor control points P1, P2, and P3 and the coordinates measured by the total station, the seven-parameter conversion model (Bursa model) is used to convert the independent coordinate system to the WGS84 coordinate system:

[0037]

[0038] Among them, ΔX, ΔY, ΔZ are translation parameters, k is the scale factor, and R is the number of pixels containing w. x ,w y ,w z The rotation matrix of the calibration point coordinates (X local ,Y local ,Z local ) into the conversion model to achieve real-time output of GNSS coordinates (X GNSS ,Y GNSS ,Z GNSS ), which serves as the world coordinate system reference for camera calibration.

[0039] S3. Build an agricultural machinery antenna dataset and train a YOLOv5 detection model. When agricultural machinery enters the camera's field of view, the YOLOv5 detection model performs real-time dual-antenna identification of the agricultural machinery and extracts the center pixel coordinates of each. Based on the correspondence between the pixel coordinates of known calibration points and the true GNSS coordinates, a spatial mapping model is constructed. A projection matrix is established using the direct linear transformation method to perform height compensation, converting the agricultural machinery antenna pixel coordinates to GNSS coordinates to determine the position and heading of the agricultural machinery.

[0040] In this embodiment, constructing the agricultural machinery antenna dataset includes:

[0041] In agricultural machinery operation scenarios, cameras are used to collect image data of agricultural machinery under different lighting conditions, posture angles, and occlusion states. Labelme is used to annotate the bounding boxes and category labels of the agricultural machinery and agricultural machinery antennas. The annotated files are saved and converted into YOLO format txt files. The training set, validation set, and test set are divided into training, validation, and test sets in an 8:1:1 ratio to ensure uniform distribution of various scenes. The training set is enhanced through methods such as random rotation, brightness adjustment, and Gaussian noise.

[0042] In this embodiment, the YOLOv5 detection model is used to perform real-time dual-antenna recognition of agricultural machinery and extract the central pixel coordinates of the dual-antennas of agricultural machinery respectively, specifically:

[0043] The trained YOLOv5 detection model is used to process the input video stream frame by frame, perform dual antenna recognition, and output the bounding box coordinates (x min ,y min ,x max ,y max ), calculate the pixel coordinates of the center of the agricultural machinery dual antenna (u p ,v p ):

[0044]

[0045] Combined with the geometric relationship between the forward direction of the agricultural machinery head and the direction of the antenna connection, dynamic judgment is performed to distinguish the left and right antennas of the agricultural machinery, so as to facilitate the subsequent calculation of the heading angle and determine the heading of the agricultural machinery. Specifically:

[0046] If the vehicle's front direction is upward, then u p The smaller the coordinate, the left, u p The coordinate is larger on the right; the vehicle's front direction is to the right, then v p The smaller the coordinate, the left, v p The coordinate is large to the right; the vehicle's head is facing left, v p The coordinate is large on the left, v p The smaller the coordinate is, the right one is; the vehicle's head is pointing downward, so u p The coordinate is large on the left, u p The smaller the coordinate, the right;

[0047] The camera shoots the ground vertically and extracts the pixel coordinates of N feature points in the image (u i ,v i )(i=1,2,...,N, and N≥4), and record the real coordinates (X i ,Y i );

[0048] The perspective transformation (Perspective-n-Point, PnP) principle is used to establish the mapping relationship between the pixel coordinate system and the GNSS coordinate system. The homogeneous coordinate form is:

[0049]

[0050] in, is the homography matrix, with 8 degrees of freedom (normalized m 33 =1); S is the proportional factor, and after elimination, we get two equations:

[0051]

[0052] Rewrite the equation into homogeneous form and expand it to get two lines of equations for each point:

[0053]

[0054] The overdetermined equation is solved using the least squares method and the M matrix is decomposed by SVD.

[0055] After obtaining the M matrix, for any pixel point (u p ,v p ), and its GNSS plane coordinates are calculated by the following formula:

[0056]

[0057] In this embodiment, the height compensation is specifically performed as follows:

[0058] like Figure 3 As shown, when the target point P is at a height h from the ground, the plane homography model will directly project it to the ground, resulting in the pixel coordinates of the target point on the image (u p ,v p ) and vertically projected ground pixel coordinates (u _ ,v _ ) produces an offset, and the horizontal offset is:

[0059]

[0060] Therefore, height compensation is required. Through similar triangles and camera projection models, the relationship is obtained:

[0061]

[0062] Among them, H C is the camera installation height, h is the target detection agricultural machinery antenna height, (u p ,v p ) is the pixel coordinate of the agricultural machinery antenna on the image, (u _ ,v _ ) is the ground pixel coordinate vertically projected by the agricultural machinery antenna, (u c ,v c ) is the vertical pixel coordinate directly below the camera;

[0063] The vertical ground pixel coordinates of the agricultural machinery antenna point are calculated as follows:

[0064]

[0065] In step S3, the conversion of the agricultural machinery antenna pixel coordinates to the GNSS coordinates is specifically as follows:

[0066] Substitute the height-compensated antenna pixel coordinates into the GNSS coordinate calculation formula to obtain high-precision GNSS coordinate values. The final GNSS coordinates (X _ ,Y_ )for:

[0067]

[0068] Combined with the correct distinction between the left and right antennas of the agricultural machinery, the GNSS coordinates of the left and right antennas are calculated as (X _left ,Y _left ), (X _right ,Y _right ); The heading angle is defined as the angle between the forward direction of the agricultural machine and the true north direction, with the clockwise direction being the positive direction. Since the right antenna is the master antenna and the left antenna is the slave antenna, the baseline vector points to the left side of the agricultural machine. The formula for calculating the heading angle θ of the agricultural machine is:

[0069]

[0070] like Figure 4 The figure shows the principle diagram of calculating the heading angle of agricultural machinery.

[0071] S4, multi-camera cascade, recalculate the coordinates of points in the overlapping area of the camera field of view, map them to the field of view of the next camera, and complete the multi-camera field of view stitching; in this embodiment, specifically:

[0072] Install multiple cameras on top of agricultural machinery, leaving a 20% overlap between the fields of view of adjacent cameras;

[0073] Set G high-contrast markers in the overlapping area of the two cameras to ensure that the two adjacent cameras can accurately identify the markers and achieve cross-view feature matching consistency based on the feature descriptor similarity threshold; in the overlapping area, synchronously collect the center pixel coordinates (u 1,j ,v 1,j ) and (u 2,j ,v 2,j ) and record the GNSS coordinates (X 1,j ,Y 1,j );j=1,…,G,G≥4;

[0074] The coordinate transformation equation from the second camera to the first camera is:

[0075]

[0076] in,

[0077] Use matching points to construct the matrix equation A·T=B:

[0078]

[0079] t=[t 11 t 12… t 32 ] T

[0080] B=[X1 Y1 … Y M Y M ] T

[0081] Solve t by the least squares method and get T 1→2 Matrix, through T 1→2 Calculate the GNSS coordinates of the second camera:

[0082]

[0083] In order to distinguish the credibility differences of different locations and cameras, a camera confidence weighted fusion method is adopted; the distance from the target point to the camera optical center is:

[0084]

[0085] Among them, k represents the camera serial number, (u c,k ,v c,k ) is the vertical pixel coordinate of the k-th camera directly below the camera; σ = 0.1, is the smoothing factor;

[0086] Assuming that the first camera and the second camera output the GNSS coordinates of the target point as (X1, Y1) and (X2, Y2) respectively, and the weights are w1 and w2 respectively, the fusion result is:

[0087]

[0088] like Figure 5 FIG. 1 is a schematic diagram showing the principle of multi-camera cascade connection according to the method of the present invention.

[0089] S5. In an agricultural machinery depot without GNSS signals, a communication protocol is used to complete communication between multiple agricultural machinery and multiple cameras, so that the agricultural machinery can dynamically receive GNSS positioning coordinates in real time. In this embodiment, specifically:

[0090] When the agricultural machinery enters the working area of the agricultural machinery warehouse, the visual positioning camera deployed on the top establishes a communication link with the agricultural machinery through the MQTT protocol. The agricultural machinery terminal sends a positioning request message containing the device ID and the activation instruction purpose=1 to the server. This message is transmitted to the server through the topic;

[0091] Based on the preset camera calibration parameters and spatial coordinate conversion model, the server calculates the GNSS coordinates of the agricultural machinery in real time, and completes the two-way communication link verification by feedbacking a confirmation message consistent with the requested message; when the positioning is activated, the server encapsulates the GNSS coordinates and heading angle calculated by the visual indoor positioning in JSON format, and synchronizes the time to ensure timing consistency; after receiving the data, the agricultural machinery terminal obtains its GNSS coordinates by parsing the data in JSON format.

[0092] The present invention provides a multi-camera cascaded GNSS high-precision positioning method for an agricultural machinery hangar with high positioning accuracy and fast response speed. The method uses RTK and a total station to mark points indoors with high precision in advance, and obtains the GNSS coordinates of the points as calibration points. A spatial mapping model based on the correspondence between the pixel coordinates of the known calibration points and the real GNSS coordinates is constructed, and the GNSS coordinates of the agricultural machinery antenna are converted and calculated, and transmitted to the agricultural machinery. Dynamic positioning communication of multiple cameras and multiple agricultural machinery in a hangar without GNSS signals is realized, and autonomous navigation of the agricultural machinery is completed, with low equipment cost and usage cost.

[0093] It should also be noted that, in this specification, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or apparatus comprising the element.

[0094] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A multi-camera cascade GNSS high-precision positioning method for agricultural machinery storage, characterized by: The following steps are involved: S1. Install cameras on the roof of an agricultural machinery hangar without GNSS signals and arrange the cameras so that their fields of view partially overlap to acquire images of the indoor scene. S2, GNSS position calibration, using the total station and RTK to obtain the GNSS coordinates of several points within the camera's field of view as calibration points in the world coordinate system; S3. Build an agricultural machinery antenna dataset and train a YOLOv5 detection model. When agricultural machinery enters the camera's field of view, the YOLOv5 detection model performs real-time dual-antenna identification of the agricultural machinery and extracts the center pixel coordinates of each. Based on the correspondence between the pixel coordinates of known calibration points and the true GNSS coordinates, a spatial mapping model is constructed. A projection matrix is established using the direct linear transformation method to perform height compensation, converting the agricultural machinery antenna pixel coordinates to GNSS coordinates to determine the position and heading of the agricultural machinery. S4, multi-camera cascade, recalculate the coordinates of points in the overlapping area of the camera field of view, map them to the field of view of the next camera, and complete the multi-camera field of view stitching; S5. In an agricultural machinery warehouse without GNSS signals, the communication protocol is used to complete the communication between multiple agricultural machinery and multiple cameras, so that the agricultural machinery can receive GNSS positioning coordinates in real time.

2. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 1 is characterized in that: Step S1 is specifically as follows: Based on the geometric dimensions of the agricultural machinery shed, with the shed roof as the reference plane, multiple wide-angle cameras are installed at equal intervals d, and the overlap rate of adjacent camera fields of view is ensured to be greater than or equal to 20%, so as to form a full-coverage monitoring network. The calculation method of interval d is: Among them, θ H is the camera field of view, H is the hangar height; When the agricultural machinery moves along the preset path, the camera is triggered to synchronously capture images at a frequency of 10 Hz, covering the entire posture of the agricultural machinery and obtaining training sample data.

3. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 1 is characterized in that: Step S2 includes: Select three non-collinear control points P1, P2, and P3 in an open outdoor area to avoid electromagnetic interference sources and obstructions; RTK is set up at each control point, using carrier phase differential technology, connected to the local CORS station or self-built base station to obtain its fixed solution. After each point is continuously observed and fixed, the three-dimensional coordinates (X, Y, and Z) of each control point in the WGS84 coordinate system are recorded. RTK ,Y RTK ,Z RTK ); The total station is set up at point S, the boundary between indoor and outdoor areas, and ensures that the three outdoor control points can be observed at the same time. After accurately placing the level total station, set the prism constant and meteorological parameters, aim at the prisms of P1, P2, and P3 in turn, perform two rounds of observation, input the corresponding GNSS coordinates measured by RTK into the total station control system, and solve the three-dimensional coordinates of point S (X S ,Y S ,Z S ) and establish an independent construction coordinate system with point S as the origin.

4. A multi-camera cascaded GNSS high-precision positioning method for agricultural machinery hangars according to claim 3, characterized in that: Step S2 further includes: In the agricultural machinery shed without GNSS signal, N calibration points are arranged in a grid to cover the camera field of view. The horizontal angle, zenith distance and slant distance of the N calibration points are measured in sequence from point S, and the three-dimensional coordinates (X and Y) of the independent coordinate system are calculated using the polar coordinate formula. local ,Y local ,Z local ), the formula is: Among them, S is the slant distance from the total station to the target point, Z is the zenith distance, and H is the horizontal angle; Based on the RTK coordinates of the outdoor control points P1, P2, and P3 and the coordinates measured by the total station, a seven-parameter conversion model, namely the Bursa model, is used to convert the independent coordinate system to the WGS84 coordinate system: Among them, ΔX, ΔY, ΔZ are translation parameters, k is the scale factor, and R is the number of pixels containing w. x ,w y ,w z The rotation matrix of the calibration point coordinates (X local ,Y local ,Z local ) into the conversion model to achieve real-time output of GNSS coordinates (X GNSS ,Y GNSS ,Z GNSS ), which serves as the world coordinate system reference for camera calibration.

5. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 1 is characterized in that: In step S3, constructing the agricultural machinery antenna dataset includes: In agricultural machinery operation scenarios, cameras are used to collect agricultural machinery image data under different lighting conditions, posture angles, and occlusion states. Labelme is used to annotate the bounding boxes and category labels of the agricultural machinery and agricultural machinery antennas. The annotated files are saved and converted into YOLO format txt files. The training set, validation set, and test set are divided into 8:1:1 ratios to ensure uniform distribution of various scenes. The training set is enhanced through random rotation, brightness adjustment, and Gaussian noise methods.

6. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 4 is characterized in that: In step S3, the YOLOv5 detection model is used to perform real-time dual-antenna recognition of agricultural machinery and extract the central pixel coordinates of the dual-antenna of agricultural machinery respectively, specifically: The trained YOLOv5 detection model is used to process the input video stream frame by frame, perform dual antenna recognition, and output the bounding box coordinates (x min ,y min ,x max ,y max ), and calculate the central pixel coordinates of the agricultural machinery dual antennas (u p ,v p ): Combined with the geometric relationship between the forward direction of the agricultural machinery head and the direction of the antenna connection, dynamic judgment is performed to distinguish the left and right antennas of the agricultural machinery, so as to facilitate the subsequent calculation of the heading angle and determine the heading of the agricultural machinery. Specifically: If the vehicle's front direction is upward, then u p The smaller the coordinate, the left, u p The coordinates are large to the right; If the vehicle's front direction is to the right, then v p The smaller the coordinate, the left, v p The coordinate is large to the right; the vehicle's head is facing left, v p The coordinate is large on the left, v p The smaller the coordinate, the right; The vehicle's head is pointing downward, so u p The coordinate is large on the left, u p The smaller the coordinate, the right; The camera shoots the ground vertically and extracts the pixel coordinates of N feature points in the image (u i ,v i ), i = 1, 2, ..., N, and N ≥ 4, and record the real coordinates (X i ,Y i ); Using the perspective transformation principle, a mapping relationship between the pixel coordinate system and the GNSS coordinate system is established. Its homogeneous coordinate form is: in, is the homography matrix, with 8 degrees of freedom, normalized m 33 =1; S is the proportional factor. After elimination, we get two equations: Rewrite the equation into homogeneous form and expand it to get two lines of equations for each point: The overdetermined equation is solved using the least squares method and the M matrix is decomposed by SVD. After obtaining the M matrix, for any pixel point (u p ,v p ), and its GNSS plane coordinates are calculated by the following formula:

7. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 6 is characterized in that: In step S3, height compensation is performed as follows: When the target point P is at a height h from the ground, height compensation is required. Through similar triangles and the camera projection model, the relationship is obtained: Among them, H C is the camera installation height, h is the target detection agricultural machinery antenna height, (u p ,v p ) is the pixel coordinate of the agricultural machinery antenna on the image, (u - ,v - ) is the ground pixel coordinate vertically projected by the agricultural machinery antenna, (u c ,v c ) is the vertical pixel coordinate directly below the camera; The vertical ground pixel coordinates of the agricultural machinery antenna point are calculated as follows: In step S3, the conversion of the agricultural machinery antenna pixel coordinates to the GNSS coordinates is specifically as follows: Substitute the height-compensated antenna pixel coordinates into the GNSS coordinate calculation formula to obtain high-precision GNSS coordinate values. The final GNSS coordinates (X _ , Y _ )for:

8. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 7, characterized in that: Step S3 further includes: After distinguishing the left and right antennas of the agricultural machinery, the GNSS coordinates of the left and right antennas are calculated as (X _left ,Y _left ), (X _right ,Y _right ); The heading angle is defined as the angle between the forward direction of the agricultural machine and the true north direction, with the clockwise direction being the positive direction. Since the right antenna is the master antenna and the left antenna is the slave antenna, the baseline vector points to the left side of the agricultural machine. The formula for calculating the heading angle θ of the agricultural machine is:

9. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 1, characterized in that: Step S4 is specifically as follows: Install multiple cameras on top of agricultural machinery, leaving a 20% overlap between the fields of view of adjacent cameras; Set G high-contrast markers in the overlapping area of the two cameras to ensure that both adjacent cameras can accurately identify the markers, and achieve cross-view feature matching consistency based on the feature descriptor similarity threshold; In the overlapping area, the pixel coordinates of the center of the marker (u 1,j ,v 1,j ) and (u 2,j ,v 2,j ) and record the GNSS coordinates (X 1,j ,Y 1,j );j=1,…,G,G≥4; The coordinate transformation equation from the second camera to the first camera is: in, Use matching points to construct the matrix equation A·T=B: Solve t by the least squares method and get T 1→2 Matrix, through T 1→2 Calculate the GNSS coordinates of the second camera: In order to distinguish the credibility differences of different locations and cameras, a camera confidence weighted fusion method is adopted; the distance from the target point to the camera optical center is: Among them, k represents the camera serial number, (u c,k ,v c,k ) is the vertical pixel coordinate of the k-th camera directly below the camera; σ = 0.1, is the smoothing factor; Assuming that the first camera and the second camera output the GNSS coordinates of the target point as (X1, Y1) and (X2, Y2) respectively, and the weights are w1 and w2 respectively, the fusion result is:

10. The method for high-precision GNSS positioning in an agricultural machinery hangar with multiple cameras cascaded according to claim 1, characterized in that: Step S5 is specifically as follows: When the agricultural machinery enters the working area of the agricultural machinery warehouse, the visual positioning camera deployed on the top establishes a communication link with the agricultural machinery through the MQTT protocol. The agricultural machinery terminal sends a positioning request message containing the device ID and the activation instruction purpose=1 to the server. This message is transmitted to the server through the topic; The server calculates the GNSS coordinates of the agricultural machinery in real time based on the preset camera calibration parameters and spatial coordinate conversion model, and completes the two-way communication link verification by sending back a confirmation message that is consistent with the requested message. When positioning is activated, the server encapsulates the GNSS coordinates and heading angles solved by visual indoor positioning in JSON format and synchronizes the time to ensure timing consistency; After receiving the data, the agricultural machinery terminal obtains its GNSS coordinates by parsing the data in JSON format.