Vehicle attitude determination method and device

By collecting road images in real time and iteratively updating the pitch angle with historical lane data, the problem of difficulty in accurately obtaining vanishing points on complex road surfaces based on vanishing point calibration method is solved, and the accuracy of calibration parameters of on-board cameras and the reliability of intelligent driving systems is improved.

CN120070596APending Publication Date: 2025-05-30CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510236244.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the field of intelligent driving, it is difficult to accurately obtain vanishing points on complex road surfaces, affecting the accuracy of calibration results.

Method used

By collecting road images in real time, identifying lane line detection key points and converting them to three-dimensional space, iteratively updates the pitch angle with historical lane data until it meets the preset lane correction requirements.

Benefits of technology

It improves the accuracy of calibration parameters of the on-board camera, enhances the vehicle's perception and decision-making ability of the surrounding environment, and ensures the reliability and stability of the intelligent driving system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070596A_ABST
    Figure CN120070596A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle attitude determination method and device, and relates to the field of intelligent driving, and the method comprises the following steps: obtaining a road image collected by a vehicle-mounted camera in real time and a lane line detection key point in the road image; converting the lane line detection key points into a three-dimensional space to obtain candidate three-dimensional key point data; obtaining first lane data from the historical lane data, and obtaining three-dimensional key point data corresponding to a first detection key point in the lane line detection key points from the candidate three-dimensional key point data based on the first lane data; converting the first detection key point into a three-dimensional space by combining the candidate compensation pitch angle with an original calibration parameter to obtain to-be-evaluated corrected lane data, and iteratively updating the candidate compensation pitch angle based on a matching condition between the to-be-evaluated corrected lane data and a preset lane correction requirement, the compensation pitch angle enables the to-be-evaluated correction lane data to meet the lane correction requirement. The pitch angle of the vehicle-mounted camera can be corrected in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of intelligent driving, and particularly to a method and a device for determining the attitude of a vehicle. Background Art

[0002] In the field of intelligent driving, accurate imaging of on-vehicle cameras is crucial for vehicle environmental perception and decision-making. Deviations in the internal and external parameters of on-vehicle cameras can cause geometric distortion when taking pictures, resulting in errors in the vehicle's judgment of the distance, size, and position of surrounding objects. This may cause the failure of relevant functions during vehicle driving and affect driving safety. Therefore, calibrating on-vehicle cameras is a necessary step to ensure accurate image information acquisition.

[0003] In the related art, it is common to use vanishing points for on-vehicle camera calibration. Parallel lines in the scene intersect at a point on the image plane, and this point is called a vanishing point. By identifying vanishing points in multiple directions in the image and combining known scene geometric information, the internal parameter matrix of the camera, such as focal length, principal point coordinates, etc., and the external parameter matrix can be calculated to determine the position and attitude of the camera in the world coordinate system.

[0004] However, this calibration method based on vanishing points has certain limitations. For example, when the vehicle is driving on roads such as in a parking lot or a rural road, it is difficult to accurately obtain vanishing points, which will affect the accuracy of the calibration results. Summary of the Invention

[0005] The embodiments of the present application provide a method and a device for determining the attitude of a vehicle, which can correct the pitch angle of an on-vehicle camera in real time and improve the accuracy of camera calibration parameters. The technical solution is as follows:

[0006] On the one hand, a method for determining the attitude of a vehicle is provided. The method includes:

[0007] Obtain a road image collected in real time by an on-vehicle camera, and obtain lane line detection key points in the road image. The lane line detection key points are key points corresponding to lane lines and expressed in two dimensions identified from the road image;

[0008] Convert the lane line detection key points to a three-dimensional space to obtain candidate three-dimensional key point data;

[0009] Obtain first lane data from historical lane data, and obtain three-dimensional key point data from the candidate three-dimensional key point data based on the first lane data. The three-dimensional key point data corresponds to the same target lane as the first lane data. The target lane includes left and right lane lines, and the three-dimensional key point data is data obtained by three-dimensional conversion of the first detection key point among the lane line detection key points;

[0010] Convert the first detected key point to the three-dimensional space by combining the candidate compensation pitch angle with the original calibration parameters to obtain the lane data to be evaluated and corrected, where the original calibration parameters are the calibration values of the camera parameters of the vehicle-mounted camera;

[0011] Based on the matching situation between the lane data to be evaluated and corrected and the preset lane correction requirements, iteratively update the candidate compensation pitch angle, and update the lane data to be evaluated and corrected based on the updated candidate compensation pitch angle until a compensation pitch angle that makes the lane data to be evaluated and corrected meet the lane correction requirements is obtained.

[0012] On the other hand, a device for determining the vehicle attitude is provided, and the device includes:

[0013] An acquisition module, configured to acquire a road image collected in real time by a vehicle-mounted camera, and acquire key points for detecting lane lines in the road image, where the key points for detecting lane lines are key points corresponding to lane lines and expressed in two dimensions identified from the road image;

[0014] A conversion module, configured to convert the key points for detecting lane lines to the three-dimensional space to obtain candidate three-dimensional key point data;

[0015] The acquisition module is further configured to acquire first lane data from historical lane data, and acquire three-dimensional key point data from the candidate three-dimensional key point data based on the first lane data, where the three-dimensional key point data and the first lane data correspond to the same target lane, the target lane includes lane lines at both left and right ends, and the three-dimensional key point data is data obtained by performing three-dimensional conversion on the first detected key point among the key points for detecting lane lines;

[0016] A correction module, configured to convert the first detected key point to the three-dimensional space by combining the candidate compensation pitch angle with the original calibration parameters to obtain the lane data to be evaluated and corrected, where the original calibration parameters are the calibration values of the camera parameters of the vehicle-mounted camera;

[0017] An update module, configured to iteratively update the candidate compensation pitch angle based on the matching situation between the lane data to be evaluated and corrected and the preset lane correction requirements, and update the lane data to be evaluated and corrected based on the updated candidate compensation pitch angle until a compensation pitch angle that makes the lane data to be evaluated and corrected meet the lane correction requirements is obtained.

[0018] In an alternative embodiment, the updating module is further configured to obtain lane width data based on the lane data to be evaluated and corrected, where the lane width data is data obtained by equally spaced sampling of the width between the left and right lane lines of the target lane, and the lane width data includes at least two line segment widths; determine a first loss based on the difference between the at least two line segment widths in the lane width data; and iteratively update the candidate compensation pitch angle through the first loss.

[0019] In an alternative embodiment, the updating module is further configured to obtain heading angle data based on the lane data to be evaluated and corrected, where the heading angle data is a parallel feature between sampling points obtained by equally spaced sampling of the left and right lane lines of the target lane; determine a second loss based on the heading angle data; and iteratively update the candidate compensation pitch angle through the second loss.

[0020] In an alternative embodiment, the obtaining module is further configured to obtain iteration data for calculating the candidate compensation pitch angle, where the iteration data includes a single iteration step size and a pitch angle range; and obtain the candidate compensation pitch angle based on the single iteration step size, where the candidate compensation pitch angle is within the pitch angle range.

[0021] In an alternative embodiment, the updating module is further configured to, when updating the candidate compensation pitch angle for the i-th time, obtain the current iteration number i, where i is a positive integer; and obtain the candidate compensation pitch angle updated for the i-th time based on the product of the single iteration step size and the current iteration number i.

[0022] In an alternative embodiment, the obtaining module is further configured to collect a longitudinal acceleration through an acceleration sensor of the first vehicle, where the longitudinal acceleration refers to the acceleration perpendicular to the road surface during the driving of the first vehicle; and determine the single iteration step size and the pitch angle range based on the value of the longitudinal acceleration.

[0023] In an alternative embodiment, the historical lane data includes lane data of at least two lanes, and the road image includes the at least two lanes;

[0024] The obtaining module is further configured to obtain, for the j-th lane among the at least two lanes, the j-th lane data corresponding to the j-th lane from the historical lane data, where j is a positive integer; in response to the j-th lane data indicating that the j-th lane meets the preset reference line requirements, determining the j-th lane data as the first lane data; for the k-th lane among the candidate three-dimensional key point data, obtaining the k-th key point data corresponding to the k-th lane, where k is a positive integer; and in response to the k-th key point data and the first lane data meeting the preset lane consistency requirements, determining the k-th key point data as the three-dimensional key point data.

[0025] In an alternative embodiment, the obtaining module is further configured to determine that the j-th lane meets the preset reference line requirements when the j-th lane data indicates that the lane lines at both ends of the j-th lane are parallel and of equal width.

[0026] In an alternative embodiment, the calibration module is further configured to obtain a calibrated pitch angle and a first perspective rotation matrix, where the calibrated pitch angle is a calibrated value of the pitch angle of the on-vehicle camera of the first vehicle, and the first perspective rotation matrix is used to convert the lane line detection key points into three-dimensional space, and there is a corresponding conversion relationship between the calibrated pitch angle and the first perspective rotation matrix; generating a second perspective rotation matrix based on the candidate compensation angle and the conversion relationship; obtaining a conversion matrix based on the product of the first perspective rotation matrix and the second perspective rotation matrix, where the conversion matrix is used to calibrate the three-dimensional key point data; and converting the first detected key points into the three-dimensional space based on the conversion matrix to obtain the lane data to be evaluated and calibrated.

[0027] On the other hand, a computer device is provided, which includes a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method for determining the vehicle attitude as described in any one of the embodiments of the present application above.

[0028] On the other hand, a computer-readable storage medium is provided. At least one instruction, at least one program, a code set, or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for determining the vehicle attitude as described in any one of the embodiments of the present application above.

[0029] On the other hand, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for determining the vehicle attitude described in any one of the above embodiments.

[0030] The beneficial effects brought by the technical solutions provided in the embodiments of the present application at least include:

[0031] By collecting road images in real time, analyzing key points of lane lines appearing in the road images to obtain three-dimensional key point data, the three-dimensional shape characteristics of the lane lines can be determined. Using historical lane data as prior data to determine the first lane data matching the lane lines in the image, a reference benchmark lane line for correcting the pitch angle can be determined based on the known lane line shape characteristics. Compensate the pitch angle of the on-vehicle camera based on the morphological difference between the lane lines at both ends of the target lane in the three-dimensional key point data, and improve the accuracy of the compensated pitch angle by iteratively updating the candidate compensated pitch angle, thereby improving the effect of correcting the calibration parameters of the on-vehicle camera. Description of the Drawings

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0033] Figure 1 is a schematic diagram of a system for determining the vehicle attitude provided by an exemplary embodiment of the present application;

[0034] Figure 2 is a flowchart of a method for determining the vehicle attitude provided by an exemplary embodiment of the present application;

[0035] Figure 3 is a structural block diagram of a device for determining the vehicle attitude provided by an exemplary embodiment of the present application;

[0036] Figure 4 is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. Detailed Embodiments

[0037] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the drawings.

[0038] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "the", and "said" used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0039] It should be noted that the information and data involved in this application are all information and data authorized by users or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0040] First, a brief introduction to the nouns involved in the embodiments of this application:

[0041] Pitch angle: In the field of in-vehicle camera applications, the pitch angle is a key angle for describing the camera's attitude, intuitively reflecting the inclination of the camera's optical axis relative to the vehicle's driving plane (which can be approximately regarded as a reference plane in the world coordinate system). When the camera's optical axis tilts upward, the pitch angle is positive; when it tilts downward, the pitch angle is negative. The magnitude of the pitch angle directly affects the range and angle of the camera's captured image. If there is a deviation in the pitch angle, it will cause changes in the relative position and proportion of objects in the captured image, resulting in significant errors when the vehicle judges the distance, size, and position of surrounding objects, thereby affecting the environmental perception and decision-making of the intelligent driving system. For example, related intelligent driving functions such as automatic emergency braking, adaptive cruise control, and lane keeping assist may fail.

[0042] Therefore, when calibrating the parameters of an in-vehicle camera, it is crucial to compensate and correct the pitch angle. When the pitch angle of the in-vehicle camera changes due to bumps during vehicle driving, compensating the pitch angle in a timely manner to make it conform to the calibrated value can enable the images captured by the in-vehicle camera to be more accurate and meet the image requirements of the vehicle driving system.

[0043] This embodiment provides more methods for obtaining the compensated pitch angle.

[0044] In intelligent driving, accurate imaging of in-vehicle cameras is extremely crucial, providing core image support for various intelligent driving functions and directly affecting driving safety. Its parameters are divided into two categories: internal and external. Internal parameters include focal length, etc., which are used to describe the imaging characteristics of the camera itself; external parameters cover translation vectors, rotation matrices, and pitch angles. The pitch angle determines the inclination of the camera's optical axis relative to the vehicle's driving plane and determines the camera's attitude in the world coordinate system.

[0045] The intelligent driving system requires accurate image information for environmental perception, decision-making, and multi-sensor fusion. Therefore, it is necessary to calibrate the in-vehicle camera to eliminate errors, ensure accurate imaging, and meet the functional requirements of intelligent driving, avoiding geometric distortion of images caused by camera parameter deviations, which may affect the vehicle's judgment of the surrounding environment.

[0046] In related technologies, the in-vehicle camera is usually calibrated and the pitch angle is corrected by means of the vanishing point. In the actual scenario, the intersection of parallel lines in the image plane is the vanishing point. During calibration, algorithms are used to identify parallel line groups in different directions and calculate the coordinates of the vanishing point. Under an ideal flat road, the theoretical position of the horizontal vanishing point is on the horizontal center line of the image. Deviations in the camera pitch angle will cause the actual position to deviate. By analyzing the deviation and combining the mathematical relationship with the imaging model, the deviation value of the pitch angle and the compensation angle are obtained, and the camera attitude is adjusted to achieve parameter calibration, reduce distortion, and ensure the reliability of the image.

[0047] However, the above calibration method based on the vanishing point has certain limitations. When the vehicle is on a complex road surface such as a curve, it is difficult to accurately obtain the vanishing point, which affects the accuracy of the camera calibration result, and further weakens the reliability and stability of the entire intelligent driving system.

[0048] Therefore, the present application provides a method for determining the vehicle attitude, which can compare and analyze the three-dimensional shapes of the same lane line collected at different times based on the road images collected in real time and the road prior data collected in the historical time period, and determine the angle value for compensating the pitch angle of the in-vehicle camera, thereby improving the accuracy of the in-vehicle camera parameter calibration.

[0049] Secondly, the vehicle attitude determination system involved in the embodiments of the present application is described. Schematically, please refer to Figure 1 , this system involves the first vehicle 100, the in-vehicle terminal 110 of the first vehicle 100, and the server 120. Among them, there is a communication connection between the in-vehicle terminal 110 and the server 120.

[0050] When the first vehicle 100 is driving on the road, the in-vehicle camera 101 of the first vehicle 100 collects road images in real time. The road images include at least one lane line, including the current lane line, and the current lane line is used to indicate the lane where the first vehicle 100 is currently located.

[0051] The in-vehicle terminal 110 sends the road images to the server 120, and the server 120 performs key point recognition on the road images to obtain lane line detection key points. The lane line detection key points are two-dimensional key points that make up the current lane line. The lane line detection key points are converted into three-dimensional space and fitted into a cubic curve to obtain candidate three-dimensional key point data.

[0052] Among them, the candidate three-dimensional key point data can reflect the morphological characteristics of the current lane line in three-dimensional space, including the width and shape of the current lane line. The current lane line refers to the two end lines of a lane. For example, when the first vehicle 100 is driving in lane A, the current lane lines are the lane lines at both ends of lane A.

[0053] The server 120 obtains historical lane data, which is data in the same format as the three-dimensional key point data obtained in the same way during the historical time period, reflecting the three-dimensional morphological characteristics of the lane lines of the section passed by the first vehicle 100.

[0054] The method provided in this embodiment is applicable to the scenario of pitch angle compensation based on parallel lane lines. Therefore, using the historical lane data as prior data to compare with the currently collected three-dimensional key point data can determine the degree of the compensated pitch angle from the changes / differences in the lane line morphology. When the pitch angle of the in-vehicle camera 101 is corrected based on the compensated pitch angle, if the morphological characteristics of the lane lines in the road image captured by the corrected in-vehicle camera 101 can meet the requirements, it indicates that the pitch angle calibration of the in-vehicle camera 101 is completed.

[0055] Since there may be at least one lane on the road surface where the first vehicle 100 is driving, it is necessary to screen out the first lane data corresponding to one target lane from the historical lane data as the reference benchmark during calibration, and find the three-dimensional key point data belonging to the same target lane from the candidate three-dimensional key point data, where the three-dimensional key point data is the data obtained by performing three-dimensional conversion on the first detection key point among the lane line detection key points.

[0056] Before finally determining the value of the compensated pitch angle, multiple angles are respectively selected as candidate compensated pitch angles within a given range based on a given step size by the listed method, and the first detection key point is successively subjected to three-dimensional conversion to obtain the to-be-evaluated corrected lane data.

[0057] Each calibration will iteratively update the candidate compensated pitch angle once until there is a data (corrected lane data) in the to-be-evaluated corrected lane data corresponding to each candidate pitch angle, and the difference from the first lane data meets the preset difference requirement, then the iteration stops. The corrected lane data is the data that meets the lane correction requirements in the to-be-evaluated corrected lane data.

[0058] Determine the angle of the candidate compensated pitch angle that makes the to-be-evaluated corrected lane data meet the lane correction requirements as the final compensated pitch angle, and correct the pitch angle of the current in-vehicle camera 101 based on the compensated pitch angle to complete the calibration. For example, the compensated pitch angle is 3°, and the correction method based on the compensated pitch angle is as follows: for the pitch angle of the current in-vehicle camera 101, increase it by 3° in the first direction.

[0059] The first direction can be the upward direction or the downward direction. The upward direction refers to the direction corresponding to the front end of the vehicle-mounted camera 101 being lifted upward with respect to the horizontal plane. At this time, the pitch angle is positive. The downward direction refers to the direction corresponding to the front end of the vehicle-mounted camera 101 being tilted downward with respect to the horizontal plane. At this time, the pitch angle is negative.

[0060] In some embodiments, the steps performed by the above system can be executed only by the server 120 or only by the vehicle-mounted terminal 110, and this embodiment does not limit this.

[0061] It should be noted that the above server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0062] In some embodiments, the above server 120 can also be implemented as a node in a blockchain system.

[0063] Combined with the above noun introduction and application scenarios, the method for determining the vehicle attitude provided by this application is described. This method can be executed by the server or the vehicle-mounted terminal, or jointly executed by the server and the vehicle-mounted terminal. In the embodiments of this application, taking the execution of this method by the server as an example, as Figure 2 shown Figure 2 is a flowchart of the method for determining the vehicle attitude provided by an exemplary embodiment of this application. The method includes the following steps.

[0064] Step 210, obtain the road image collected in real time by the vehicle-mounted camera, and obtain the lane line detection key points in the road image.

[0065] Among them, the lane line detection key points are key points corresponding to the lane line and expressed in two dimensions identified from the road image.

[0066] Exemplarily, the number of vehicle-mounted cameras of the first vehicle is at least two, which are respectively located at different positions on the body of the first vehicle. The number of road images collected corresponds to the perspectives of different vehicle-mounted cameras. After stitching the road images collected by each vehicle-mounted camera to obtain a complete road image that can describe the road environment characteristics of the first vehicle, the complete road image is input into a pre-trained 2D (Dimension) lane line detection model, and the lane line detection key points in the complete road image are output.

[0067] The pre-trained 2D lane detection model is a model trained based on a large amount of road image data (multiple images in the same format as the real-time captured road images, and each image contains lane lines), and has the ability of feature recognition and analysis. After receiving the input road image, the model extracts and filters various features in the image, accurately locates the feature information related to the lane lines, and finally outputs the lane detection key points in the road image.

[0068] Exemplarily, the model is trained based on a large amount of road image data in the same format as the real-time captured road images and containing lane lines as training data, and the lane line key points are pre-annotated in the training data. The training data is input into the model, and the model extracts features to locate the lane line related information and outputs the extracted key points. The loss value is obtained based on the difference between the extracted key points and the lane line key points, and the model parameters are adjusted through backpropagation. This process is iterated repeatedly until the loss value is lower than the preset loss threshold, and the pre-trained 2D lane detection model is obtained.

[0069] The lane detection key points can intuitively and clearly reflect the general contour and key positions of the lane lines in the road image.

[0070] Among them, the road image contains at least two lane lines. Denote the lane line set as L, and the lane detection key points corresponding to each lane line are Li, where i is a positive integer, and i is used to refer to the i-th lane line in the lane line set.

[0071] Step 220, convert the lane detection key points to the three-dimensional space to obtain candidate three-dimensional key point data.

[0072] Optionally, based on the offline calibration parameters of the vehicle-mounted camera, the lane detection key points are transformed to the three-dimensional space through inverse perspective transformation, and the key points mapped to the three-dimensional space are curve-fitted three times to obtain candidate three-dimensional key point data.

[0073] The offline calibration parameters of the vehicle-mounted camera include the internal parameter matrix K and the external parameter matrix / transformation matrix T (including the rotation matrix R and the translation vector t, ), where the internal parameter matrix K reflects the optical characteristics of the vehicle-mounted camera itself, and the external parameter matrix T determines the position and attitude of the camera in the world coordinate system.

[0074] The rotation matrix R is a 3×3 orthogonal matrix used to describe the rotation relationship of the camera coordinate system relative to the world coordinate system. It is determined by three rotation angles (usually the pitch angle, yaw angle, and roll angle), and can transform points in the world coordinate system to the camera coordinate system or vice versa. Each column of the rotation matrix is a unit vector, and the modulus / vector length of each vector is 1. For a vector (x, y, z) in the three-dimensional space, the formula for calculating the modulus of the vector is as follows: And each column vector is orthogonal to each other, and the value of its determinant is 1.

[0075] The translation vector t is a 3×1 vector, which is used to represent the position of the origin of the camera coordinate system in the world coordinate system, and describes the translation amount of the camera in the world coordinate system, that is, the offset of the vehicle-mounted camera relative to the origin of the world coordinate system.

[0076] Exemplarily, first, the lane line detection key points are transformed from two-dimensional to three-dimensional homogeneous coordinates to facilitate subsequent matrix operations. Based on the internal parameter matrix K and the external parameter matrix T, a projection matrix P = KT is constructed, and its pseudo-inverse matrix P+ is obtained.

[0077] Multiply the three-dimensional homogeneous coordinates by the pseudo-inverse matrix P+ to obtain the result of the three-dimensional space homogeneous coordinates, and divide each component of the result by the last component (the component for homogenization) to obtain the actual coordinates of the lane line detection key points in the three-dimensional space.

[0078] Repeat the above steps for each key point to complete the conversion from two-dimensional space to three-dimensional space, and obtain a set of three-dimensional coordinates. Based on the set of three-dimensional coordinates, curve fitting is performed to convert the lane lines in the image into three-dimensional curves as candidate three-dimensional key point data.

[0079] Step 230, obtain the first lane data from the historical lane data, and obtain the three-dimensional key point data from the candidate three-dimensional key point data based on the first lane data.

[0080] Among them, the three-dimensional key point data and the first lane data correspond to the same target lane. The target lane includes the left and right lane lines at both ends, and the three-dimensional key point data is the data obtained by performing three-dimensional conversion on the first detection key point among the lane line detection key points.

[0081] Optionally, the historical lane data includes the lane data of at least two lanes, and the candidate three-dimensional key point data also includes the lane data of at least two lanes. The data formats of the historical lane data and the three-dimensional key point data are the same, and as prior information, they can accurately describe the morphological characteristics of the lane lines passed by the first vehicle during the historical time period, including the width of the lane lines, the parallelism between the lane lines, the shape of the lane, etc.

[0082] The historical lane data is the data obtained in the historical time period based on the same method as the above-mentioned acquisition of candidate three-dimensional key point data. The historical time period refers to the time period with a preset duration from the current moment. During the historical time period, historical road images are collected, and the three-dimensional lane data is obtained after performing key point detection and three-dimensional conversion on the historical road images.

[0083] When the first vehicle starts to drive, the pitch angle of the on-vehicle camera is defaulted to the calibrated pitch angle without compensation. At this time, the starting road image collected is used as a reference image. The key points of the lane lines in the image are extracted as prior information and three-dimensionally transformed to obtain the initially acquired historical lane data. As the driving distance of the first vehicle increases, the historical lane data is gradually updated to ensure the accuracy of the historical lane data used for comparison when compensating the pitch angle for the road image collected in real time each time.

[0084] When compensating the pitch angle of the on-vehicle camera, the purpose is to make the two ends of the lane lines belonging to the same lane in the image collected by the on-vehicle camera meet the requirements of equal width and parallelism. Both the candidate three-dimensional key point data and the historical lane data correspond to the morphological information of at least two lanes. To facilitate determining the compensation result, a target lane is selected from the historical lane data as a reference benchmark to obtain the first lane data, which can reflect the morphological characteristics (parallel and equal width) of the target lane. The three-dimensional key point data corresponding to the target lane is obtained from the candidate three-dimensional key point data as the comparison data after correction based on the compensated pitch angle.

[0085] Exemplarily, for the j-th lane among at least two lanes, the j-th lane data corresponding to the j-th lane is obtained, where j is a positive integer.

[0086] For the j-th lane among at least two lanes, the j-th lane data corresponding to the j-th lane is obtained from the historical lane data, where j is a positive integer.

[0087] In response to the j-th lane data indicating that the j-th lane meets the preset reference line requirements, the j-th lane data is determined as the first lane data.

[0088] For the k-th lane in the candidate three-dimensional key point data, the k-th key point data corresponding to the k-th lane is obtained, where k is a positive integer.

[0089] In response to the k-th key point data and the first lane data meeting the preset lane consistency requirements, the k-th key point data is determined as the three-dimensional key point data.

[0090] Exemplarily, when the two ends of the lane lines of the j-th lane indicated by the j-th lane data are parallel and of equal width, it is determined that the j-th lane meets the preset reference line requirements.

[0091] For example, there are 3 lanes on the road where the first vehicle is driving, namely lane A, lane B, and lane C. The lane data corresponding to the above 3 lanes are respectively included in the historical lane data and the candidate three-dimensional key point data.

[0092] Among them, based on historical lane data, it can be known that lane A meets the requirements of equal width and parallel lane lines at both ends, lane B does not meet the requirement of equal width, and lane C does not meet the requirement of parallel lane lines at both ends. Therefore, lane A is determined as the target lane, and the data corresponding to lane A in the historical lane data is used as the first lane data.

[0093] Based on the similarity analysis of the lane data corresponding to each lane in the first lane data and the candidate three-dimensional key point data, determine whether the shape between the target lane and each lane in the road image is similar, find the lane line that belongs to the same lane as lane A from them, and determine the lane data corresponding to the lane line in the candidate three-dimensional key point data as the three-dimensional key point data.

[0094] In some embodiments, there may be multiple candidate lanes in the historical lane data that meet the requirements of equal width and parallelism. At this time, the lane closest to the on-vehicle camera at the target position of the first vehicle is determined as the target lane, and the data corresponding to the target lane in the historical lane data is determined as the first lane data.

[0095] For example, the on-vehicle camera at the target position of the first vehicle refers to the on-vehicle camera located on the symmetry axis of the first vehicle. The symmetry axis is a line obtained based on the forward direction of the body of the first vehicle, and the symmetry axis divides the first vehicle into left and right sides. This method can use one of the at least two on-vehicle cameras in the first vehicle as a reference for measuring the distance between the lane line and the first vehicle, which is convenient for determining the target lane.

[0096] In some embodiments, the three-dimensional key point data can also be obtained in the following way. After obtaining the first lane data, based on the first lane data, calculate the similarity between it and the lane data corresponding to each lane in the candidate three-dimensional key point data respectively, and determine the lane data with the highest similarity as the three-dimensional key point data.

[0097] For example, the first lane data is fitted into a cubic curve, and the candidate three-dimensional key point data is also a cubic curve obtained by fitting each lane. The similarity is determined based on the coincidence degree between the cubic curves.

[0098] After obtaining the first lane data, the characteristics that the lane lines in the road image currently captured by the first vehicle should have can be determined.

[0099] Step 240, convert the first detected key point to the three-dimensional space by combining the candidate compensation pitch angle with the original calibration parameters to obtain the lane data to be evaluated and corrected.

[0100] Among them, the original calibration parameters are the calibration values of the camera parameters of the on-vehicle camera, including the calibration pitch angle and the first rotation perspective matrix.

[0101] Optionally, obtain the calibrated pitch angle and the first perspective rotation matrix. The calibrated pitch angle is the calibrated value of the pitch angle of the on-vehicle camera of the first vehicle. The first perspective rotation matrix is used to convert the lane line detection key points to the three-dimensional space, and there is a corresponding conversion relationship between the calibrated pitch angle and the first perspective rotation matrix.

[0102] Generate a second perspective rotation matrix based on the candidate compensation angle and the conversion relationship.

[0103] Obtain a conversion matrix based on the product of the first perspective rotation matrix and the second perspective rotation matrix. The conversion matrix is used to correct the three-dimensional key point data.

[0104] Convert the first detected key points to the three-dimensional space based on the conversion matrix to obtain the lane data to be evaluated and corrected.

[0105] Exemplarily, the calibrated pitch angle is θ pitch , and the first perspective rotation matrix included in the offline calibration parameters of the on-vehicle camera is R1, and the corresponding first conversion matrix The candidate compensation angle is (at this time i = 1). Based on the corresponding conversion relationship between the calibrated pitch angle θ pitch and the first perspective rotation matrix R1, determine the corresponding second perspective rotation matrix R2 based on the candidate compensation angle . Among them, the matrix shapes of R1 and R2 are the same, having the same number of rows and columns.

[0106] Determine the conversion matrix as R’ = R1 * R2 based on the product of the first perspective rotation matrix R1 and the second perspective rotation matrix R2

[0107] Convert the two-dimensional first detected key points to the three-dimensional space based on the conversion matrix T’ to obtain the lane data to be evaluated and corrected.

[0108] Step 250: Based on the matching situation between the lane data to be evaluated and corrected and the preset lane correction requirements, iteratively update the candidate compensation pitch angle, and update the lane data to be evaluated and corrected based on the updated candidate compensation pitch angle until the compensation pitch angle that makes the lane data to be evaluated and corrected meet the lane correction requirements is obtained.

[0109] That is, if the lane data to be evaluated and corrected obtained when performing three-dimensional conversion on the first detected key points based on the candidate compensation pitch angle meets the preset lane correction requirements, determine the current candidate compensation pitch angle as the final pitch angle used to compensate the on-vehicle camera. At this time, the lane data to be evaluated and corrected is the corrected lane data, and the corrected lane data meets the lane correction requirements. Exemplarily, the lane correction requirements refer to that the lanes are parallel and of equal width.

[0110] Optionally, the initial value of the candidate compensation pitch angle is gradually increased based on a preset step size as a way of iterative update, where the difference requirement refers to that the difference between the corrected lane data and the first lane data is lower than a preset threshold.

[0111] Optionally, iterative data is obtained, and the iterative data is used to calculate a candidate compensation pitch angle. The iterative data includes a single-iteration step size and a pitch angle range.

[0112] The candidate compensation pitch angle is obtained based on the single-iteration step size, where the candidate compensation pitch angle is within the pitch angle range.

[0113] Exemplarily, the specific values of the single-iteration step size and the pitch angle range can be determined according to the bumpiness of the road surface where the first vehicle travels.

[0114] The longitudinal acceleration is collected by an acceleration sensor of the first vehicle. The longitudinal acceleration refers to the acceleration perpendicular to the road surface during the driving of the first vehicle, and the value of the longitudinal acceleration can reflect the bumpiness degree of the road surface where the first vehicle is located.

[0115] If the longitudinal acceleration is zero, it means the road surface is flat; if the absolute value of the longitudinal acceleration is larger, it means the road surface is more bumpy. At this time, the amplitude of the angle change of the pitch angle of the on-vehicle camera of the first vehicle caused by vehicle bumpiness is larger.

[0116] The single-iteration step size and the pitch angle range are determined based on the value of the longitudinal acceleration. The single-iteration step size is positively correlated with the absolute value of the longitudinal acceleration, and the absolute values of the two end values of the pitch angle range interval are also positively correlated with the absolute value of the longitudinal acceleration.

[0117] For example, the single-iteration step size θ is determined by the following formula 0 and the pitch angle range [-α, α].

[0118] (1) θ 0 = k1 * tan -1 (az / g), where tan -1 (x) is the arctangent function, which is the inverse function of the tangent function, az refers to the absolute value of the longitudinal acceleration, g is the acceleration due to gravity, and k1 is a non-zero constant.

[0119] (2) α = k2 * θ 0 , where k2 is a non-zero constant.

[0120] Exemplarily, when updating the candidate compensation pitch angle for the i-th time, the current iteration number i is obtained, and i is a positive integer.

[0121] The candidate compensation pitch angle updated for the i-th time is obtained based on the product of the single-iteration step size and the current iteration number i.

[0122] Exemplarily, the candidate compensation pitch angle at the i-th iteration is The pitch angle range is [-α, α], that is, α is a given angle, and the positive and negative of α represent the up and down directions of the pitch angle.

[0123] Wherein, the single iteration step size is s, and the current iteration number is i.

[0124] The calculation formula for the candidate compensation pitch angle at the i-th iteration is

[0125] Exemplarily, lane width data is obtained based on the lane data to be evaluated for correction. The lane width data is data obtained by equally spacing sampling of the width between the left and right lane lines of the target lane, and the lane width data contains at least two line segment widths; the first loss is determined based on the difference between at least two line segment widths in the lane width data.

[0126] The candidate compensation pitch angle is iteratively updated through the first loss.

[0127] Optionally, heading angle data is obtained based on the lane data to be evaluated for correction. The heading angle data is the parallel feature between sampling points obtained by equally spacing sampling of the left and right lane lines of the target lane; the second loss is determined based on the heading angle data; the candidate compensation pitch angle is iteratively updated through the second loss.

[0128] Exemplarily, after calibrating the calibration pitch angle based on the current candidate compensation pitch angle, key points for lane line detection are obtained for three-dimensional conversion to obtain a set of three-dimensional key points for the left and right lane lines.

[0129] A cubic curve L100 is fitted based on the set of three-dimensional key points for the left and right lane lines. The cubic curve L100 contains curves corresponding to the left and right lane lines respectively. Overlap analysis is performed on the lane lines on both sides of L100. The overlapping part in the curve is evenly sampled from near to far at an equal distance S0 to obtain multiple pairs of sampling points, and the lane width difference W and the heading angle difference H at each pair of sampling points are calculated.

[0130] Overlap analysis refers to intercepting the parts that can be aligned in the lane lines on both sides. In the road image collected in real time, the lengths of the lane lines at both ends of a lane may not be the same. In order to accurately analyze the equal width / parallelism between the lane lines on both sides, the part that completely contains the lane lines on both sides is intercepted from the lane to obtain the overlapping part.

[0131] For example, on both sides of the complete target lane, the lane lines are marked with sampling points numbered from 1 to 100 at equal distances. The left lane line contains 100 sampling points numbered from 1 to 100, and the right lane line also contains 100 sampling points numbered from 1 to 100. In the road image, only the sampling points numbered from 35 to 70 on the left lane line and the sampling points numbered from 30 to 65 on the right lane line are shown. The complete sampling point pairs are composed of the sampling points at positions numbered from 35 to 65.

[0132] Therefore, the overlapping part only contains the sampling points numbered from 35 to 65, and the sampling points with the same number form a pair.

[0133] Among them, for each pair of sampling points, the sampling points belonging to a pair on the left and right lane lines are connected to obtain a set of line segments numbered from 35 to 65. The width of the line segment is the lane width at the sampling point.

[0134] Taking the connecting line segment of a pair of sampling points as a reference, the corresponding lane width is denoted as w0. Among other sampling point pairs, the length (lane width) of the connecting line segment of the i-th pair of sampling points is denoted as wi, where i is a positive integer. The width difference w = wi - w0 (0 < i < n, n is the number of sampling point pairs) between the i-th pair of sampling points and the reference sampling point is calculated to obtain the lane width difference W.

[0135] The heading angle difference H is obtained as follows: Taking the i-th pair of sampling points as an example, a tangent line 1 is made at the sampling point on the left lane line, and a tangent line 2 is made at the sampling point on the right lane line. The angle between tangent line 1 and tangent line 2 is the heading angle difference between the i-th pair of sampling points. The heading angle differences corresponding to each pair of sampling points are calculated respectively to obtain the heading angle difference H.

[0136] Among them, the first loss is W, the second loss is H, and the current iterative loss function is The objective function is β compensate =argminF i (W, H).

[0137] Among them, i in the loss function refers to the i-th pair of sampling points among multiple pairs of sampling points, and n refers to the total number of sampling point pairs.

[0138] wi - w0 is used to indicate the lane width difference between the i-th pair of sampling points, and hi is used to indicate the included angle degree between the tangent lines at the respective lanes of the i-th pair of sampling points.

[0139] The current iterative loss function determined based on the first loss and the second loss is used to iteratively update the candidate compensation pitch angle. The meaning of the objective function is to refer to the candidate compensation pitch angle when the loss function takes the minimum value. Determine the compensated pitch angle β that meets the difference requirements and is finally used for compensating the calibrated pitch angle compensa t e .

[0140] In summary, the method for determining the vehicle attitude provided by this application can determine the three-dimensional shape characteristics of the lane lines by collecting road images in real time, analyzing the key points of the lane lines that appear in the road images, and obtaining three-dimensional key point data. The historical lane data is used as prior data to determine the first lane data that matches the lane lines in the image, and the reference benchmark lane line for correcting the pitch angle currently can be determined based on the known shape characteristics of the lane lines. The pitch angle of the on-vehicle camera is compensated based on the morphological difference between the lane lines at both ends of the target lane in the three-dimensional key point data, and the accuracy of the compensated pitch angle is improved by iteratively updating the candidate compensated pitch angle, thereby improving the effect of correcting the calibration parameters of the on-vehicle camera.

[0141] Figure 3 is the structural block diagram of the device for determining the vehicle attitude provided by an exemplary embodiment of this application, as Figure 3 shown. The device includes the following parts.

[0142] An acquisition module 310, configured to acquire a road image collected in real time by an on-vehicle camera, and acquire key points for lane line detection in the road image, where the key points for lane line detection are key points corresponding to the lane lines and expressed in two dimensions identified from the road image;

[0143] A conversion module 320, configured to convert the key points for lane line detection into a three-dimensional space to obtain candidate three-dimensional key point data;

[0144] The acquisition module 310 is further configured to acquire first lane data from historical lane data, and acquire three-dimensional key point data from the candidate three-dimensional key point data based on the first lane data, where the three-dimensional key point data and the first lane data correspond to the same target lane, the target lane includes lane lines at both left and right ends, and the three-dimensional key point data is data obtained by performing three-dimensional conversion on the first detection key point among the key points for lane line detection;

[0145] A calibration module 330, configured to convert the first detection key point into the three-dimensional space by combining a candidate compensated pitch angle with original calibration parameters to obtain to-be-evaluated calibrated lane data, where the original calibration parameters are calibration values of the camera parameters of the on-vehicle camera;

[0146] An update module 340, configured to iteratively update the candidate compensation pitch angle based on the matching between the to-be-evaluated corrected lane data and a preset lane correction requirement, and update the to-be-evaluated corrected lane data based on the updated candidate compensation pitch angle until a compensation pitch angle that makes the to-be-evaluated corrected lane data meet the lane correction requirement is obtained.

[0147] In an optional embodiment, the update module 340 is further configured to obtain lane width data based on the to-be-evaluated corrected lane data, where the lane width data is data obtained by equally spacing sampling of the width between the left and right lane lines of the target lane, and the lane width data includes at least two line segment widths; determine a first loss based on the difference between the at least two line segment widths in the lane width data; and iteratively update the candidate compensation pitch angle through the first loss.

[0148] In an optional embodiment, the update module 340 is further configured to obtain a heading angle data based on the to-be-evaluated corrected lane data, where the heading angle data is a parallel feature between sampling points obtained by equally spacing sampling of the left and right lane lines of the target lane; determine a second loss based on the heading angle data; and iteratively update the candidate compensation pitch angle through the second loss.

[0149] In an optional embodiment, the acquisition module 310 is further configured to acquire iteration data, where the iteration data is used to calculate the candidate compensation pitch angle, and the iteration data includes a single iteration step length and a pitch angle range; and obtain the candidate compensation pitch angle based on the single iteration step length, where the candidate compensation pitch angle is within the pitch angle range.

[0150] In an optional embodiment, the update module 340 is further configured to, when updating the candidate compensation pitch angle for the i-th time, obtain the current iteration number i, where i is a positive integer; and obtain the candidate compensation pitch angle updated for the i-th time based on the product of the single iteration step length and the current iteration number i.

[0151] In an optional embodiment, the acquisition module 310 is further configured to collect a longitudinal acceleration through an acceleration sensor of the first vehicle, where the longitudinal acceleration refers to the acceleration perpendicular to the road surface during the driving of the first vehicle; and determine the single iteration step length and the pitch angle range based on the value of the longitudinal acceleration.

[0152] In an optional embodiment, the historical lane data includes lane data of at least two lanes, and the road image includes the at least two lanes;

[0153] The obtaining module 310 is further configured to obtain, for the j-th lane among the at least two lanes, the j-th lane data corresponding to the j-th lane from the historical lane data, where j is a positive integer; in response to the j-th lane data indicating that the j-th lane meets the preset reference line requirements, determining the j-th lane data as the first lane data; for the k-th lane among the candidate three-dimensional key point data, obtaining the k-th key point data corresponding to the k-th lane, where k is a positive integer; and in response to the k-th key point data and the first lane data meeting the preset lane consistency requirements, determining the k-th key point data as the three-dimensional key point data.

[0154] In an alternative embodiment, the obtaining module 310 is further configured to determine that the j-th lane meets the preset reference line requirements when the two lane lines at both ends of the j-th lane indicated by the j-th lane data are parallel and of equal width.

[0155] In an alternative embodiment, the calibration module 330 is further configured to obtain a calibrated pitch angle and a first perspective rotation matrix, where the calibrated pitch angle is a calibrated value of the pitch angle of the on-vehicle camera of the first vehicle, and the first perspective rotation matrix is used to convert the lane line detection key points into a three-dimensional space, and there is a corresponding conversion relationship between the calibrated pitch angle and the first perspective rotation matrix; generating a second perspective rotation matrix based on the candidate compensation angle and the conversion relationship; obtaining a conversion matrix based on the product of the first perspective rotation matrix and the second perspective rotation matrix, where the conversion matrix is used to calibrate the three-dimensional key point data; and converting the first detected key points into the three-dimensional space based on the conversion matrix to obtain the lane data to be evaluated and calibrated.

[0156] In summary, the vehicle attitude determination device provided in this application can, by collecting road images in real time, performing key point analysis on the lane lines appearing in the road images to obtain three-dimensional key point data, determine the three-dimensional shape characteristics of the lane lines, use the historical lane data as prior data to determine the first lane data matching the lane lines in the image therefrom, be able to determine the reference benchmark lane line for calibrating the pitch angle currently based on the known lane line shape characteristics, compensate for the pitch angle of the on-vehicle camera based on the morphological differences between the two lane lines at both ends of the target lane in the three-dimensional key point data, and improve the accuracy of the compensated pitch angle by iteratively updating the candidate compensated pitch angle, thereby improving the effect of calibrating the calibration parameters of the on-vehicle camera.

[0157] It should be noted that: for the vehicle attitude determination device provided in the above embodiments, only the division of the above functional modules is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the vehicle attitude determination device provided in the above embodiments and the vehicle attitude determination method embodiments belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.

[0158] Figure 4 FIG. shows a structural block diagram of a computer device 400 provided by an exemplary embodiment of the present application. The computer device 400 may be: a smart phone, a tablet computer, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, or a desktop computer. The computer device 400 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.

[0159] Generally, the computer device 400 includes: a processor 401 and a memory 402.

[0160] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the Central Processing Unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a Graphics Processing Unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an Artificial Intelligence (AI) processor, which is used to process computational operations related to machine learning.

[0161] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory, as well as non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 402 is used to store at least one instruction for being executed by the processor 401 to implement the method for determining the vehicle attitude provided in the method embodiments of the present application.

[0162] In some embodiments, the computer device 400 further includes some other components 403, and the types and quantities of the other components 403 may be selected based on the functional requirements of the computer device 400. Those skilled in the art can understand that Figure 4 the structure shown in does not constitute a limitation on the computer device 400, and it may include more or fewer components than shown in the figure, or combine certain components, or adopt different component arrangements.

[0163] Optionally, the computer-readable storage media may include: Read Only Memory (ROM), Random Access Memory (RAM), Solid State Drives (SSD), or optical discs, etc. Among them, the random access memory may include Resistance Random Access Memory (ReRAM) and Dynamic Random Access Memory (DRAM). The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0164] The embodiments of the present application further provide a computer device, which includes a processor and a memory. At least one instruction, at least one segment of program, code set or instruction set is stored in the memory, and the at least one instruction, the at least one segment of program, the code set or instruction set is loaded and executed by the processor to implement the method for determining the vehicle attitude as described in any one of the above embodiments of the present application.

[0165] The embodiments of the present application further provide a computer-readable storage media. At least one instruction, at least one segment of program, code set or instruction set is stored in the storage media, and the at least one instruction, the at least one segment of program, the code set or instruction set is loaded and executed by the processor to implement the method for determining the vehicle attitude as described in any one of the above embodiments of the present application.

[0166] The embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for determining the vehicle attitude described in any one of the above embodiments.

[0167] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, or the like.

[0168] The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for determining a vehicle posture, characterized in that: The method comprises: Acquire a road image captured in real time by a vehicle-mounted camera, and acquire lane line detection key points in the road image, wherein the lane line detection key points are key points corresponding to lane lines and expressed in two dimensions, obtained from the road image; Convert the lane line detection key points into three-dimensional space to obtain candidate three-dimensional key point data; Acquire first lane data from historical lane data, and acquire three-dimensional key point data from the candidate three-dimensional key point data based on the first lane data, wherein the three-dimensional key point data and the first lane data correspond to the same target lane, the target lane includes left and right lane lines, and the three-dimensional key point data is data obtained by three-dimensionally converting the first detection key point among the lane line detection key points; Converting the first detection key point to the three-dimensional space by combining the candidate compensation pitch angle with the original calibration parameters to obtain the corrected lane data to be evaluated, wherein the original calibration parameters are the calibration values ​​of the camera parameters of the vehicle-mounted camera; Based on a match between the lane data to be evaluated and corrected and a preset lane correction requirement, the candidate compensation pitch angle is iteratively updated, and the lane data to be evaluated and corrected is updated based on the updated candidate compensation pitch angle until a compensation pitch angle is obtained that makes the lane data to be evaluated and corrected meet the lane correction requirement.

2. The method according to claim 1, characterized in that The iteratively updating the candidate compensation pitch angle based on the matching between the to-be-evaluated corrected lane data and the preset lane correction requirement includes: Acquire lane width data based on the corrected lane data to be evaluated, wherein the lane width data is data obtained by sampling the width between the left and right lane lines of the target lane at equal intervals, and the lane width data includes at least two line segment widths; determining a first loss based on a difference between the widths of the at least two line segments in the lane width data; The candidate compensated pitch angles are iteratively updated using the first loss.

3. The method according to claim 1, characterized in that The iteratively updating the candidate compensation pitch angle based on the matching between the to-be-evaluated corrected lane data and the preset lane correction requirement includes: Acquire heading angle data based on the corrected lane data to be evaluated, wherein the heading angle data is a parallel feature between sampling points obtained by sampling the lane lines at both ends of the target lane at equal intervals; determining a second loss based on the heading angle data; The candidate compensated pitch angles are iteratively updated using the second loss.

4. The method according to any one of claims 1 to 3, characterized in that: Before converting the first detection key point into the three-dimensional space by combining the candidate compensation pitch angle with the original calibration parameter to obtain the lane data to be evaluated and corrected, the method further includes: Acquire iterative data, where the iterative data is used to calculate the candidate compensated pitch angle, and the iterative data includes a single iteration step length and a pitch angle range; The candidate compensated pitch angle is obtained based on the single iteration step size, wherein the candidate compensated pitch angle is within the pitch angle range.

5. The method according to claim 4, characterized in that The iterative updating of the candidate compensated pitch angles comprises: When the candidate compensation pitch angle is updated for the i-th time, obtaining the current iteration number i, where i is a positive integer; The candidate compensated pitch angle obtained by the i-th update is obtained based on the product of the single iteration step size and the current iteration number i.

6. The method according to claim 4, characterized in that The obtaining of iterative data includes: Collecting longitudinal acceleration through an acceleration sensor of the first vehicle, where the longitudinal acceleration refers to the acceleration perpendicular to the road surface during the driving of the first vehicle; The single iteration step size and the pitch angle range are determined based on the value of the longitudinal acceleration.

7. The method according to any one of claims 1 to 3, characterized in that: The historical lane data includes lane data of at least two lanes, and the road image includes the at least two lanes; The acquiring first lane data from the historical lane data, and acquiring three-dimensional key point data from the candidate three-dimensional key point data based on the first lane data, includes: For a j-th lane among the at least two lanes, obtaining j-th lane data corresponding to the j-th lane from the historical lane data, where j is a positive integer; In response to the j-th lane data indicating that the j-th lane meets a preset reference line requirement, determining the j-th lane data as the first lane data; For the kth lane in the candidate three-dimensional key point data, obtain the kth key point data corresponding to the kth lane, where k is a positive integer; In response to the k-th key point data and the first lane data meeting a preset lane consistency requirement, the k-th key point data is determined as the three-dimensional key point data.

8. The method according to claim 7, characterized in that The method further comprises: When the j-th lane data indicates that the lane lines at both ends of the j-th lane are parallel and have the same width, it is determined that the j-th lane meets the preset reference line requirement.

9. The method according to any one of claims 1 to 3, characterized in that: The converting the first detection key point into the three-dimensional space by combining the candidate compensation pitch angle with the original calibration parameter to obtain the lane data to be evaluated and corrected includes: Obtaining a calibrated pitch angle and a first perspective rotation matrix, wherein the calibrated pitch angle is a calibrated value of the pitch angle of the onboard camera of the first vehicle, and the first perspective rotation matrix is ​​used to convert the lane line detection key points into a three-dimensional space, and there is a corresponding conversion relationship between the calibrated pitch angle and the first perspective rotation matrix; generating a second perspective rotation matrix based on the candidate compensation angles and the conversion relationship; Acquire a transformation matrix based on the product of the first perspective rotation matrix and the second perspective rotation matrix, wherein the transformation matrix is ​​used to correct the three-dimensional key point data; The first detection key point is converted to the three-dimensional space based on the conversion matrix to obtain the corrected lane data to be evaluated.

10. A device for determining a vehicle posture, characterized in that: The device comprises: An acquisition module is used to acquire a road image captured in real time by a vehicle-mounted camera, and to acquire key points for lane line detection in the road image, wherein the key points for lane line detection are key points corresponding to lane lines and expressed in two dimensions, obtained from the road image; A conversion module, used to convert the lane line detection key points into three-dimensional space to obtain candidate three-dimensional key point data; The acquisition module is further used to acquire first lane data from historical lane data, and acquire three-dimensional key point data from the candidate three-dimensional key point data based on the first lane data, wherein the three-dimensional key point data and the first lane data correspond to the same target lane, the target lane includes left and right lane lines, and the three-dimensional key point data is data obtained by three-dimensionally converting the first detection key point among the lane line detection key points; a correction module, configured to convert the first detection key point into the three-dimensional space by combining a candidate compensation pitch angle with an original calibration parameter to obtain corrected lane data to be evaluated, wherein the original calibration parameter is a calibration value of a camera parameter of the vehicle-mounted camera; An updating module is used to iteratively update the candidate compensation pitch angle based on the matching between the lane data to be evaluated and the preset lane correction requirement, and update the lane data to be evaluated and corrected based on the updated candidate compensation pitch angle until a compensation pitch angle that makes the lane data to be evaluated and corrected meet the lane correction requirement is obtained.