CN114549645A - Method and device for calculating course angle of target vehicle based on visual information - Google Patents
Method and device for calculating course angle of target vehicle based on visual information Download PDFInfo
- Publication number
- CN114549645A CN114549645A CN202210182625.9A CN202210182625A CN114549645A CN 114549645 A CN114549645 A CN 114549645A CN 202210182625 A CN202210182625 A CN 202210182625A CN 114549645 A CN114549645 A CN 114549645A
- Authority
- CN
- China
- Prior art keywords
- wheels
- frame
- vehicle
- target
- course angle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C1/00—Measuring angles
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Traffic Control Systems (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a method for calculating a target vehicle course angle based on visual information, which comprises the steps of obtaining a target whole frame and a body frame, a tail frame, a head frame and a wheel frame of a target vehicle from a target detection network, calculating intersection and parallel ratios of the body frame, the tail frame, the head frame and the wheel frame with the target whole frame according to pixel coordinates of the body frame, the tail frame, the head frame and the wheel frame, judging the position of a detected part of the target vehicle, and calculating course angles under different driving conditions by adopting different calculation methods according to different detected parts and the number conditions of detected wheels. The invention also discloses a related device for realizing the method, so that the detection is more comprehensive, and the result is accurate and reliable.
Description
Technical Field
The invention relates to the technical field of intelligent driving of automobiles, in particular to a method and a device for calculating a target vehicle course angle based on visual information.
Background
In the case of the automated driving vehicle exterior vision, the attitude estimation and the attribute calculation of other target vehicles on the road are necessary. The target vehicle can be effectively avoided and the target vehicle behavior can be responded in time to ensure the safety of the vehicle by utilizing the attribute of the target. Where the heading angle is an important point in the target vehicle attribute. The course angle is an included angle of the body direction of the target vehicle relative to the body direction of the vehicle under a ground coordinate system.
For the related technical scheme of the current stage of calculating the target vehicle course angle, the Chinese patent with publication number CN111291786A discloses a vehicle-mounted vision real-time multi-target course angle estimation method and device, wherein the course angle is directly output by a neural network and a data label through deep learning and the network, but the method needs a large amount of calibration data support and a model training process; chinese patent application No. CN110962844A discloses a method for correcting a vehicle heading angle, a system storage medium, and a terminal, wherein the calculation of the heading angle only refers to the case when wheels on the same side are detected at the same time, but does not refer to the case when two wheels are not detected, which has certain limitations.
Disclosure of Invention
Aiming at the defects of the prior art, the technical problems to be solved by the invention are as follows: how to provide a method for calculating course angles under different driving conditions by adopting different calculation methods according to different types of vehicle conditions.
In order to solve the technical problems, the invention adopts the following technical scheme:
a method for calculating a target vehicle course angle based on visual information is characterized in that: the method comprises the following steps:
(1) acquiring a detection frame of a target vehicle from a target detection network, wherein the detection frame comprises a target whole frame, a tail frame, a head frame and a wheel frame, respectively detecting pixel coordinates of a left upper point and a right lower point of a frame rectangle of the target whole frame, the body frame, the tail frame, the head frame and the wheel frame, calculating pixel coordinate information of a required grounding point of the detection frame, and converting the pixel coordinates into distance information of a world coordinate system by calling a coordinate conversion function;
(2) according to the pixel coordinates of the vehicle body frame, the vehicle tail frame, the vehicle head frame and the vehicle wheel frame, calculating the intersection ratio of the vehicle tail frame, the vehicle head frame and the vehicle wheel frame with the whole target frame respectively, integrating the detected target frames of the same target, and judging the position of the detected part of the target vehicle, if the vehicle tail frame is detected, executing the step (3), if the vehicle head frame is detected, executing the step (4), and if only the whole target frame is detected, executing the step (5);
(3) judging the number of the detected wheels, if the number of the detected wheels is more than or equal to 2, and if the number of the detected wheels is more than or equal to 2, the wheels with the transverse distances between the grounding points C (X, Y) of the tailstock and the grounding points of the wheels which are both more than 0 or both less than 0 are taken as the wheels on the same side, otherwise, the wheels on different sides;
if the wheels are the same-side wheels, two wheels with the largest distance between the wheel grounding points of all the wheels, namely the wheel A (X1, Y1) and the wheel B (X2, Y2), are selected, and the orientation of the wheels is judged according to the distance between the two wheels and the grounding point C (X, Y) of the tail frame, for exampleThe wheel B is a wheel close to the tail frame, and the direction vector pointing to the head determined by the two wheels isThe direction vector of the vehicle is the unit vectorCalculating an included angle between the vehicle and the target vehicle according to the cosine function:
according to the fact that the panoramic course angle coverage angle of the vehicle is-360 degrees, the sine function is used for calculating the positive and negative of the angle:
If the wheels are different-side wheels, the coordinates of the connecting line between the midpoint of the connecting line of the wheels N (X1, Y1) and the wheels M (X2, Y2) and the grounding point C (X, Y) of the tail frame are calculated, and the direction vector pointing to the head frame of the target vehicle, namely the direction vectorUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of a course angle according to a formula I and a formula II;
if the number of the detected wheels is 1, judging the position of the wheels according to the difference of the lateral distance between the grounding point C (X, Y) of the tail frame and the grounding point of the wheels, and if the difference is more than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X1, Y1) of the right lower point of the tail frame and the coordinates A (X2, Y2) of the grounding point of the wheelsUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of a course angle according to a formula I and a formula II; if the difference is less than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X3, Y3) of the left lower corner point of the tail frame and the coordinates A (X2, Y2) of the wheel grounding pointUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula I and a formula II
If the number of the detected wheels is 0, judging according to the intersection ratio of the tail frame and the target whole frame, if the intersection ratio of the tail frame and the target whole frame is larger than k, and the range of the k value is 0.93-0.95, judging that the tail part of the target vehicle is opposite to the vehicle, and determining the course angle of the target vehicle according to the camera of the vehicle; if the intersection ratio of the tail frame and the whole target frame is less than or equal to k, the range of k value is 0.93-0.95, the transverse speed and the longitudinal speed of the target vehicle are obtained, and the course angle of the target vehicle is calculated by combining the longitudinal speed of the vehicle and utilizing a trigonometric function;
(4) judging the number of the detected wheels, if the number of the detected wheels is more than or equal to 2, and if the number of the detected wheels is more than or equal to 2, the wheels with the transverse distances between the grounding points C (X, Y) of the head frame and the grounding points of the wheels being both more than 0 or both less than 0 are taken as the same-side wheels, otherwise, the wheels are taken as different-side wheels;
if the wheels are the same-side wheels, two wheels with the largest distance between the wheel contact points of all the wheels, namely the wheel A (X1, Y1) and the wheel B (X2, Y2), are selected, and the orientation of the wheels is judged according to the distance between the two wheels and the head frame contact point C (X, Y), such asThe wheel A is the wheel close to the frame of the vehicle head, and the direction vector pointing to the vehicle head determined by the two wheels isThe direction vector of the vehicle is the unit vectorCalculating an included angle between the vehicle and the target vehicle according to the cosine function:
according to the fact that the panoramic course angle coverage angle of the vehicle is-360 degrees, the sine function is used for calculating the positive and negative of the angle:
if the wheels are different-side wheels, the coordinates of the connecting line between the midpoint of the connecting line of the wheel N (X1, Y1) and the wheel M (X2, Y2) and the head frame grounding point C (X, Y) are calculated, and the direction vector pointing to the head frame of the target vehicle, i.e. the direction vectorUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula (III) and a formula (IV);
if the number of the detected wheels is 1, judging the positions of the wheels according to the difference of the lateral distances between the grounding points C (X, Y) of the head frame and the grounding points of the wheels, and if the number of the detected wheels is more than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X1, Y1) of the right lower point of the head frame and the coordinates A (X2, Y2) of the grounding points of the wheelsUsing target vehicle direction vectorDirection vector of the vehicleAnd calculating the magnitude of the course angle according to the formula (III) and the formula (IV). If the difference is less than 0, the coordinate of the pixel Z (X3, Y3) of the left lower corner point of the head frame and the coordinate A (X2, Y2) of the grounding point of the wheel are countedCalculating the direction vector of the vehicleUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula (III) and a formula (IV);
if the number of the detected wheels is 0, judging according to the intersection ratio of the head frame and the target whole frame, if the intersection ratio of the head frame and the target whole frame is larger than k, and the range of the k value is 0.93-0.95, judging that the head part of the target vehicle is over against the vehicle, and determining the course angle of the target vehicle according to the camera of the vehicle; if the intersection ratio of the head frame and the whole target frame is less than or equal to k, the range of the k value is 0.93-0.95, the transverse speed and the longitudinal speed of the target vehicle are obtained, and the magnitude of the course angle of the target vehicle is calculated by combining the longitudinal speed of the vehicle and utilizing a trigonometric function;
(5) if two wheels are detected, determining the direction vector of the target vehicle according to the connecting line of the two wheels and the direction of the longitudinal speed of the target vehicleUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula I and a formula II;
if only one wheel is detected, the transverse speed and the longitudinal speed of the target vehicle are obtained according to the tracking logic, and the course angle of the target vehicle is obtained by combining the longitudinal speed of the vehicle and calculating by utilizing a trigonometric function.
As optimization, if any one of the detection conditions in the steps (3) to (5) cannot be satisfied, the heading angle is 0.
As an optimization, in the step (3), if the number of detected wheels is greater than or equal to 2, the confidence of the course angle is 1, if the number of detected wheels is 1 and the difference between the lateral distance between the grounding point of the tailstock and the grounding point of the wheels is greater than 0, the confidence of the course angle is 0.1, if the number of detected wheels is 0 and the intersection ratio of the tailstock and the target whole frame is greater than k, the confidence of the course angle is 1, and if the number of detected wheels is 0 and the intersection ratio of the tailstock and the target whole frame is less than or equal to k, the confidence of the course angle is 0;
in the step (4), if the number of detected wheels is more than or equal to 2, the confidence coefficient of the course angle is 1, if the number of detected wheels is 1 and the difference between the transverse distance between the grounding point of the tail frame and the grounding point of the wheels is more than 0, the confidence coefficient of the course angle is 0.1, if the number of detected wheels is 0 and the intersection ratio of the head frame and the target whole frame is more than k, the confidence coefficient of the course angle is 1, and if the number of detected wheels is 0 and the intersection ratio of the head frame and the target whole frame is less than or equal to k, the confidence coefficient of the course angle is 0;
in the step (5), if two wheels are detected, the confidence coefficient of the course angle is 1, and if only one wheel is detected, the confidence coefficient of the course angle is 0;
if any detection condition from the step (3) to the step (5) cannot be met, the confidence coefficient of the course angle is 0;
if the confidence coefficient of the course angle of five continuous detection periods is always 0 and the calculated course angle does not jump, directly outputting the calculated course angle; and otherwise, the course angle is the sum of products of the calculated course angle value and the confidence coefficient of the course angle in five continuous detection periods, and then the sum of the confidence coefficients of the five detection periods is divided for carrying out sliding window filtering.
An electronic device implementing a method for calculating a target vehicle heading angle based on visual information includes a memory configured to store executable instructions;
a processor configured to execute executable instructions stored in the memory to implement the one method of calculating a target vehicle heading angle based on visual information described above.
A computer readable storage medium having computer program instructions stored thereon for performing the above-described method for calculating a target vehicle heading angle based on visual information.
In conclusion, the beneficial effects of the invention are as follows: the invention utilizes the information detected by the detection network, calculates the course angles of the target vehicles under different working conditions according to different output results of the detection frames, and has more comprehensive detection and accurate and reliable result.
Drawings
For purposes of promoting a better understanding of the objects, aspects and advantages of the invention, reference will now be made in detail to the present invention as illustrated in the accompanying drawings, in which:
FIG. 1 is a schematic view of a course angle calculation process according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, a method for calculating a target vehicle heading angle based on visual information in the present embodiment is characterized in that: the method comprises the following steps:
(1) acquiring a detection frame of a target vehicle from a target detection network, wherein the detection frame comprises a target whole frame, a tail frame, a head frame and a wheel frame, respectively detecting pixel coordinates of a left upper point and a right lower point of a frame rectangle of the target whole frame, the body frame, the tail frame, the head frame and the wheel frame, calculating pixel coordinate information of a required grounding point of the detection frame, and converting the pixel coordinates into distance information of a world coordinate system by calling a coordinate conversion function;
(2) according to the pixel coordinates of the vehicle body frame, the vehicle tail frame, the vehicle head frame and the vehicle wheel frame, calculating the intersection ratio of the vehicle tail frame, the vehicle head frame and the vehicle wheel frame with the whole target frame respectively, integrating the detected target frames of the same target, and judging the position of the detected part of the target vehicle, if the vehicle tail frame is detected, executing the step (3), if the vehicle head frame is detected, executing the step (4), and if only the whole target frame is detected, executing the step (5);
(3) judging the number of the detected wheels, if the number of the detected wheels is more than or equal to 2, and if the number of the detected wheels is more than or equal to 2, the wheels with the transverse distances between the grounding points C (X, Y) of the tailstock and the grounding points of the wheels which are both more than 0 or both less than 0 are taken as the wheels on the same side, otherwise, the wheels on different sides;
if the wheels are the same-side wheels, two wheels with the largest distance between the wheel grounding points of all the wheels, namely the wheel A (X1, Y1) and the wheel B (X2, Y2), are selected, and the orientation of the wheels is judged according to the distance between the two wheels and the grounding point C (X, Y) of the tail frame, for exampleThe wheel B is a wheel close to the tail frame, and the direction vector pointing to the head determined by the two wheels isThe direction vector of the vehicle is the unit vectorCalculating an included angle between the vehicle and the target vehicle according to the cosine function:
according to the fact that the panoramic course angle coverage angle of the vehicle is-360 degrees, the sine function is used for calculating the positive and negative of the angle:
if the wheels are different side wheels, the coordinates of the connecting line of the midpoint of the connecting line of the wheel N (X1, Y1) and the wheel M (X2, Y2) and the grounding point C (X, Y) of the tail frame are calculated, and the connecting line points to the direction vector of the head frame of the target vehicle, namely the direction vectorUsing target vehicleVector of directionDirection vector of the vehicleCalculating the magnitude of a course angle according to a formula I and a formula II;
if the number of the detected wheels is 1, judging the position of the wheels according to the difference of the lateral distances between the grounding points C (X, Y) of the tail frame and the grounding points of the wheels, and if the number of the detected wheels is more than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X1, Y1) of the right lower point of the tail frame and the coordinates A (X2, Y2) of the grounding points of the wheelsUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of a course angle according to a formula I and a formula II; if the difference is less than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X3, Y3) of the left lower corner point of the tail frame and the coordinates A (X2, Y2) of the wheel grounding pointUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula I and a formula II
If the number of the detected wheels is 0, judging according to the intersection ratio of the tail frame and the target whole frame, if the intersection ratio of the tail frame and the target whole frame is larger than k, and the range of the k value is 0.93-0.95, judging that the tail part of the target vehicle is opposite to the vehicle, and determining the course angle of the target vehicle according to the camera of the vehicle; if the intersection ratio of the tail frame and the whole target frame is less than or equal to k, the range of k value is 0.93-0.95, the transverse speed and the longitudinal speed of the target vehicle are obtained, and the course angle of the target vehicle is calculated by combining the longitudinal speed of the vehicle and utilizing a trigonometric function;
(4) judging the number of the detected wheels, if the number of the detected wheels is more than or equal to 2, and if the number of the detected wheels is more than or equal to 2, the wheels with the transverse distances between the grounding points C (X, Y) of the head frame and the grounding points of the wheels being both more than 0 or both less than 0 are taken as the same-side wheels, otherwise, the wheels are taken as different-side wheels;
if the wheels are the same-side wheels, two wheels with the largest distance between the wheel contact points of all the wheels, namely the wheel A (X1, Y1) and the wheel B (X2, Y2), are selected, and the orientation of the wheels is judged according to the distance between the two wheels and the head frame contact point C (X, Y), such asThe wheel A is the wheel close to the frame of the vehicle head, and the direction vector pointing to the vehicle head determined by the two wheels isThe direction vector of the vehicle is the unit vectorCalculating an included angle between the vehicle and the target vehicle according to the cosine function:
according to the fact that the panoramic course angle coverage angle of the vehicle is-360 degrees, the sine function is used for calculating the positive and negative of the angle:
if the wheels are different-side wheels, the coordinates of the connecting line between the midpoint of the connecting line of the wheel N (X1, Y1) and the wheel M (X2, Y2) and the head frame grounding point C (X, Y) are calculated, and the direction vector pointing to the head frame of the target vehicle, i.e. the direction vectorUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula (III) and a formula (IV);
if the number of the detected wheels is 1, judging the positions of the wheels according to the difference of the lateral distances between the grounding points C (X, Y) of the head frame and the grounding points of the wheels, and if the number of the detected wheels is more than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X1, Y1) of the right lower point of the head frame and the coordinates A (X2, Y2) of the grounding points of the wheelsUsing target vehicle direction vectorDirection vector of the vehicleAnd calculating the magnitude of the course angle according to the formula (III) and the formula (IV). If the difference is less than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X3, Y3) of the left lower corner point of the head frame and the coordinates A (X2, Y2) of the grounding point of the wheelUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula (III) and a formula (IV);
if the number of the detected wheels is 0, judging according to the intersection ratio of the head frame and the target whole frame, if the intersection ratio of the head frame and the target whole frame is larger than k, and the range of the k value is 0.93-0.95, judging that the head part of the target vehicle is over against the vehicle, and determining the course angle of the target vehicle according to the camera of the vehicle; if the intersection ratio of the head frame and the whole target frame is less than or equal to k, the range of the k value is 0.93-0.95, the transverse speed and the longitudinal speed of the target vehicle are obtained, and the magnitude of the course angle of the target vehicle is calculated by combining the longitudinal speed of the vehicle and utilizing a trigonometric function;
(5) if two wheels are detected, determining the direction vector of the target vehicle according to the connecting line of the two wheels and the direction of the longitudinal speed of the target vehicleUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of a course angle according to a formula I and a formula II;
if only one wheel is detected, the transverse speed and the longitudinal speed of the target vehicle are obtained according to the tracking logic, and the course angle of the target vehicle is obtained by combining the longitudinal speed of the vehicle and calculating by utilizing a trigonometric function.
In this embodiment, if any one of the detection conditions in the steps (3) to (5) cannot be satisfied, the course angle is 0.
In this embodiment, in the step (3), if the number of detected wheels is greater than or equal to 2, the confidence of the heading angle is 1, if the number of detected wheels is 1 and the difference between the lateral distance between the grounding point of the car tail frame and the grounding point of the wheels is greater than 0, the confidence of the heading angle is 0.1, if the number of detected wheels is 0 and the intersection ratio of the car tail frame and the target whole frame is greater than k, the confidence of the heading angle is 1, and if the number of detected wheels is 0 and the intersection ratio of the car tail frame and the target whole frame is less than or equal to k, the confidence of the heading angle is 0; in the step (4), if the number of detected wheels is more than or equal to 2, the confidence coefficient of the course angle is 1, if the number of detected wheels is 1 and the difference between the transverse distance between the grounding point of the tail frame and the grounding point of the wheels is more than 0, the confidence coefficient of the course angle is 0.1, if the number of detected wheels is 0 and the intersection ratio of the head frame and the target whole frame is more than k, the confidence coefficient of the course angle is 1, and if the number of detected wheels is 0 and the intersection ratio of the head frame and the target whole frame is less than or equal to k, the confidence coefficient of the course angle is 0;
in the step (5), if two wheels are detected, the confidence coefficient of the course angle is 1, and if only one wheel is detected, the confidence coefficient of the course angle is 0;
if any detection condition from the step (3) to the step (5) cannot be met, the confidence coefficient of the course angle is 0;
if the confidence coefficient of the course angle of five continuous detection periods is always 0 and the calculated course angle does not jump, directly outputting the calculated course angle; and otherwise, the course angle is the sum of products of the calculated course angle value and the confidence coefficient of the course angle in five continuous detection periods, and then the sum of the confidence coefficients of the five detection periods is divided for carrying out sliding window filtering.
The invention also discloses electronic equipment for realizing the method for calculating the target vehicle course angle based on the visual information, which comprises a memory, a first display unit and a second display unit, wherein the memory is configured to store executable instructions;
a processor configured to execute executable instructions stored in the memory to implement the one method of calculating a target vehicle heading angle based on visual information described above.
The invention also discloses a computer readable storage medium having computer program instructions stored thereon for executing the above-mentioned method for calculating the course angle of the target vehicle based on the visual information.
Finally, it is noted that the above-mentioned embodiments illustrate rather than limit the invention, and that, while the invention has been described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (5)
1. A method for calculating a target vehicle course angle based on visual information is characterized in that: the method comprises the following steps:
(1) acquiring a detection frame of a target vehicle from a target detection network, wherein the detection frame comprises a target whole frame, a tail frame, a head frame and a wheel frame, respectively detecting pixel coordinates of a left upper point and a right lower point of a frame rectangle of the target whole frame, the body frame, the tail frame, the head frame and the wheel frame, calculating pixel coordinate information of a required grounding point of the detection frame, and converting the pixel coordinates into distance information of a world coordinate system by calling a coordinate conversion function;
(2) according to the pixel coordinates of the vehicle body frame, the vehicle tail frame, the vehicle head frame and the vehicle wheel frame, calculating the intersection ratio of the vehicle tail frame, the vehicle head frame and the vehicle wheel frame with the whole target frame respectively, integrating the detected target frames of the same target, and judging the position of the detected part of the target vehicle, if the vehicle tail frame is detected, executing the step (3), if the vehicle head frame is detected, executing the step (4), and if only the whole target frame is detected, executing the step (5);
(3) judging the number of the detected wheels, if the number of the detected wheels is more than or equal to 2, and if the number of the detected wheels is more than or equal to 2, the wheels with the transverse distances between the grounding points C (X, Y) of the tailstock and the grounding points of the wheels which are both more than 0 or both less than 0 are taken as the wheels on the same side, otherwise, the wheels on different sides;
if the wheels are the same-side wheels, two wheels with the largest distance between the wheel grounding points of all the wheels, namely the wheel A (X1, Y1) and the wheel B (X2, Y2), are selected, and the orientation of the wheels is judged according to the distance between the two wheels and the grounding point C (X, Y) of the tail frame, for exampleThe wheel B is the wheel close to the tail frame, and the direction vector pointing to the head determined according to the two wheels isThe direction vector of the vehicle is the unit vectorCalculating an included angle between the vehicle and the target vehicle according to the cosine function:
according to the fact that the panoramic course angle coverage angle of the vehicle is-360 degrees, the sine function is used for calculating the positive and negative of the angle:
if the wheels are different-side wheels, the coordinates of the connecting line between the midpoint of the connecting line of the wheels N (X1, Y1) and the wheels M (X2, Y2) and the grounding point C (X, Y) of the tail frame are calculated, and the direction vector pointing to the head frame of the target vehicle, namely the direction vectorUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula I and a formula II;
if the number of the detected wheels is 1, judging the position of the wheels according to the difference of the lateral distances between the grounding points C (X, Y) of the tail frame and the grounding points of the wheels, and if the number of the detected wheels is more than 0, judging the position of the wheels according to the pixel coordinates of the lower right point of the tail frameZ (X1, Y1) and coordinates A (X2, Y2) of the wheel grounding point calculate the direction vector of the vehicleUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of a course angle according to a formula I and a formula II; if the difference is less than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X3, Y3) of the left lower corner point of the tail frame and the coordinates A (X2, Y2) of the wheel grounding pointUsing target vehicle direction vectorDirection vector of the vehicleCalculating course angle according to formula (I) and formula (II)
If the number of the detected wheels is 0, judging according to the intersection ratio of the tail frame and the target whole frame, if the intersection ratio of the tail frame and the target whole frame is larger than k, and the range of the k value is 0.93-0.95, judging that the tail part of the target vehicle is opposite to the vehicle, and determining the course angle of the target vehicle according to the camera of the vehicle; if the intersection ratio of the tail frame and the whole target frame is less than or equal to k, the range of k value is 0.93-0.95, the transverse speed and the longitudinal speed of the target vehicle are obtained, and the course angle of the target vehicle is calculated by combining the longitudinal speed of the vehicle and utilizing a trigonometric function;
(4) judging the number of the detected wheels, if the number of the detected wheels is more than or equal to 2, and if the lateral distances between the grounding points C (X, Y) of the head frame and the grounding points of the wheels are both more than 0 or both less than 0, determining the wheels as same-side wheels, otherwise, determining the wheels as different-side wheels;
if the wheels are the same-side wheels, two wheels having the largest distance between the wheel contact points among all the wheels, i.e., wheel A (X1, Y1) and wheel B (X2, Y2), are selected, and the orientation of the wheel is determined based on the distance between the two wheels and the head frame contact point C (X, Y), e.g., the wheel is determinedThe wheel A is the wheel close to the frame of the vehicle head, and the direction vector pointing to the vehicle head determined by the two wheels isThe direction vector of the vehicle is the unit vectorCalculating an included angle between the vehicle and the target vehicle according to the cosine function:
according to the fact that the panoramic course angle coverage angle of the vehicle is-360 degrees, the sine function is used for calculating the positive and negative of the angle:
if the wheel is a different side wheel, the coordinate of the line connecting the midpoint of the line connecting the wheel N (X1, Y1) and the wheel M (X2, Y2) and the head frame grounding point C (X, Y) is calculated, and the direction vector pointing to the head frame of the subject vehicle, i.e., the direction vectorUsing target vehicleVector of directionDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula (III) and a formula (IV);
if the number of the detected wheels is 1, judging the positions of the wheels according to the difference of the lateral distances between the grounding points C (X, Y) of the head frame and the grounding points of the wheels, and if the number of the detected wheels is more than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X1, Y1) of the right lower point of the head frame and the coordinates A (X2, Y2) of the grounding points of the wheelsUsing target vehicle direction vectorDirection vector of the vehicleAnd calculating the magnitude of the course angle according to the formula (III) and the formula (IV). If the difference is less than 0, calculating the direction vector of the vehicle according to the pixel coordinates Z (X3, Y3) of the left lower corner point of the head frame and the coordinates A (X2, Y2) of the grounding point of the wheelUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of the course angle according to a formula (III) and a formula (IV);
if the number of the detected wheels is 0, judging according to the intersection ratio of the head frame and the target whole frame, if the intersection ratio of the head frame and the target whole frame is larger than k, and the range of the k value is 0.93-0.95, judging that the head part of the target vehicle is over against the vehicle, and determining the course angle of the target vehicle according to the camera of the vehicle; if the intersection ratio of the head frame and the whole target frame is less than or equal to k, the range of the k value is 0.93-0.95, the transverse speed and the longitudinal speed of the target vehicle are obtained, and the magnitude of the course angle of the target vehicle is calculated by combining the longitudinal speed of the vehicle and utilizing a trigonometric function;
(5) if two wheels are detected, determining the direction vector of the target vehicle according to the connecting line of the two wheels and the direction of the longitudinal speed of the target vehicleUsing target vehicle direction vectorDirection vector of the vehicleCalculating the magnitude of a course angle according to a formula I and a formula II;
if only one wheel is detected, the transverse speed and the longitudinal speed of the target vehicle are obtained according to the tracking logic, and the course angle of the target vehicle is obtained by combining the longitudinal speed of the vehicle and calculating by utilizing a trigonometric function.
2. The method of claim 1, wherein the step of calculating the target vehicle heading angle based on the visual information comprises: and (5) if any detection condition from the step (3) to the step (5) cannot be met, the course angle is 0.
3. The method of claim 2, wherein the step of calculating the target vehicle heading angle based on the visual information comprises: in the step (3), if the number of detected wheels is more than or equal to 2, the confidence coefficient of the course angle is 1, if the number of detected wheels is 1 and the difference between the lateral distance between the grounding point of the tailstock frame and the grounding point of the wheels is more than 0, the confidence coefficient of the course angle is 0.1, if the number of detected wheels is 0 and the intersection ratio of the tailstock frame and the target whole frame is more than k, the confidence coefficient of the course angle is 1, and if the number of detected wheels is 0 and the intersection ratio of the tailstock frame and the target whole frame is less than or equal to k, the confidence coefficient of the course angle is 0;
in the step (4), if the number of detected wheels is more than or equal to 2, the confidence coefficient of the course angle is 1, if the number of detected wheels is 1 and the difference between the transverse distance between the grounding point of the tail frame and the grounding point of the wheels is more than 0, the confidence coefficient of the course angle is 0.1, if the number of detected wheels is 0 and the intersection ratio of the head frame and the target whole frame is more than k, the confidence coefficient of the course angle is 1, and if the number of detected wheels is 0 and the intersection ratio of the head frame and the target whole frame is less than or equal to k, the confidence coefficient of the course angle is 0;
in the step (5), if two wheels are detected, the confidence coefficient of the course angle is 1, and if only one wheel is detected, the confidence coefficient of the course angle is 0;
if any detection condition from the step (3) to the step (5) cannot be met, the confidence coefficient of the course angle is 0;
if the confidence coefficient of the course angle of five continuous detection periods is always 0 and the calculated course angle does not jump, directly outputting the calculated course angle; and otherwise, the course angle is the sum of products of the calculated course angle value and the confidence coefficient of the course angle in five continuous detection periods, and then the sum of the confidence coefficients of the five detection periods is divided for carrying out sliding window filtering.
4. An electronic device for realizing a method for calculating a target vehicle course angle based on visual information is characterized in that: comprising a memory configured to store executable instructions;
a processor configured to execute executable instructions stored in the memory to implement the method of any one of claims 1 to 3.
5. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: the computer program instructions perform the method of any of the preceding claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210182625.9A CN114549645A (en) | 2022-02-27 | 2022-02-27 | Method and device for calculating course angle of target vehicle based on visual information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210182625.9A CN114549645A (en) | 2022-02-27 | 2022-02-27 | Method and device for calculating course angle of target vehicle based on visual information |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114549645A true CN114549645A (en) | 2022-05-27 |
Family
ID=81679489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210182625.9A Pending CN114549645A (en) | 2022-02-27 | 2022-02-27 | Method and device for calculating course angle of target vehicle based on visual information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114549645A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115817463A (en) * | 2023-02-23 | 2023-03-21 | 禾多科技(北京)有限公司 | Vehicle obstacle avoidance method and device, electronic equipment and computer readable medium |
CN115861975A (en) * | 2023-02-28 | 2023-03-28 | 杭州枕石智能科技有限公司 | Obstacle vehicle pose estimation method and device |
CN116681884A (en) * | 2023-08-02 | 2023-09-01 | 腾讯科技(深圳)有限公司 | Object detection method and related device |
CN117553695A (en) * | 2024-01-11 | 2024-02-13 | 摩斯智联科技有限公司 | Method, apparatus and computer storage medium for calculating vehicle height based on aspect ratio suppression noise |
CN117553695B (en) * | 2024-01-11 | 2024-05-03 | 摩斯智联科技有限公司 | Method and device for calculating vehicle height and computer storage medium |
-
2022
- 2022-02-27 CN CN202210182625.9A patent/CN114549645A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115817463A (en) * | 2023-02-23 | 2023-03-21 | 禾多科技(北京)有限公司 | Vehicle obstacle avoidance method and device, electronic equipment and computer readable medium |
CN115861975A (en) * | 2023-02-28 | 2023-03-28 | 杭州枕石智能科技有限公司 | Obstacle vehicle pose estimation method and device |
CN116681884A (en) * | 2023-08-02 | 2023-09-01 | 腾讯科技(深圳)有限公司 | Object detection method and related device |
CN116681884B (en) * | 2023-08-02 | 2023-12-08 | 腾讯科技(深圳)有限公司 | Object detection method and related device |
CN117553695A (en) * | 2024-01-11 | 2024-02-13 | 摩斯智联科技有限公司 | Method, apparatus and computer storage medium for calculating vehicle height based on aspect ratio suppression noise |
CN117553695B (en) * | 2024-01-11 | 2024-05-03 | 摩斯智联科技有限公司 | Method and device for calculating vehicle height and computer storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114549645A (en) | Method and device for calculating course angle of target vehicle based on visual information | |
CN106256606B (en) | A kind of lane departure warning method based on vehicle-mounted binocular camera | |
CN102591332B (en) | Device and method for local path planning of pilotless automobile | |
CN110745140B (en) | Vehicle lane change early warning method based on continuous image constraint pose estimation | |
Noda et al. | Vehicle ego-localization by matching in-vehicle camera images to an aerial image | |
CN111521195B (en) | Intelligent robot | |
CN103679119B (en) | Self adaptation slope road detection method and device | |
CN111098815A (en) | ADAS front vehicle collision early warning method based on monocular vision fusion millimeter waves | |
CN110738181B (en) | Method and device for determining vehicle orientation information | |
CN111563474A (en) | Obstacle detection method and system based on vehicle-mounted fisheye lens under motion background | |
EP4296713A1 (en) | Target detection method, storage medium, electronic device, and vehicle | |
CN113920198B (en) | Coarse-to-fine multi-sensor fusion positioning method based on semantic edge alignment | |
CN112927309A (en) | Vehicle-mounted camera calibration method and device, vehicle-mounted camera and storage medium | |
CN110738668A (en) | method and system for intelligently controlling high beam and vehicle | |
CN110555801A (en) | Correction method, terminal and storage medium for track deduction | |
CN116543032B (en) | Impact object ranging method, device, ranging equipment and storage medium | |
CN111046809B (en) | Obstacle detection method, device, equipment and computer readable storage medium | |
Eraqi et al. | Static free space detection with laser scanner using occupancy grid maps | |
CN108454619B (en) | Driving assistance method and system | |
CN116189150A (en) | Monocular 3D target detection method, device, equipment and medium based on fusion output | |
CN114037977B (en) | Road vanishing point detection method, device, equipment and storage medium | |
CN114495038B (en) | Post-processing method for automatic driving detection marking data | |
CN115848359A (en) | Parking space self-adaptive parking route planning method, vehicle and storage medium | |
CN110033493B (en) | Camera 3D calibration method and terminal | |
CN114972427A (en) | Target tracking method based on monocular vision, terminal equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |