Vehicle-mounted camera pose compensation calibration method and system and electronic equipment
By acquiring vehicle coordinates and camera images in real time, a rotation matrix is constructed to compensate for the pose of the onboard camera, which solves the problem of unstable calibration of the onboard camera and improves the navigation accuracy and stability of autonomous driving of agricultural machinery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-13
AI Technical Summary
The rotational calibration of vehicle-mounted cameras in the existing technology is unstable, especially in agricultural machinery. Due to uneven ground and yaw angle fluctuations, the coordinate system is dynamically unstable, which affects the navigation accuracy and stability of the autonomous driving system.
By acquiring the vehicle coordinates of agricultural machinery in real time and converting them into a baseline in the target coordinate system, acquiring the current frame image of the vehicle-mounted camera and converting it into seedling line coordinates in the target coordinate system, constructing a rotation matrix to perform pose compensation for the vehicle-mounted camera, and using judgment parameters to determine whether the calibration is successful, accurate pose compensation for the vehicle-mounted camera is achieved.
It improves the accuracy and reliability of rotation matrix calibration, eliminates the left and right lateral pose errors during vehicle camera installation, enhances the path tracking accuracy and navigation stability of agricultural machinery's autonomous driving, and adapts to dynamic environmental changes.
Smart Images

Figure CN121661612A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of intelligent agricultural machinery, and in particular to a pose compensation calibration method, system, and electronic device for a vehicle-mounted camera. Background Technology
[0002] With the continuous improvement of agricultural automation, agricultural machinery (such as tractors) widely uses vision sensors to identify crop rows during field operations in order to achieve high-precision automatic navigation and path tracking control. However, under actual installation conditions, due to mechanical assembly deviations of the camera, bracket deformation, and installation angle errors, there is a fixed rotational deviation between the camera coordinate system and the vehicle body coordinate system.
[0003] This rotational deviation causes directional errors in the visual recognition results after conversion to the vehicle coordinate system, leading to deviations in the navigation path generated by the autonomous driving system from the actual driving direction, severely impacting operational accuracy and navigation stability. Even if the vision system can accurately identify the line position, without effective correction of the rotational relationship between the camera coordinate system and the vehicle coordinate system, the recognition results still cannot maintain consistency with the vehicle's actual direction of travel.
[0004] However, in existing technologies, the calibration of rotational relationships is usually performed by sampling fixed points. The main difficulty in implementing this method stems from the dynamic interference during vehicle operation: on the one hand, the actual direction of the vehicle's movement is constantly changing due to uneven ground and the straightness of driving, resulting in unstable calibration results; on the other hand, the dynamic instability of the coordinate system caused by yaw angle fluctuations during travel further increases the complexity of calibration parameter estimation. Summary of the Invention
[0005] The technical problem to be solved by this disclosure is to overcome the instability of the calibration of rotational relationships using fixed points in the prior art, and to provide a pose compensation calibration method, system and electronic device for vehicle-mounted cameras.
[0006] This disclosure solves the above-mentioned technical problems through the following technical solution:
[0007] Firstly, a pose compensation calibration method for a vehicle-mounted camera is provided, applicable to agricultural machinery. The pose compensation calibration method includes the following steps:
[0008] Real-time acquisition of the vehicle coordinates of agricultural machinery during the preset travel distance;
[0009] The vehicle coordinates are converted to coordinates in the target coordinate system to obtain the baseline in the target coordinate system;
[0010] The current frame image of the vehicle-mounted camera is acquired, and the coordinates of the seed line in the current frame image are converted into coordinates in the target coordinate system to obtain the first seed line in the target coordinate system.
[0011] A rotation matrix is constructed based on the baseline and the first seed line; wherein, the rotation matrix is used to compensate the first seed line and align the direction of the compensated first seed line with the baseline, so as to perform pose compensation for the vehicle-mounted camera.
[0012] Optionally, the pose compensation calibration method further includes:
[0013] At least one judgment parameter is obtained based on the rotation matrix;
[0014] The calibration of the rotation matrix is determined based on the threshold corresponding to the judgment parameter.
[0015] Optionally, the judgment parameter includes the average alignment error;
[0016] The pose compensation calibration method further includes:
[0017] Multiple historical frame images of the vehicle-mounted camera are acquired, and the seed line coordinates in the historical frame images are converted into coordinates under the target coordinate system to obtain multiple second seed lines under the target coordinate system.
[0018] The step of obtaining at least one judgment parameter based on the rotation matrix specifically includes:
[0019] Multiple third seedlings are obtained after pose compensation based on multiple second seedlings and the rotation matrix;
[0020] The average alignment error corresponding to each third seed line is calculated by comparing multiple third seed lines with the baseline.
[0021] The step of determining whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter specifically includes:
[0022] Based on the comparison results of multiple average alignment errors with preset errors, it is determined whether the calibration of the rotation matrix is successful.
[0023] Optionally, the judgment parameter includes the angle deviation value;
[0024] The step of obtaining at least one judgment parameter based on the rotation matrix specifically includes:
[0025] The angular deviation value is calculated based on the rotation matrix and the initial rotation matrix, wherein the initial rotation matrix is the initial setting during installation;
[0026] The step of determining whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter specifically includes:
[0027] Based on the comparison between the angle deviation value and the preset angle, it is determined whether the calibration of the rotation matrix is successful.
[0028] Optionally, the judgment parameters include the changing trend of the target point;
[0029] The step of obtaining at least one judgment parameter based on the rotation matrix specifically includes:
[0030] In response to the detection of the same target point in multiple historical frame images, the coordinates of the target point are compensated according to the rotation matrix;
[0031] A position sequence is constructed based on the multiple coordinates of the target point after compensation, and the trend of change is calculated.
[0032] The step of determining whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter specifically includes:
[0033] Based on the comparison between the stated trend and the preset trend, it is determined whether the calibration of the rotation matrix was successful.
[0034] Optionally, the pose compensation calibration method further includes:
[0035] In response to the failure of the rotation matrix calibration, it is detected whether the total travel distance of the agricultural machinery exceeds the preset total distance;
[0036] In response to the total travel distance being less than the preset total travel distance, the agricultural machinery is controlled to continue traveling, and the step of obtaining the vehicle coordinates of the agricultural machinery in real time during the preset travel distance is executed again.
[0037] Secondly, a pose compensation calibration system for a vehicle-mounted camera is provided for application in agricultural machinery. The pose compensation calibration system includes:
[0038] The vehicle coordinate acquisition module is used to acquire the vehicle coordinates of agricultural machinery in real time during a preset travel distance;
[0039] The vehicle coordinate transformation module is used to convert the vehicle coordinates into coordinates in the target coordinate system to obtain the baseline in the target coordinate system.
[0040] The image acquisition module is used to acquire the current frame image from the vehicle-mounted camera;
[0041] The seedling line coordinate transformation module is used to convert the seedling line coordinates in the current frame image into coordinates in the target coordinate system to obtain the first seedling line in the target coordinate system.
[0042] A rotation matrix construction module is used to construct a rotation matrix based on the baseline and the first seed line; wherein, the rotation matrix is used to compensate the first seed line and align the direction of the compensated first seed line with the baseline to perform pose compensation for the vehicle-mounted camera.
[0043] Optionally, the pose compensation calibration system further includes:
[0044] A judgment parameter acquisition module is used to obtain at least one judgment parameter based on the rotation matrix;
[0045] The calibration judgment module is used to determine whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter.
[0046] Optionally, the judgment parameter includes the average alignment error;
[0047] The image acquisition module is also used to acquire multiple historical frame images from the vehicle-mounted camera;
[0048] The seedling line coordinate transformation module is also used to convert the seedling line coordinates in the historical frame image into coordinates in the target coordinate system, so as to obtain multiple second seedling lines in the target coordinate system;
[0049] The parameter acquisition module specifically includes:
[0050] The compensation unit is used to obtain multiple third seed lines after pose compensation based on multiple second seed lines and the rotation matrix;
[0051] An error calculation unit is used to compare multiple third lines with the baseline and calculate the average alignment error corresponding to each third line.
[0052] The calibration judgment module is specifically used to determine whether the calibration of the rotation matrix is successful based on the comparison results of multiple average alignment errors and preset errors.
[0053] Optionally, the judgment parameter includes the angle deviation value;
[0054] The parameter acquisition module specifically includes:
[0055] An angle deviation calculation unit is used to calculate the angle deviation value based on the rotation matrix and the initial rotation matrix, wherein the initial rotation matrix is the initial setting during installation;
[0056] The calibration judgment module is specifically used to determine whether the calibration of the rotation matrix is successful based on the comparison result between the angle deviation value and the preset angle.
[0057] Optionally, the judgment parameters include the changing trend of the target point;
[0058] The compensation unit is also configured to compensate the coordinates of the target point according to the rotation matrix in response to detecting the presence of the same target point in multiple historical frame images;
[0059] The parameter acquisition module specifically includes:
[0060] The trend calculation unit is used to construct a position sequence based on multiple coordinates of the target point after compensation and to calculate the trend.
[0061] The calibration judgment module is specifically used to determine whether the calibration of the rotation matrix is successful based on the comparison result between the change trend and the preset change trend.
[0062] Optionally, the pose compensation calibration system further includes:
[0063] The distance detection module is used to detect whether the total distance traveled by the agricultural machinery exceeds the preset total distance in response to the failure of the rotation matrix calibration.
[0064] The driving control module is used to control the agricultural machinery to continue driving in response to the total driving distance being less than the preset total driving distance, and to execute the step of obtaining the vehicle coordinates of the agricultural machinery in real time during the preset journey again.
[0065] Thirdly, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein the processor executes the computer program to implement the pose compensation calibration method for a vehicle-mounted camera as described in the first aspect.
[0066] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the pose compensation calibration method for a vehicle-mounted camera as described in the first aspect.
[0067] Fifthly, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the pose compensation calibration method for an on-board camera as described in the first aspect.
[0068] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.
[0069] The positive and progressive effects of this disclosure are as follows: By acquiring the vehicle body coordinates of agricultural machinery in real time during a preset journey, the dynamic coordinates of the vehicle body are obtained. These coordinates are then converted into coordinates in the target coordinate system to obtain the required baseline, which serves as a directional reference. This avoids the unreliability inherent in existing technologies that use fixed points as static calibration references, which are easily affected by ground flatness and driving straightness. Simultaneously, the current frame image of the vehicle-mounted camera is acquired, and the seedling line coordinates in the current frame image are converted into coordinates in the target coordinate system to obtain the first seedling line in the target coordinate system. A rotation matrix is constructed based on the baseline and the first seedling line to achieve pose compensation for the vehicle-mounted camera, thereby improving the accuracy and reliability of the rotation matrix calibration and eliminating the left-right lateral pose error mainly caused by yaw angle during vehicle-mounted camera installation. Attached Figure Description
[0070] Figure 1 The flowchart shows a pose compensation calibration method for a vehicle-mounted camera provided in Embodiment 1.
[0071] Figure 2 This is a partial flowchart of a pose compensation calibration method for a vehicle-mounted camera provided in Embodiment 1.
[0072] Figure 3 This is a partial flowchart of a pose compensation calibration method for a vehicle-mounted camera provided in Embodiment 1.
[0073] Figure 4 This is a partial flowchart of a pose compensation calibration method for a vehicle-mounted camera provided in Embodiment 1.
[0074] Figure 5 This is a partial flowchart of a pose compensation calibration method for a vehicle-mounted camera provided in Embodiment 1.
[0075] Figure 6 The flowchart shows a pose compensation calibration method for a vehicle-mounted camera provided in Embodiment 1.
[0076] Figure 7 This is a schematic diagram of a pose compensation calibration system for a vehicle-mounted camera provided in Embodiment 2.
[0077] Figure 8 This is a schematic diagram of another vehicle-mounted camera pose compensation calibration system provided in Embodiment 2.
[0078] Figure 9 This is a schematic diagram of some modules of a vehicle-mounted camera pose compensation calibration system provided in Embodiment 2.
[0079] Figure 10 This is a schematic diagram of another vehicle-mounted camera pose compensation calibration system provided in Embodiment 2.
[0080] Figure 11 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3. Detailed Implementation
[0081] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.
[0082] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not be construed as an unnecessary limitation. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0083] Example 1
[0084] Figure 1 This embodiment provides a flowchart of a pose compensation calibration method for a vehicle-mounted camera, applied to agricultural machinery. The pose compensation calibration method includes the following steps S11-S14:
[0085] S11. Real-time acquisition of the vehicle coordinates of the agricultural machinery during the preset travel distance. In this embodiment, the agricultural machinery can be a tractor, and the preset travel distance can be 10 meters. Therefore, the vehicle coordinates of the tractor during its 10-meter journey are acquired in real time. In specific implementations, the vehicle coordinates of the tractor during its actual 10-meter travel distance can also be manually acquired as the original reference. When the tractor travels less than the set 10 meters, the pose compensation calibration system will continuously accumulate trajectory points to provide a data basis for subsequent accurate fitting. In other embodiments, the preset travel distance can be set according to specific needs.
[0086] S12. Convert the vehicle coordinates to coordinates in the target coordinate system to obtain a baseline in the target coordinate system. The target coordinate system is a global coordinate system. In this embodiment, the target coordinate system can be the NE-G coordinate system. The vehicle coordinates collected under the preset travel trajectory are all converted to coordinates in the NE-G coordinate system to form a stable and unified baseline. Therefore, this embodiment, by unifying the dynamic agricultural machinery travel trajectory into the target coordinate system, constructs a relatively stable reference direction unaffected by absolute position, providing a reliable spatial reference for the calibration of the rotation matrix. In specific implementation, the vehicle coordinates corresponding to the starting position of the agricultural machinery in the preset travel can be used as the origin of the coordinate system. The actual travel trajectory of the agricultural machinery is recorded and fitted into a straight line in the NE-G coordinate system as a direction baseline.
[0087] S13. Acquire the current frame image from the vehicle-mounted camera, and convert the seedling line coordinates in the current frame image into coordinates under the target coordinate system to obtain the first seedling line under the target coordinate system. Specifically, identify crop seedling lines in real time, convert the identified seedling line point cloud to the northeast coordinate system with the first frame as the origin, and fit the identified seedling line point cloud in the current frame image into a straight line in the northeast coordinate system to obtain the first seedling line under the northeast coordinate system.
[0088] In this embodiment, the current frame image is a two-dimensional image. The coordinate transformation process for obtaining the first seed line involves a chain transformation of multiple coordinate systems. The core principle is to map the pixels in the two-dimensional image to the target coordinate system in the three-dimensional world through a series of rigid body transformations and perspective transformations. The target coordinate system is the N-E coordinate system. The complete transformation chain is as follows:
[0089] Pixel coordinate system → Image coordinate system → Camera coordinate system → Agricultural machinery body coordinate system → Northeast coordinate system.
[0090] The specific coordinate transformation steps are as follows:
[0091] Step 1: Transformation from pixel coordinate system to image coordinate system. Step 1 aims to eliminate the physical size deviation of pixels caused by the manufacturing process of the vehicle camera, and convert the discrete pixel coordinates (x, y) into continuous image coordinates (u, v) measured in physical units (meters).
[0092] The coordinate transformation formula is:
[0093]
[0094]
[0095] Represented in matrix form, it can be...
[0096]
[0097] Where (u, v): coordinates in the image coordinate system (unit: meters); (x, y): coordinates in the pixel coordinate system (unit: pixels); (u0, v0): coordinates of the principal point of the image, i.e., the intersection of the optical axis and the image plane; dx, dy: physical dimensions of each pixel in the x and y directions (unit: meters / pixel). Additionally, "optical center" refers to the straight line perpendicular to the image plane from the optical center (also known as the projection center) of the vehicle-mounted camera, and the principal point of the image is equivalent to the exact center of the image.
[0098] Step 2: Transformation from image coordinate system to camera coordinate system. This step is the reverse process of perspective projection. Using the intrinsic parameter matrix of the vehicle camera, the two-dimensional image points are projected in reverse into the three-dimensional space in front of the camera, located on the camera's normalized plane (Z=1).
[0099] The coordinate transformation formula is:
[0100]
[0101]
[0102]
[0103] Represented in matrix form, it can be...
[0104]
[0105] Among them, the intrinsic parameter matrix (Xc, Yc, Zc): 3D coordinates in the camera coordinate system, (u, v): coordinates in the image coordinate system, (u0, v0): coordinates of the principal point of the image; fx, fy: normalized focal length of the camera in the x or y direction (fx=f / dx, fy=f / dy).
[0106] Step 3: Transformation from camera coordinate system to agricultural machinery coordinate system. This step transforms the points from the camera coordinate system to the agricultural machinery coordinate system centered on the agricultural machinery's centroid or IMU (Inertial Measurement Unit) using camera extrinsic parameters (rotation matrix and translation vector). This is the core step in correcting installation deviations of the vehicle-mounted camera.
[0107] The coordinate transformation formula is:
[0108] In homogeneous coordinate system form, it can be expressed as follows:
[0109]
[0110] Among them, (X) b Y b Z b ): Coordinates in the agricultural machinery's body coordinate system. Rcb A 3×3 rotation matrix is used to describe the attitude relationship between the camera coordinate system and the agricultural machinery body coordinate system. cb : A 3×1 translation vector used to describe the position of the camera origin in the agricultural machinery's coordinate system. T cb A 4×4 rigid body transformation matrix, used to describe the transformation from the camera coordinate system to the agricultural machinery body coordinate system.
[0111] Step 4: Transformation from the agricultural machinery's body coordinate system to the northeast-northeast coordinate system. This step utilizes the global pose of the agricultural machinery, specifically from the installed GNSS (Global Navigation Satellite System) or IMU, to transform the points in the local agricultural machinery body coordinate system to the global navigation coordinate system with the starting point as the origin, i.e., the northeast-northeast coordinate system.
[0112] The coordinate transformation formula is:
[0113]
[0114] In homogeneous coordinate system form, it can be expressed as follows:
[0115]
[0116] Among them, (X) n Y n Z n ): Coordinates in the northeast coordinate system. R bn : The rotation matrix from the agricultural machinery body coordinate system to the northeast-northeast coordinate system. t bn : The location of the origin of the agricultural machinery's coordinate system in the northeast-northeast coordinate system. bn : Used to describe the transformation from the agricultural machinery body coordinate system to the northeast coordinate system.
[0117] Based on the above steps, the complete transformation formula from the pixel coordinate system to the northeast-northeast coordinate system can be obtained:
[0118] P n =T bn ×T cb ×K -1 ×P
[0119] in, (x, y) represents the coordinates in the pixel coordinate system. , (X n Y n Z n ) represents the coordinates in the northeast coordinate system.
[0120] In a specific example, the seedling line information is first identified using a visual sensor. This seedling line information is then transformed from the image coordinate system to the same northeast-northeast coordinate system as the baseline, also known as the NED coordinate system. The seedling line identification process involves receiving the seedling line point set output by the visual sensor, and using the camera's intrinsic and extrinsic parameters to transform these image points into the NED coordinate system, thereby forming seedling line data that can be spatially compared with the baseline. The principle behind this process is coordinate system unification, placing the visually perceived local seedling line information and the vehicle's global trajectory in the same spatial dimension, laying the data foundation for subsequent calculations of the rotational relationship between the vehicle and camera coordinate systems.
[0121] S14. A rotation matrix is constructed based on the baseline and the first seedling line; wherein, the rotation matrix is used to compensate for the first seedling line and align the direction of the compensated first seedling line with the baseline, so as to perform pose compensation for the vehicle-mounted camera. This rotation matrix also represents the rotation angle between the vehicle-mounted camera and the vehicle coordinate system. If the rotation matrix meets the requirements, it can also perform pose compensation for subsequent images obtained by the vehicle-mounted camera to meet the needs of agricultural machinery field operations.
[0122] In this embodiment, based on the baseline and the first guideline in the NED coordinate system, a rotation matrix that aligns their directions is calculated using spatial geometric fitting or optimization algorithms (such as the least squares method). Utilizing the principle of spatial geometric transformation, an optimal rotation transformation is sought to maximize the alignment between the visually perceived guideline direction and the actual driving direction of the vehicle in the global coordinate system, thereby reversing the fixed rotational deviation of the vehicle-mounted camera installation.
[0123] In a specific example, the vehicle body coordinates of the starting position of the agricultural machinery in the preset journey are taken as the origin of the coordinate system. A mathematical model is established with the goal of finding the rotation matrix. The rotation matrix is obtained by solving the mathematical model using the least squares method.
[0124] In agricultural machinery vision navigation, given the fixed rotational deviation between the camera coordinate system and the vehicle coordinate system, let v be the seedling direction vector observed in the camera coordinate system transformed to the northeast coordinate system. c The desired baseline direction vector in the vehicle coordinate system is v when transformed to the northeast coordinate system. b The relationship between the two is: v b =R·v c , where R is the rotation matrix to be solved.
[0125] In the specific solution process, the rotation axis is a fixed straight line around which the camera coordinate system rotates relative to the vehicle coordinate system in three-dimensional space. If the rotation axis of the line does not pass through the origin, assuming the unit direction vector of the rotation axis is u=(u, v, w), and the rotation axis passes through the point p=(a, b, c), and assuming the target rotation angle is θ, then the following transformation is required:
[0126] 1. Translate point p on the axis of rotation to the origin:
[0127]
[0128] II. Rotate about the x-axis by an angle -α, so that the axis of rotation lies in the xOz plane: Definition:
[0129]
[0130] 3. Rotate by an angle β around the y-axis until the axis of rotation coincides with the z-axis:
[0131]
[0132] IV. Rotate the target angle θ around the z-axis:
[0133]
[0134] 5. Perform the inverse transformation of step 3, rotate around the y-axis by an angle of −β, and restore the coordinate system:
[0135]
[0136] VI. Perform the inverse transformation of step 2, rotate by an angle α around the x-axis, and restore the coordinate system:
[0137]
[0138] 7. Move the axis of rotation back to its original position:
[0139]
[0140] Therefore, the complete transformation matrix M is obtained:
[0141]
[0142] This transformation is performed in homogeneous coordinates, and M is a 4×4 matrix. However, in agricultural machinery calibration, the primary concern is alignment, and translation components can be ignored. Therefore, the top-left 3×3 submatrix of the transformation matrix M is the required rotation matrix R:
[0143] Therefore, in a specific embodiment, the rotation axis direction u=(u, v, w) and rotation angle θ can be solved by fitting the first seedling point set and the baseline point set according to the least squares method, and then a complete rotation matrix R can be constructed.
[0144] Therefore, the pose compensation calibration method for vehicle-mounted cameras provided in this embodiment can accurately estimate and compensate for the rotational relationship between the camera and the vehicle coordinate system. In specific applications, the pose compensation calibration method can be applied to agricultural machinery vision navigation systems. Due to mechanical assembly deviations, bracket deformation, and installation angle errors in actual installation, the camera mainly exhibits yaw angle errors, also known as heading angles, which correspond to the left and right lateral installation errors of the camera. This pose compensation calibration method compensates for the camera's pose by constructing an accurate rotation matrix, thereby eliminating the left and right lateral installation errors of the camera and improving the overall accuracy and robustness of the agricultural machinery vision navigation system. Originally, yaw angle errors would cause directional deviations in the recognition results of the agricultural machinery vision navigation system after conversion to the vehicle coordinate system, leading to deviations in the navigation path generated during autonomous driving from the actual seedling path, affecting operational accuracy and navigation stability. However, after the accurate rotation matrix calculated in this embodiment is used to compensate for the pose of the recognition results, the accuracy of the navigation path can be ensured, thus meeting the requirements for long-term reliable operation of agricultural machinery autonomous driving systems in complex field environments such as straight lines or curves.
[0145] In this embodiment, the vehicle body coordinates of the agricultural machinery are acquired in real time during a preset journey to obtain the dynamic coordinates of the vehicle body. These coordinates are then converted into coordinates in the target coordinate system to obtain the required baseline, which serves as the direction reference. This avoids the unreliability of using fixed points as calibration references in existing technologies. Simultaneously, the current frame image of the vehicle-mounted camera is acquired, and the seedling line coordinates in the current frame image are converted into coordinates in the target coordinate system to obtain the first seedling line in the target coordinate system. A rotation matrix is constructed based on the baseline and the first seedling line to perform pose compensation for the vehicle-mounted camera, thereby improving the accuracy and reliability of the rotation matrix calibration and eliminating the left-right lateral pose error mainly caused by yaw angle during camera installation. Specifically, the rotation matrix calibration can effectively correct the rotational deviation between the vehicle-mounted camera and the vehicle body coordinate system, significantly improving the path tracking accuracy and lateral control stability of the agricultural machinery's automatic driving system. In other embodiments, this pose compensation calibration method can be applied not only to straight paths but also to curved terrain, exhibiting good terrain and working condition adaptability, maintaining calibration stability, and ensuring the path accuracy of automatic driving.
[0146] In one alternative implementation, such as Figure 2 As shown, after step S14, the following steps are also included:
[0147] S15. Obtain at least one judgment parameter based on the rotation matrix; In this embodiment, different judgment parameters are obtained according to the rotation matrix to judge the quality of a single calibration result and the calibration stability under different working conditions, thereby quantitatively evaluating the effect of the rotation matrix calibration.
[0148] S16. Determine whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter.
[0149] For example, the coordinates of the vehicle body can be obtained based on the agricultural machinery's movement under different working conditions, thereby obtaining the coordinates of the baseline in the target coordinate system and the coordinates of the first seedling line. This allows for the calculation of the rotation matrix corresponding to different working conditions. The rotation matrix is then checked for successful calibration by judging parameters, thus determining the stability of the calibration under different working conditions. If the rotation matrix calibration fails, step S11 is re-executed to recalculate and obtain a new rotation matrix. Therefore, this implementation supports online real-time calibration, enabling real-time calibration and deviation correction during agricultural machinery operation, adapting to dynamic changes in the field environment, and improving the automation and reliability of the pose compensation calibration system for long-term operation.
[0150] In one alternative implementation, Figure 3 This is a partial flowchart of a pose compensation calibration method, where the judgment parameters include the average alignment error. The average alignment error can be used to evaluate the accuracy of rotation matrix calibration.
[0151] The steps preceding step S15 also include:
[0152] S150. Acquire multiple historical frame images from the vehicle-mounted camera, and convert the seedline coordinates in the historical frame images into coordinates under the target coordinate system to obtain multiple second seedlines under the target coordinate system. For example, acquire the first 20 historical frame images to obtain the corresponding second seedlines under the northeast-northeast coordinate system.
[0153] Step S15 specifically includes:
[0154] S151. Obtain multiple third seed lines after pose compensation based on multiple second seed lines and the rotation matrix; for example, use the calculated rotation matrix to perform rotation transformation on the second seed lines in 20 historical frame images to obtain the third seed lines after pose compensation.
[0155] S152. Compare the plurality of third lines with the baseline to calculate the average alignment error corresponding to each third line. In this embodiment, the average alignment error is obtained by comparing the third lines after rotation matrix compensation with the baseline. Specifically, the average alignment error can be the average absolute error or root mean square error calculated point by point, or it can be the average distance calculated based on point computing.
[0156] Step S16 specifically includes: S161, determining whether the calibration of the rotation matrix is successful based on the comparison results of multiple average alignment errors and preset errors.
[0157] In this embodiment, the rotation matrix is determined by comparing multiple average alignment errors with a preset error, thus improving the accuracy of rotation matrix calibration. In specific implementation, the preset error can be 0.04. When multiple average alignment errors are all less than 0.04, the rotation matrix calibration is considered successful. Alternatively, the mean of these multiple average alignment errors can be calculated; when the mean is less than 0.04, the rotation matrix calibration is considered successful. Alternatively, a threshold can be set; when the number of average alignment errors less than 0.04 exceeds this threshold, the rotation matrix calibration is considered successful. Alternatively, when the percentage of average alignment errors less than the preset error exceeds a pre-set percentage threshold, the rotation matrix calibration is considered successful. Alternatively, the mode of multiple average alignment errors can be calculated; when the mode is less than the preset error, the rotation matrix calibration is considered successful. Alternatively, the median of multiple average alignment errors can be calculated; when the median is less than the preset error, the rotation matrix calibration is considered successful.
[0158] In one alternative implementation, Figure 4 This is a partial flowchart of a pose compensation calibration method, wherein the judgment parameters include angle deviation values; the angle deviation values can evaluate whether the calibration of the rotation matrix is consistent.
[0159] Step S15 specifically includes: S153, calculating the angle deviation value based on the rotation matrix and the initial rotation matrix, wherein the initial rotation matrix is the initial setting during installation; the initial rotation matrix is the factory setting of the vehicle camera, and the angle deviation value directly reflects the comprehensive deviation of the three Euler angles between the camera coordinate system and the vehicle coordinate system. The smaller the value, the more accurate the attitude estimation.
[0160] Step S16 specifically includes: S162, determining whether the calibration of the rotation matrix is successful based on the comparison result between the angle deviation value and the preset angle. In this embodiment, determining the rotation matrix by comparing the angle deviation value with the preset angle improves the accuracy of the rotation matrix calibration. Specifically, if the angle deviation value is less than the preset angle, the calibration of the rotation matrix is successful; if the angle deviation value is not less than the preset angle, the calibration of the rotation matrix fails. In specific implementation, the preset angle can be 1°; if the angle deviation value is less than 1°, the calibration of the rotation matrix is successful.
[0161] In one alternative implementation, Figure 5This is a partial flowchart of a pose compensation calibration method, wherein the judgment parameters include the changing trend of the target point; the changing trend can be used to evaluate whether the calibration of the rotation matrix has stability.
[0162] Step S15 specifically includes:
[0163] S154. In response to detecting the presence of the same target point in multiple historical frame images, the coordinates of the target point are compensated according to the rotation matrix. In specific implementation, the same target point in consecutive historical frame images is detected to obtain the coordinates of multiple target points in the NE-G coordinate system, and then the rotation matrix is used to compensate the coordinates of these multiple target points to obtain the compensated coordinates.
[0164] S155. Construct a position sequence based on the multiple coordinates of the compensated target point, and calculate the change trend. Specifically, the change trend includes variance, which can be calculated using the sliding window method to quantify the jitter amplitude. The rate of position change over time is fitted using time-series linear regression. Variance measures the stability of the target point's position; a smaller variance indicates less jitter. This variance assesses the dynamic consistency of the vehicle-mounted camera in the time dimension and is a key basis for judging the effectiveness of pose compensation. In other specific implementations, the change trend is a curve drawn based on the position sequence. The relationship between this curve and a preset curve corresponding to a preset change trend can be analyzed to determine whether the rotation matrix calibration is successful. The closer the curve corresponding to the change trend is to the preset curve, the more accurate the rotation matrix calibration.
[0165] Step S16 specifically includes: S163, determining whether the calibration of the rotation matrix is successful based on the comparison result between the changing trend and the preset changing trend. In this embodiment, determining the rotation matrix by comparing the changing trend with the preset changing trend improves the accuracy of the rotation matrix calibration. For example, if the changing trend is less than the preset changing trend, the calibration of the rotation matrix is considered successful; if the changing trend is not less than the preset changing trend, the calibration of the rotation matrix is considered unsuccessful. In specific implementation, the changing trend includes variance, and the corresponding preset changing trend is 0.1. When the variance is less than 0.1, it indicates that the calibration of the rotation matrix is successful.
[0166] In practice, the judgment parameters can include at least one of the following: average alignment error, angle deviation value, and the changing trend of the target point. Scenario 1: If the judgment parameter is one of the three, then the success of the rotation matrix calibration is determined by comparing that judgment parameter with the corresponding threshold. Scenario 2: If the judgment parameters are two of the three, for example, if the judgment parameters include average alignment error and angle deviation value, then the rotation matrix calibration is deemed to have failed if either the average alignment error or the angle deviation value is not less than the corresponding threshold.
[0167] Scenario 3: The judgment parameters include average alignment error, angle deviation value, and the target point's change trend, comprehensively evaluating the calibration effect of the rotation matrix. Therefore, if the number of cases where the rotation matrix calibration fails is greater than the number of cases where the rotation matrix calibration succeeds, it indicates that the rotation matrix calibration has failed. Alternatively, the three judgment parameters may have different priorities. For example, the average alignment error has a higher priority than the angle deviation value, and the angle deviation value has a higher priority than the target point's change trend. In this case, if the average alignment error is less than the corresponding preset error, the rotation matrix calibration is successful; if the angle deviation value is less than the corresponding preset angle and the target point's change trend is less than the corresponding preset change trend, the rotation matrix calibration is successful. Alternatively, the three judgment parameters have weighted proportions. Based on the corresponding weighted proportions, the average alignment error, angle deviation value, and the sum of the products of the target point's change trend and the corresponding weighted proportions are calculated to obtain a comprehensive evaluation index. The calibration of the rotation matrix is then judged based on the comprehensive evaluation index and the corresponding threshold. Thus, through a multi-dimensional and quantifiable comprehensive evaluation index, the rotation matrix is comprehensively evaluated from three aspects: accuracy, consistency, and stability, ensuring the reliability and robustness of the pose compensation calibration method in actual dynamic environments.
[0168] In one alternative implementation, such as Figure 6 As shown, the pose compensation calibration method further includes:
[0169] S17. In response to the failure of the rotation matrix calibration, detect whether the total travel distance of the agricultural machinery exceeds the preset total distance. In this embodiment, the preset total distance is used as the upper limit of the overall calibration distance in the pose compensation calibration method, for example, the preset total distance can be set to 80 meters.
[0170] S18. In response to the total travel distance being less than the preset total distance, the agricultural machinery is controlled to continue traveling, and step S11 is executed again. In specific implementation, the preset travel distance is set to 10 meters, and the preset total distance is set to 80 meters. Therefore, the agricultural machinery performs a rotation matrix calibration every 10 meters traveled. The total travel distance is obtained by adding up the distances traveled each time. For example, if a total of 50 meters has been traveled, and 50 meters is detected to be less than the preset total distance of 80 meters, the agricultural machinery is controlled to continue traveling, and the vehicle coordinates are obtained again to achieve a new rotation matrix calibration, thereby realizing the verification loop.
[0171] In this embodiment, if the total distance traveled by the agricultural machinery exceeds the preset total distance and a successful calibration result is still not output, the overall calibration is determined to be a failure. It is necessary to re-check the environment of the agricultural machinery or the status of the position and pose compensation calibration system, and then restart the calibration process after the check.
[0172] Example 2
[0173] Corresponding to Embodiment 1 of the aforementioned pose compensation calibration method for vehicle-mounted cameras, this disclosure also provides an embodiment of a pose compensation calibration system for vehicle-mounted cameras.
[0174] Figure 7 This is a schematic diagram of a pose compensation calibration system for a vehicle-mounted camera provided in this embodiment, applied to agricultural machinery. The pose compensation calibration system 20 includes:
[0175] The vehicle coordinate acquisition module 201 is used to acquire the vehicle coordinates of agricultural machinery in real time during a preset travel distance;
[0176] The vehicle coordinate transformation module 202 is used to convert the vehicle coordinates into coordinates in the target coordinate system to obtain the baseline in the target coordinate system.
[0177] Image acquisition module 203 acquires the current frame image from the vehicle-mounted camera;
[0178] The seedling line coordinate transformation module 204 is used to convert the seedling line coordinates in the current frame image into coordinates in the target coordinate system to obtain the first seedling line in the target coordinate system.
[0179] The rotation matrix construction module 205 is used to construct a rotation matrix based on the baseline and the first seed line; wherein, the rotation matrix is used to compensate the first seed line and align the direction of the compensated first seed line with the baseline to perform pose compensation for the vehicle-mounted camera.
[0180] In this embodiment, the vehicle body coordinates of the agricultural machinery are acquired in real time during a preset journey to obtain the dynamic coordinates of the vehicle body. These coordinates are then converted into coordinates in the target coordinate system to obtain the required baseline, which serves as the direction reference. This avoids the unreliability of using fixed points as calibration references in existing technologies. Simultaneously, the current frame image of the vehicle-mounted camera is acquired, and the seedling line coordinates in the current frame image are converted into coordinates in the target coordinate system to obtain the first seedling line in the target coordinate system. A rotation matrix is constructed based on the baseline and the first seedling line to perform pose compensation for the vehicle-mounted camera, thereby improving the accuracy and reliability of the rotation matrix calibration and eliminating the left-right lateral pose error mainly caused by yaw angle during camera installation. Specifically, the rotation matrix calibration can effectively correct the rotational deviation between the vehicle-mounted camera and the vehicle body coordinate system, significantly improving the path tracking accuracy and lateral control stability of the agricultural machinery's automatic driving system. In other embodiments, this pose compensation calibration method can be applied not only to straight paths but also to curved terrain, exhibiting good terrain and working condition adaptability, maintaining calibration stability, and ensuring the path accuracy of automatic driving.
[0181] In one alternative implementation, such as Figure 8 As shown, the pose compensation calibration system 20 further includes:
[0182] The judgment parameter acquisition module 206 is used to obtain at least one judgment parameter based on the rotation matrix. In this embodiment, different judgment parameters are obtained according to the rotation matrix to judge the quality of a single calibration result and the calibration stability under different working conditions, thereby quantitatively evaluating the effect of rotation matrix calibration.
[0183] The calibration judgment module 207 is used to determine whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter.
[0184] For example, the coordinates of the vehicle body can be obtained based on the movement of agricultural machinery under different working conditions, thereby obtaining the coordinates of the baseline and the first seedling line in the target coordinate system. The corresponding rotation matrix under different working conditions can then be calculated. The rotation matrix is then checked for successful calibration by judging parameters, thus determining the stability of the calibration under different working conditions. If the rotation matrix calibration fails, step S11 is re-executed to recalculate and obtain a new rotation matrix. Therefore, this implementation supports online real-time calibration, enabling real-time calibration and deviation correction during agricultural machinery operation, adapting to dynamic changes in the field environment, and improving the automation and reliability of the pose compensation calibration system for long-term operation.
[0185] In one optional implementation, the judgment parameter includes the average alignment error;
[0186] The image acquisition module 203 is also used to acquire multiple historical frame images of the vehicle-mounted camera.
[0187] The seedling line coordinate transformation module 204 is also used to convert the seedling line coordinates in the historical frame image into coordinates under the target coordinate system, so as to obtain multiple second seedling lines under the target coordinate system.
[0188] like Figure 9 As shown, the parameter acquisition module 206 specifically includes:
[0189] The compensation unit 2061 is used to obtain multiple third lines after pose compensation based on multiple second lines and the rotation matrix; for example, the calculated rotation matrix is used to rotate the second lines in 20 historical frame images to obtain the third lines after pose compensation.
[0190] Error calculation unit 2062 is used to compare the multiple third lines with the baseline and calculate the average alignment error corresponding to each third line.
[0191] The calibration judgment module 207 is specifically used to determine whether the calibration of the rotation matrix is successful based on the comparison results of multiple average alignment errors and preset errors.
[0192] In this embodiment, the rotation matrix is determined by comparing multiple average alignment errors with a preset error, thus improving the accuracy of rotation matrix calibration. In specific implementation, the preset error can be 0.04. When multiple average alignment errors are all less than 0.04, the rotation matrix calibration is considered successful. Alternatively, the mean of these multiple average alignment errors can be calculated; when the mean is less than 0.04, the rotation matrix calibration is considered successful. Alternatively, a threshold can be set; when the number of average alignment errors less than 0.04 exceeds this threshold, the rotation matrix calibration is considered successful. Alternatively, when the percentage of average alignment errors less than the preset error exceeds a pre-set percentage threshold, the rotation matrix calibration is considered successful. Alternatively, the mode of multiple average alignment errors can be calculated; when the mode is less than the preset error, the rotation matrix calibration is considered successful. Alternatively, the median of multiple average alignment errors can be calculated; when the median is less than the preset error, the rotation matrix calibration is considered successful.
[0193] In one optional implementation, the judgment parameter includes an angle deviation value;
[0194] like Figure 9 As shown, the parameter acquisition module 206 specifically includes:
[0195] Angle deviation calculation unit 2063 is used to calculate angle deviation value based on the rotation matrix and the initial rotation matrix, wherein the initial rotation matrix is the initial setting during installation;
[0196] The calibration judgment module 207 is specifically used to determine whether the calibration of the rotation matrix is successful based on the comparison result between the angle deviation value and the preset angle.
[0197] In this embodiment, the rotation matrix is determined by comparing the angle deviation value with a preset angle, thus improving the accuracy of rotation matrix calibration. Specifically, if the angle deviation value is less than the preset angle, the rotation matrix calibration is successful; if the angle deviation value is not less than the preset angle, the rotation matrix calibration fails. In specific implementation, the preset angle can be 1°; if the angle deviation value is less than 1°, the rotation matrix calibration is successful.
[0198] In one optional implementation, the judgment parameter includes the changing trend of the target point;
[0199] The compensation unit 2061 is also configured to compensate the coordinates of the target point according to the rotation matrix in response to detecting the presence of the same target point in multiple historical frame images.
[0200] like Figure 9 As shown, the parameter acquisition module 206 specifically includes:
[0201] The trend calculation unit 2064 is used to construct a position sequence based on multiple coordinates after compensation of the target point, and calculate the trend.
[0202] The calibration judgment module 207 is specifically used to determine whether the calibration of the rotation matrix is successful based on the comparison result between the change trend and the preset change trend.
[0203] In this embodiment, the rotation matrix is determined by comparing the change trend with the preset change trend, which improves the accuracy of rotation matrix calibration.
[0204] In one alternative implementation, such as Figure 10 As shown, the pose compensation calibration system 20 further includes:
[0205] The distance detection module 208 is used to detect whether the total distance traveled by the agricultural machinery exceeds the preset total distance in response to the failure of the rotation matrix calibration.
[0206] The driving control module 209 is used to control the agricultural machinery to continue driving in response to the total driving distance being less than the preset total driving distance, and to execute the step of obtaining the vehicle coordinates of the agricultural machinery in real time during the preset journey again.
[0207] In this embodiment, if the total distance traveled by the agricultural machinery exceeds the preset total distance and a successful calibration result is still not output, the overall calibration is determined to be a failure. It is necessary to re-check the environment of the agricultural machinery or the status of the position and pose compensation calibration system, and then restart the calibration process after the check.
[0208] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.
[0209] Example 3
[0210] Figure 11This is a schematic diagram of the structure of an electronic device shown in this embodiment. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the pose compensation calibration method for the vehicle-mounted camera described in Embodiment 1 above. Figure 11 The electronic device 30 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0211] like Figure 11 As shown, the electronic device 30 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including memory 32 and processor 31).
[0212] Bus 33 includes a data bus, an address bus, and a control bus.
[0213] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.
[0214] The memory 32 may also include a program tool 325 (or utility) having a set (at least one) program module 324, such program module 324 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0215] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the pose compensation calibration method for the vehicle-mounted camera provided in Embodiment 1 above.
[0216] Electronic device 30 can also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 35. Furthermore, electronic device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 36. Figure 11 As shown, network adapter 36 communicates with other modules of electronic device 30 via bus 33. It should be understood that, although... Figure 11 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0217] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0218] Example 4
[0219] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the pose compensation calibration method for a vehicle-mounted camera provided in Embodiment 1 above.
[0220] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0221] Example 5
[0222] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the pose compensation calibration method for a vehicle-mounted camera described in Embodiment 1 above.
[0223] The program code for executing the computer program product of this disclosure can be written in any combination of one or more programming languages, and the program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0224] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.
Claims
1. A method for pose compensation calibration of a vehicle-mounted camera, characterized in that, Applied to agricultural machinery, the pose compensation calibration method includes the following steps: Real-time acquisition of the vehicle coordinates of agricultural machinery during the preset travel distance; The vehicle coordinates are converted to coordinates in the target coordinate system to obtain the baseline in the target coordinate system; The current frame image of the vehicle-mounted camera is acquired, and the coordinates of the seed line in the current frame image are converted into coordinates in the target coordinate system to obtain the first seed line in the target coordinate system. A rotation matrix is constructed based on the baseline and the first seed line; wherein, the rotation matrix is used to compensate the first seed line and align the direction of the compensated first seed line with the baseline, so as to perform pose compensation for the vehicle-mounted camera.
2. The pose compensation calibration method as described in claim 1, characterized in that, The pose compensation calibration method further includes: At least one judgment parameter is obtained based on the rotation matrix; The calibration of the rotation matrix is determined based on the threshold corresponding to the judgment parameter.
3. The pose compensation calibration method as described in claim 2, characterized in that, The judgment parameters include the average alignment error; The pose compensation calibration method further includes: Multiple historical frame images of the vehicle-mounted camera are acquired, and the seed line coordinates in the historical frame images are converted into coordinates under the target coordinate system to obtain multiple second seed lines under the target coordinate system. The step of obtaining at least one judgment parameter based on the rotation matrix specifically includes: Multiple third seedlings are obtained after pose compensation based on multiple second seedlings and the rotation matrix; The average alignment error corresponding to each third seed line is calculated by comparing multiple third seed lines with the baseline. The step of determining whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter specifically includes: Based on the comparison results of multiple average alignment errors with preset errors, it is determined whether the calibration of the rotation matrix is successful.
4. The pose compensation calibration method as described in claim 2, characterized in that, The judgment parameters include the angle deviation value; The step of obtaining at least one judgment parameter based on the rotation matrix specifically includes: The angular deviation value is calculated based on the rotation matrix and the initial rotation matrix, wherein the initial rotation matrix is the initial setting during installation; The step of determining whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter specifically includes: Based on the comparison between the angle deviation value and the preset angle, it is determined whether the calibration of the rotation matrix is successful.
5. The pose compensation calibration method as described in claim 2, characterized in that, The judgment parameters include the changing trend of the target point; The step of obtaining at least one judgment parameter based on the rotation matrix specifically includes: In response to the detection of the same target point in multiple historical frame images, the coordinates of the target point are compensated according to the rotation matrix; A position sequence is constructed based on the multiple coordinates of the target point after compensation, and the trend of change is calculated. The step of determining whether the calibration of the rotation matrix is successful based on the threshold corresponding to the judgment parameter specifically includes: Based on the comparison between the stated trend and the preset trend, it is determined whether the calibration of the rotation matrix was successful.
6. The pose compensation calibration method as described in claim 2, characterized in that, The pose compensation calibration method further includes: In response to the failure of the rotation matrix calibration, it is detected whether the total travel distance of the agricultural machinery exceeds the preset total distance; In response to the total travel distance being less than the preset total travel distance, the agricultural machinery is controlled to continue traveling, and the step of obtaining the vehicle coordinates of the agricultural machinery in real time during the preset travel distance is executed again.
7. A pose compensation calibration system for a vehicle-mounted camera, characterized in that, The pose compensation calibration system, applied to agricultural machinery, includes: The vehicle coordinate acquisition module is used to acquire the vehicle coordinates of agricultural machinery in real time during a preset travel distance; The vehicle coordinate transformation module is used to convert the vehicle coordinates into coordinates in the target coordinate system to obtain the baseline in the target coordinate system. The image acquisition module acquires the current frame image from the vehicle-mounted camera; The seedling line coordinate transformation module is used to convert the seedling line coordinates in the current frame image into coordinates in the target coordinate system to obtain the first seedling line in the target coordinate system. A rotation matrix construction module is used to construct a rotation matrix based on the baseline and the first seed line; wherein, the rotation matrix is used to compensate the first seed line and align the direction of the compensated first seed line with the baseline to perform pose compensation for the vehicle-mounted camera.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the pose compensation calibration method for the vehicle-mounted camera as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the pose compensation calibration method for the vehicle-mounted camera as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the pose compensation calibration method for the vehicle-mounted camera as described in any one of claims 1-6.