CN116823931A - Method and device for calculating initial course angle of vehicle and electronic equipment - Google Patents

Method and device for calculating initial course angle of vehicle and electronic equipment Download PDF

Info

Publication number
CN116823931A
CN116823931A CN202310621797.6A CN202310621797A CN116823931A CN 116823931 A CN116823931 A CN 116823931A CN 202310621797 A CN202310621797 A CN 202310621797A CN 116823931 A CN116823931 A CN 116823931A
Authority
CN
China
Prior art keywords
target vehicle
vehicle
surrounding
road
detection result
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
Application number
CN202310621797.6A
Other languages
Chinese (zh)
Inventor
张上鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mushroom Car Union Information Technology Co Ltd
Original Assignee
Mushroom Car Union Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Mushroom Car Union Information Technology Co Ltd filed Critical Mushroom Car Union Information Technology Co Ltd
Priority to CN202310621797.6A priority Critical patent/CN116823931A/en
Publication of CN116823931A publication Critical patent/CN116823931A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/62Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/54Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30236Traffic on road, railway or crossing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application discloses a method and a device for calculating an initial course angle of a vehicle and electronic equipment, wherein the method comprises the following steps: acquiring a road image acquired by a road side camera at a current road section and detecting a vehicle, wherein the current road section comprises a road section of a bidirectional single lane; tracking the vehicle according to the vehicle detection result, determining a target vehicle detection result according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle; detecting surrounding vehicles corresponding to the target vehicle according to the detection result of the target vehicle; and determining the initial course angle of the target vehicle according to the detection result of the target vehicle, the detection result of surrounding vehicles and the course angle of the current road section. According to the application, based on the characteristics of the bidirectional single lane, the surrounding vehicles corresponding to the target vehicle needing to be endowed with the initial course angle are detected, and the initial course angle of the target vehicle is determined by combining the relative position relation between the surrounding vehicles and the target vehicle, so that the accuracy of calculating the initial course angle of the vehicle in the road scene of the bidirectional single lane is ensured.

Description

Method and device for calculating initial course angle of vehicle and electronic equipment
Technical Field
The present application relates to the field of automatic driving technologies, and in particular, to a method and an apparatus for calculating an initial heading angle of a vehicle, and an electronic device.
Background
The road side generally adopts a target detection technology based on deep learning, and the course angle of the vehicle running is calculated by correlating multiple frames of detection results, so that the automatic driving vehicle is sent to perform early warning, or the cloud is sent to perform digital display.
However, the calculation of the heading angle may also deviate due to various situations, for example, the target is lost in the tracking process due to the abnormality of the target tracking algorithm, the omission of the detection algorithm, the shielding and the like, and the target cannot be matched when the target appears again, so that a new ID identifier is given to the target, and at this time, since the heading angle cannot be calculated, only one initial heading angle can be set. For another example, when the object just appears in the view of the roadside camera, only a default initial heading angle can be set because there is not enough data to calculate the heading angle.
Some prior arts calculate an initial heading angle of a target vehicle according to a lane line detection result of an area where the vehicle is located, for example, when the target vehicle is in a lane line free area and there is a vehicle in the vicinity of the target vehicle, the heading angle of the vehicle in the vicinity of the target vehicle may be taken as the initial heading angle of the target vehicle, and when there is no vehicle in the vicinity of the target vehicle, the initial heading angle of the target vehicle is calculated in an auxiliary manner based on the heading angle of the following vehicle or the nearest lane line information.
However, the above solution needs to rely on the detection result of the lane line, and in the road scene of the bidirectional single lane, the accuracy of the initial heading angle calculated by the logic needs to be improved.
Disclosure of Invention
The embodiment of the application provides a method and a device for calculating an initial course angle of a vehicle and electronic equipment, so as to improve the accuracy of calculating the initial course angle of the vehicle in a bidirectional single-lane scene.
The embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for calculating an initial heading angle of a vehicle, where the method includes:
acquiring a road image acquired by a road side camera at a current road section and detecting vehicles in the road image to obtain a vehicle detection result, wherein the current road section comprises a road section of a bidirectional single lane;
tracking the vehicle according to the vehicle detection result, determining a target vehicle detection result according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle;
detecting surrounding vehicles corresponding to the target vehicle according to the target vehicle detection result to obtain a surrounding vehicle detection result;
and determining an initial course angle of the target vehicle according to the target vehicle detection result, the surrounding vehicle detection result and the course angle of the current road section.
Optionally, detecting the surrounding vehicles corresponding to the target vehicle according to the target vehicle detection result, and obtaining the surrounding vehicle detection result includes:
determining an absolute position of a vehicle according to the vehicle detection result, wherein the absolute position of the vehicle comprises an absolute position of a target vehicle and absolute positions of other vehicles;
determining a relative distance between the target vehicle and the other vehicles according to the absolute position of the target vehicle and the absolute positions of the other vehicles;
if the relative distance between the target vehicle and other vehicles is smaller than a preset distance threshold, using the other vehicles as surrounding vehicles corresponding to the target vehicle and determining that the surrounding vehicle detection result is that the surrounding vehicles exist;
and if the relative distances between the target vehicle and other vehicles are not smaller than a preset distance threshold value, determining that the surrounding vehicle detection result is no surrounding vehicle.
Optionally, the determining the initial heading angle of the target vehicle according to the target vehicle detection result, the surrounding vehicle detection result and the heading angle of the current road section includes:
if the surrounding vehicle detection result is that a surrounding vehicle exists, determining whether the target vehicle and the surrounding vehicle are parallel according to the target vehicle detection result and the surrounding vehicle detection result, and determining an initial course angle of the target vehicle according to the determination result of whether the target vehicle and the surrounding vehicle are parallel and the course angle of the current road section;
And if the surrounding vehicle detection result is that no surrounding vehicle exists, determining an initial course angle of the target vehicle according to the target vehicle detection result, the reference point position corresponding to the current road section and the course angle of the current road section.
Optionally, the vehicle detection result includes a bottom ordinate and a top ordinate of a detection frame of the target vehicle and a bottom ordinate and a top ordinate of a detection frame of a surrounding vehicle, and determining whether the target vehicle is parallel to the surrounding vehicle according to the target vehicle detection result and the surrounding vehicle detection result includes:
comparing the bottom side ordinate of the detection frame of the target vehicle with the top side ordinate of the detection frames of the surrounding vehicles, and comparing the top side ordinate of the detection frame of the target vehicle with the bottom side ordinate of the detection frames of the surrounding vehicles;
if the bottom side ordinate of the detection frame of the target vehicle is larger than the top side ordinate of the detection frame of the surrounding vehicle and the top side ordinate of the detection frame of the target vehicle is smaller than the bottom side ordinate of the detection frame of the surrounding vehicle, determining that the target vehicle and the surrounding vehicle are parallel;
Otherwise, it is determined that there is no parallelism of the target vehicle with the surrounding vehicles.
Optionally, the vehicle detection result includes a lateral abscissa and a center point coordinate of a detection frame of the target vehicle and a lateral abscissa of a detection frame of surrounding vehicles, and determining the initial heading angle of the target vehicle according to the determination result of whether to be parallel and the heading angle of the current road section includes:
if the target vehicle and the surrounding vehicles are parallel, determining the relative position relation between the target vehicle and the surrounding vehicles in the road image according to the lateral abscissa of the detection frame of the target vehicle and the lateral abscissa of the detection frame of the surrounding vehicles, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the surrounding vehicles in the road image and the course angle of the current road section;
if the target vehicle and surrounding vehicles do not have parallelism, determining the relative position relation between the target vehicle and the left and right boundaries of the road image according to the center point coordinates of the detection frame of the target vehicle, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the left and right boundaries of the road image and the course angle of the current road section.
Optionally, the heading angle of the current road segment includes a forward heading angle and a forward heading angle of the current road segment relative to a road side camera, and the determining the initial heading angle of the target vehicle according to the relative position relationship between the target vehicle and the surrounding vehicles in the road image and the heading angle of the current road segment includes:
if the relative position relation between the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned at the left side of the surrounding vehicles, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle;
and if the relative position relation of the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned on the right side of the surrounding vehicles, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
Optionally, the heading angle of the current road segment includes a forward heading angle and a forward heading angle of the current road segment relative to a road side camera, and the determining the initial heading angle of the target vehicle according to the relative position relationship between the target vehicle and the left and right boundaries of the road image and the heading angle of the current road segment includes:
If the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the left boundary of the road image, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle;
and if the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the right boundary of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
Optionally, the heading angle of the current road segment includes a forward heading angle and a forward heading angle of the current road segment relative to a road side camera, the reference point position includes an absolute position corresponding to a bottom edge point of a road image and an absolute position corresponding to a road vanishing point of the road image, and determining the initial heading angle of the target vehicle according to the target vehicle detection result, the reference point position corresponding to the current road segment and the heading angle of the current road segment includes:
determining the absolute position of the target vehicle according to the target vehicle detection result;
comparing the absolute position of the target vehicle with the absolute position corresponding to the bottom edge point of the road image and the absolute position corresponding to the road vanishing point of the road image respectively;
If the absolute position of the target vehicle is close to the absolute position corresponding to the bottom edge point of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle;
and if the absolute position of the target vehicle is close to the absolute position corresponding to the road vanishing point of the road image, taking the incoming course angle of the current road section relative to the road side camera as the initial course angle of the target vehicle.
In a second aspect, an embodiment of the present application further provides an initial heading angle calculation device for a vehicle, where the device includes:
the system comprises a first detection unit, a second detection unit and a third detection unit, wherein the first detection unit is used for acquiring a road image acquired by a road side camera at a current road section and detecting vehicles in the road image to obtain a vehicle detection result, and the current road section comprises a road section of a bidirectional single lane;
the first determining unit is used for tracking the vehicle according to the vehicle detection result, determining a target vehicle detection result according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle;
the second detection unit is used for detecting surrounding vehicles corresponding to the target vehicle according to the detection result of the target vehicle to obtain a detection result of the surrounding vehicles;
And the second determining unit is used for determining an initial course angle of the target vehicle according to the detection result of the target vehicle, the detection result of the surrounding vehicles and the course angle of the current road section.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform any of the methods described hereinbefore.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform any of the methods described above.
The above at least one technical scheme adopted by the embodiment of the application can achieve the following beneficial effects: the method for calculating the initial course angle of the vehicle comprises the steps of firstly obtaining a road image collected by a road side camera on a current road section and detecting the vehicle in the road image to obtain a vehicle detection result, wherein the current road section comprises a road section of a bidirectional single lane; then, vehicle tracking is carried out according to the vehicle detection result, a target vehicle detection result is determined according to the vehicle tracking result, and the target vehicle is a vehicle needing to determine an initial course angle; detecting surrounding vehicles corresponding to the target vehicle according to the detection result of the target vehicle to obtain the detection result of the surrounding vehicles; and finally, determining the initial course angle of the target vehicle according to the detection result of the target vehicle, the detection result of surrounding vehicles and the course angle of the current road section. According to the method for calculating the initial course angle of the vehicle, provided by the embodiment of the application, based on the characteristics of the bidirectional single lane, the surrounding vehicles corresponding to the target vehicle needing to be endowed with the initial course angle are detected, and the initial course angle of the target vehicle is determined by combining the relative position relation between the surrounding vehicles and the target vehicle, so that the accuracy of calculating the initial course angle of the vehicle in the road scene of the bidirectional single lane is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of a method for calculating an initial heading angle of a vehicle according to an embodiment of the application;
FIG. 2 is a schematic diagram of a relative positional relationship between a target vehicle and surrounding vehicles according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an initial heading angle calculation process of a vehicle according to an embodiment of the application;
FIG. 4 is a schematic diagram of an initial heading angle calculating device of a vehicle according to an embodiment of the application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
The embodiment of the application provides a method for calculating an initial course angle of a vehicle, as shown in fig. 1, and provides a flow chart of the method for calculating the initial course angle of the vehicle, wherein the method at least comprises the following steps S110 to S140:
step S110, a road image acquired by a road side camera at a current road section is acquired, vehicles in the road image are detected, and a vehicle detection result is obtained, wherein the current road section comprises a road section with a bidirectional single lane.
The method for calculating the initial course angle of the vehicle can be executed by the road side equipment, when the initial course angle of the vehicle is calculated, road images acquired by the road side camera on the current road section, namely the road section corresponding to the shooting range of the road side camera, are required to be acquired firstly, the current road section mainly refers to a road section of a bidirectional single lane, the bidirectional single lane is a single lane allowing the vehicle to pass bidirectionally, and because the vehicle of the bidirectional single lane has specific characteristics, a corresponding calculation strategy of the initial course angle can be designed for the road section of the bidirectional single lane. The road side camera can be marked according to the covered scene, such as a bidirectional single lane, a bidirectional two lane and other road scenes, so that whether the calculation logic of the initial course angle of the embodiment of the application is invoked or not can be determined according to the scene covered by the road side camera.
And then detecting the vehicle target in the road image based on a target detection model obtained through deep learning training, such as a target detection model of the YOLO series, wherein the detection model can be 2D target detection or 3D target detection. Of course, how to perform vehicle target detection specifically, those skilled in the art can flexibly determine, in conjunction with the prior art, and are not specifically limited herein.
And step S120, vehicle tracking is carried out according to the vehicle detection result, and a target vehicle detection result is determined according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle.
The vehicle detection result obtained in the foregoing step includes all the vehicle targets detected from the current road image, but not all the vehicle targets need to be given an initial heading angle, and often the initial heading angle needs to be given to the vehicle targets that initially appear in the field of view of the roadside camera or cannot be associated with the vehicle targets detected in the previous frame due to abnormality of the tracking detection algorithm or the like.
Based on this, the embodiment of the application can track and match the detection result of the vehicle with the detection result of the previous frame based on the previous steps, if the matching is successful, the current course angle can be calculated according to the positions of the two adjacent frames without giving an initial course angle, and if the matching is failed, the situation that the vehicle cannot be matched with the target which is not detected in the previous frame or cannot be detected in the previous frame due to the abnormal reasons of the tracking detection algorithm, or the like, namely the situation that the target is lost is generated, and if the matching is failed, the situation can be regarded as the situation that an initial course angle needs to be given. The target vehicle to which the initial heading angle needs to be given can be determined from all vehicles detected from the current road image by the vehicle tracking result.
And step S130, detecting surrounding vehicles corresponding to the target vehicle according to the detection result of the target vehicle to obtain the detection result of the surrounding vehicles.
After the target vehicle is determined, the surrounding vehicles corresponding to the target vehicle can be further detected, namely whether other vehicles exist around the target vehicle or not is determined, so that different initial course angle calculation strategies can be adopted according to different conditions.
And step S140, determining an initial course angle of the target vehicle according to the detection result of the target vehicle, the detection result of the surrounding vehicles and the course angle of the current road section.
The initial heading angle of the vehicle in the embodiment of the application is mainly calculated based on the heading angle of the current road section, the heading angle of the current road section can be divided into a forward heading angle and a backward heading angle according to the direction of the vehicle relative to the road side camera, namely the heading angle of the road side camera under the world coordinate system, the heading angle of the road side camera can be calibrated in advance, the direction opposite to the direction of the road side camera is the forward heading angle, and the direction same as the direction of the road side camera is the backward heading angle.
The direction of the current target vehicle relative to the road side camera, namely, the direction of the current target vehicle running towards the road side camera or the direction of the current target vehicle running away from the road side camera can be determined by combining the target vehicle detection result and the surrounding vehicle detection result of the steps, and then the forward course angle and the backward course angle can be respectively given, so that the initial course angle of the current target vehicle under the world coordinate system can be obtained.
According to the method for calculating the initial course angle of the vehicle, provided by the embodiment of the application, based on the characteristics of the bidirectional single lane, the surrounding vehicles corresponding to the target vehicle needing to be endowed with the initial course angle are detected, and the initial course angle of the target vehicle is determined by combining the relative position relation between the surrounding vehicles and the target vehicle, so that the accuracy of calculating the initial course angle of the vehicle in the road scene of the bidirectional single lane is ensured.
In some embodiments of the present application, the performing vehicle tracking according to the vehicle detection result includes: obtaining a transformation relation between a high-precision map and a road image; according to the transformation relation between the high-precision map and the road image, filtering the vehicle detection results which do not belong to the motor vehicle road area in the vehicle detection results to obtain filtered vehicle detection results; and carrying out vehicle tracking according to the filtered vehicle detection result to obtain the vehicle tracking result.
Since the road side camera senses all vehicles within the shooting visual field range, the vehicle detection result obtained in the foregoing embodiment may include the detection result of the vehicle not belonging to the vehicle road area, so that the present embodiment of the present application may filter the vehicles to avoid subsequent invalid processing.
Because the high-precision map can provide the motor vehicle running area information in the road, and the transformation relation between the high-precision map and the road image can be calibrated in advance, the motor vehicle running area information of the current road section in the high-precision map can be projected into the road image based on the transformation relation, so that the motor vehicle running area information in the road image is obtained, the vehicle detection results outside the motor vehicle running area are filtered, and the remaining vehicle detection results are tracked and detected.
In some embodiments of the present application, the detecting, according to the detection result of the target vehicle, the surrounding vehicles corresponding to the target vehicle, and obtaining the detection result of the surrounding vehicles includes: determining an absolute position of a vehicle according to the vehicle detection result, wherein the absolute position of the vehicle comprises an absolute position of a target vehicle and absolute positions of other vehicles; determining a relative distance between the target vehicle and the other vehicles according to the absolute position of the target vehicle and the absolute positions of the other vehicles; if the relative distance between the target vehicle and other vehicles is smaller than a preset distance threshold, using the other vehicles as surrounding vehicles corresponding to the target vehicle and determining that the surrounding vehicle detection result is that the surrounding vehicles exist; and if the relative distances between the target vehicle and other vehicles are not smaller than a preset distance threshold value, determining that the surrounding vehicle detection result is no surrounding vehicle.
When detecting surrounding vehicles of the target vehicle, the vehicle junction position can be determined according to the vehicle detection result, including the absolute positions of the target vehicle and all other vehicles, specifically, rectangular frame coordinates in the vehicle detection result can be converted into a world coordinate system through a transformation relationship between an image coordinate system and the world coordinate system, so as to obtain the vehicle absolute position, or fusion positioning can be performed by combining a road side laser radar and the like, so as to obtain the vehicle absolute position, and particularly, how to perform vehicle positioning can be flexibly determined by combining the prior art by a person skilled in the art, and the method is not particularly limited.
After the absolute position of the vehicle is obtained, the relative distance between the target vehicle and other vehicles can be calculated according to the absolute position of the vehicle, if the other vehicles have vehicles with the relative distance smaller than the preset distance threshold value, the other vehicles around the target vehicle are indicated, and the surrounding vehicles can assist the determination of the running direction of the subsequent target vehicle in the current road section to a certain extent, namely, the surrounding vehicle detection result at the moment is the surrounding vehicles. If the relative distance between the target vehicle and all other vehicles is not smaller than the preset distance threshold, the fact that the distance between the other vehicles detected in the current road image and the target vehicle is relatively far is indicated, and reliable reference cannot be provided for determining the running direction of the target vehicle on the current road section, namely, the detection result of the surrounding vehicles is that no surrounding vehicles exist.
In some embodiments of the present application, the determining the initial heading angle of the target vehicle according to the target vehicle detection result and the surrounding vehicle detection result and the heading angle of the current road section includes: if the surrounding vehicle detection result is that a surrounding vehicle exists, determining whether the target vehicle and the surrounding vehicle are parallel according to the target vehicle detection result and the surrounding vehicle detection result, and determining an initial course angle of the target vehicle according to the determination result of whether the target vehicle and the surrounding vehicle are parallel and the course angle of the current road section; and if the surrounding vehicle detection result is that no surrounding vehicle exists, determining an initial course angle of the target vehicle according to the target vehicle detection result, the reference point position corresponding to the current road section and the course angle of the current road section.
In the case that a surrounding vehicle exists in the vicinity of the target vehicle, the relative running relationship between the target vehicle and the surrounding vehicle in the road can be further determined by combining the detection result of the target vehicle and the detection result of the surrounding vehicle, namely, whether the target vehicle and the surrounding vehicle are parallel is determined in a road scene of a bidirectional single lane, so that the initial course angle of the target vehicle is calculated by combining the course angle of the current road section according to the judgment result of whether the target vehicle and the surrounding vehicle are parallel.
When no surrounding vehicles exist near the target vehicle, no surrounding vehicle information can be used for reference, and at the moment, an initial course angle of the target vehicle can be given according to a reference point position corresponding to a current road section and an absolute position of the target vehicle, wherein the reference point position mainly refers to two end point positions corresponding to the road section in the current road image, so that the orientation of the target vehicle relative to the road side camera can be determined according to the relative position relation between the target vehicle and the two end point positions, and a corresponding initial course angle can be given.
In some embodiments of the present application, the vehicle detection result includes a bottom side ordinate and a top side ordinate of a detection frame of the target vehicle and a bottom side ordinate and a top side ordinate of a detection frame of a surrounding vehicle, and determining whether the target vehicle is parallel to the surrounding vehicle according to the target vehicle detection result and the surrounding vehicle detection result includes: comparing the bottom side ordinate of the detection frame of the target vehicle with the top side ordinate of the detection frames of the surrounding vehicles, and comparing the top side ordinate of the detection frame of the target vehicle with the bottom side ordinate of the detection frames of the surrounding vehicles; if the bottom side ordinate of the detection frame of the target vehicle is larger than the top side ordinate of the detection frame of the surrounding vehicle and the top side ordinate of the detection frame of the target vehicle is smaller than the bottom side ordinate of the detection frame of the surrounding vehicle, determining that the target vehicle and the surrounding vehicle are parallel; otherwise, it is determined that there is no parallelism of the target vehicle with the surrounding vehicles.
In the image coordinate system, the upper left corner of the image is usually taken as the origin of the coordinate system, the upper left corner of the image is taken as the horizontal axis and the lower left corner of the image is taken as the vertical axis, and the numerical value of the vertical coordinate is larger as the lower edge of the image is approached, so that when judging whether the target vehicle and the surrounding vehicle exist in parallel, the judgment can be based on the vertical coordinate of the detection frame of the target vehicle in the road image and the vertical coordinate of the detection frame of the surrounding vehicle in the road image.
As shown in fig. 2, a schematic diagram of a relative positional relationship between a target vehicle and surrounding vehicles in an embodiment of the present application is provided. Taking the position of the target vehicle on the right lower side of the road image with respect to the surrounding vehicle as an example, if the bottom ordinate y1 of the detection frame of the target vehicle is greater than the top ordinate y4 of the detection frame of the surrounding vehicle, and the top ordinate y2 of the detection frame of the target vehicle is smaller than the bottom ordinate y3 of the detection frame of the surrounding vehicle, it is indicated that the target vehicle is parallel to the surrounding vehicle, otherwise, it is considered to be a non-parallel case, i.e., the surrounding vehicle is in front of the target vehicle or behind the target vehicle. Of course, the above-described determination conditions for whether or not there is a parallel situation are equally applicable to several cases in which the target vehicle is on the upper right side, upper left side, lower left side, and the like of the road image with respect to the surrounding vehicles, and are not specifically shown here.
In some embodiments of the present application, the vehicle detection result includes a lateral abscissa and a center point coordinate of a detection frame of the target vehicle and a lateral abscissa of a detection frame of surrounding vehicles, and the determining the initial heading angle of the target vehicle according to the determination result of whether to be parallel and the heading angle of the current road section includes: if the target vehicle and the surrounding vehicles are parallel, determining the relative position relation between the target vehicle and the surrounding vehicles in the road image according to the lateral abscissa of the detection frame of the target vehicle and the lateral abscissa of the detection frame of the surrounding vehicles, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the surrounding vehicles in the road image and the course angle of the current road section; if the target vehicle and surrounding vehicles do not have parallelism, determining the relative position relation between the target vehicle and the left and right boundaries of the road image according to the center point coordinates of the detection frame of the target vehicle, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the left and right boundaries of the road image and the course angle of the current road section.
Based on the foregoing embodiments, it may be determined whether the target vehicle and the surrounding vehicles are parallel, and different strategies may be respectively adopted to calculate the initial heading angle of the target vehicle according to whether the parallelism exists.
If the target vehicle and the surrounding vehicles are parallel, the relative position relation between the target vehicle and the surrounding vehicles in the road image can be determined according to the abscissa sizes of the detection frames of the target vehicle and the surrounding vehicles, and the relative position relation mainly reflects whether the target vehicle runs on the left side or the right side of the surrounding vehicles under the parallel condition, so that the direction of the target vehicle relative to the road side camera can be determined by combining the traffic rules of running on the right side of the road under the bidirectional single-lane and parallel road scene, and the corresponding initial course angle can be further given.
Further described in connection with fig. 2, it can be determined that the target vehicle is traveling on the left side of the surrounding vehicle if the abscissas x1 and x2 of the corner points of the detection frame of the target vehicle are both larger than the abscissas x3 and x4 of the corner points of the detection frame of the surrounding vehicle. Conversely, if the abscissas of the four corner points of the detection frame of the target vehicle are smaller than the abscissas of the four corner points of the detection frame of the surrounding vehicle, it may be determined that the target vehicle is located on the right side of the surrounding vehicle to travel.
If the target vehicle and the surrounding vehicles do not have parallel running, namely front and back running, the relative position relation between the left and right of the surrounding vehicles is not referred, and whether the target vehicle is closer to the left road boundary or the right road boundary can be determined according to the relative position relation between the target vehicle and the left and right boundaries of the road image, so that the orientation of the target vehicle relative to the road side camera can be determined by combining the habit that the vehicle runs on the right side of the road in a bidirectional single-lane road scene, and a corresponding initial course angle can be further provided.
In some embodiments of the present application, the heading angle of the current road segment includes a forward heading angle and an backward heading angle of the current road segment with respect to a road side camera, and the determining the initial heading angle of the target vehicle according to the relative positional relationship of the target vehicle and the surrounding vehicles in the road image and the heading angle of the current road segment includes: if the relative position relation between the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned at the left side of the surrounding vehicles, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle; and if the relative position relation of the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned on the right side of the surrounding vehicles, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
If the target vehicle is located on the left side of the surrounding vehicle, it may be determined that the target vehicle is traveling toward the roadside camera based on the traffic rules of the vehicle traveling on the right side of the road in the bidirectional single-lane and parallel road scene, and thus may be given a forward heading angle, i.e., a heading angle opposite to that of the roadside camera. If the target vehicle is located on the right side of the surrounding vehicle, it can be determined that the target vehicle is traveling away from the roadside camera, and thus a forward-facing heading angle, that is, a heading angle identical to that of the roadside camera, can be given.
In some embodiments of the present application, the heading angle of the current road segment includes a forward heading angle and an backward heading angle of the current road segment with respect to a road side camera, and the determining the initial heading angle of the target vehicle according to the relative positional relationship of the target vehicle and the left and right boundaries of the road image and the heading angle of the current road segment includes: if the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the left boundary of the road image, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle; and if the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the right boundary of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
If the target vehicle is closer to the left boundary of the road image, the target vehicle can be considered to be traveling toward the roadside camera based on the habit of the vehicle traveling on the right side of the road in the bidirectional one-lane road scene, and thus can be given a forward heading angle, that is, a heading angle opposite to that of the roadside camera. If the target vehicle is closer to the right boundary of the road image, it can be considered that the target vehicle is traveling away from the roadside camera, and thus a forward heading angle, that is, the same heading angle as that of the roadside camera, can be given.
When determining whether the target vehicle is closer to the left road boundary or the right road boundary, determining which side boundary is closer by respectively shifting the center point coordinates of the detection frame of the target vehicle to the left and the right, for example, converting the center point coordinates of the detection frame of the target vehicle to a high-precision map, and then viewing which side road boundary is preferentially crossed, namely, the closer road boundary according to the converted coordinate points to the left and the right. Of course, in addition to this, it is also possible to determine which side of the road boundary is closer by reconverting the center point of the detection frame of the target vehicle under the world coordinate system and then calculating the distance thereof to the corresponding curve equation of the road boundary.
In some embodiments of the present application, the heading angle of the current road segment includes a forward heading angle and a forward heading angle of the current road segment with respect to a road side camera, the reference point position includes an absolute position corresponding to a bottom edge point of a road image and an absolute position corresponding to a road vanishing point of the road image, and determining the initial heading angle of the target vehicle according to the target vehicle detection result and the reference point position corresponding to the current road segment and the heading angle of the current road segment includes: determining the absolute position of the target vehicle according to the target vehicle detection result; comparing the absolute position of the target vehicle with the absolute position corresponding to the bottom edge point of the road image and the absolute position corresponding to the road vanishing point of the road image respectively; if the absolute position of the target vehicle is close to the absolute position corresponding to the bottom edge point of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle; and if the absolute position of the target vehicle is close to the absolute position corresponding to the road vanishing point of the road image, taking the incoming course angle of the current road section relative to the road side camera as the initial course angle of the target vehicle.
The reference point position defined by the embodiment of the application aiming at the current road section mainly comprises two end point positions of the current road section, one end point can be determined based on the bottom edge point in the road image based on the characteristics of the shooting angle of the road side camera, for example, the bottom edge midpoint of the road image, which is usually the position closer to the starting point of the motor vehicle running area of the current road section, can be selected, the other end point can be determined based on the road vanishing point in the road image, namely the vanishing point, can be detected by the road vanishing point detection algorithm in the prior art, and represents the position of the ending point of the motor vehicle running area of the current road section.
After the two datum point positions of the current road section are determined, the distance between the target vehicle and the two datum points is calculated respectively, and therefore the position of the target vehicle which is closer to the datum point is judged. If the target vehicle is closer to the absolute position corresponding to the bottom edge point of the road image, it can be considered that the vehicle has just appeared at the bottom edge position of the road image, and thus the target vehicle is traveling away from the roadside camera, a heading angle, that is, the same heading angle as that of the roadside camera, can be given. If the target vehicle is closer to the absolute position corresponding to the road vanishing point, it can be considered that the vehicle has just appeared at the top edge position of the road image, and thus the target vehicle is traveling toward the roadside camera, and thus can be given a heading angle, that is, a heading angle opposite to the heading angle of the roadside camera.
In order to facilitate understanding of the embodiments of the present application, as shown in fig. 3, a schematic diagram of an initial heading angle calculation procedure of a vehicle in an embodiment of the present application is provided. The road image acquired by the road side camera at the current road section is acquired first, the vehicle is detected, the vehicle is tracked according to the vehicle detection result, the target vehicle detection result is determined according to the vehicle tracking result, and the surrounding vehicles corresponding to the target vehicle are detected according to the target vehicle detection result, so that the surrounding vehicle detection result is obtained.
If the surrounding vehicle detection result is that no surrounding vehicle exists, determining which endpoint the target vehicle is closer to according to the absolute position of the target vehicle and the two endpoint positions corresponding to the current road section, and accordingly determining the orientation of the target vehicle relative to the road side camera according to the closer endpoint and giving a corresponding initial course angle. If the road is closer to the bottom point of the road image, a forward heading angle is given, and if the road is closer to the vanishing point of the road image, a forward heading angle is given.
If the surrounding vehicle detection result is that the surrounding vehicle exists, whether the target vehicle and the surrounding vehicle are parallel is further judged, if the target vehicle and the surrounding vehicle exist parallel, the relative position relationship of the target vehicle and the surrounding vehicle is further judged, and if the target vehicle is positioned on the left side of the surrounding vehicle, the heading angle can be given. If the target vehicle is located on the right side of the surrounding vehicle, a heading angle may be given. If the target vehicle and the surrounding vehicles do not have parallelism, a corresponding initial heading angle can be given according to the relative positional relationship of the target vehicle and the left and right boundaries of the road image. If the target vehicle is closer to the left boundary of the road image, a heading angle may be given. If the target vehicle is closer to the right boundary of the road image, a heading angle may be given.
According to the initial course angle calculation flow of the vehicle, aiming at the road scene of the bidirectional single lane, the surrounding vehicles corresponding to the target vehicle needing to be endowed with the initial course angle are detected, the initial course angle of the target vehicle is determined by combining the relative position relation between the surrounding vehicles and the target vehicle, the accuracy of the initial course angle calculation of the vehicle in the road scene of the bidirectional single lane is ensured, and the detection of lane lines in the road is not relied on.
The embodiment of the application also provides an initial course angle calculating device 400 of the vehicle, as shown in fig. 4, and provides a schematic structural diagram of the initial course angle calculating device of the vehicle in the embodiment of the application, where the device 400 includes: a first detection unit 410, a first determination unit 420, a second detection unit 430, and a second determination unit 440, wherein:
the first detection unit 410 is configured to obtain a road image acquired by a road side camera at a current road segment, and detect a vehicle in the road image, so as to obtain a vehicle detection result, where the current road segment includes a road segment of a bidirectional single lane;
a first determining unit 420, configured to perform vehicle tracking according to the vehicle detection result, and determine a target vehicle detection result according to the vehicle tracking result, where the target vehicle is a vehicle for which an initial heading angle needs to be determined;
A second detecting unit 430, configured to detect, according to the detection result of the target vehicle, a surrounding vehicle corresponding to the target vehicle, so as to obtain a detection result of the surrounding vehicle;
and a second determining unit 440 for determining an initial heading angle of the target vehicle according to the target vehicle detection result and the surrounding vehicle detection result and the heading angle of the current road section.
In some embodiments of the present application, the second detecting unit 430 is specifically configured to: determining an absolute position of a vehicle according to the vehicle detection result, wherein the absolute position of the vehicle comprises an absolute position of a target vehicle and absolute positions of other vehicles; determining a relative distance between the target vehicle and the other vehicles according to the absolute position of the target vehicle and the absolute positions of the other vehicles; if the relative distance between the target vehicle and other vehicles is smaller than a preset distance threshold, using the other vehicles as surrounding vehicles corresponding to the target vehicle and determining that the surrounding vehicle detection result is that the surrounding vehicles exist; and if the relative distances between the target vehicle and other vehicles are not smaller than a preset distance threshold value, determining that the surrounding vehicle detection result is no surrounding vehicle.
In some embodiments of the present application, the second determining unit 440 is specifically configured to: if the surrounding vehicle detection result is that a surrounding vehicle exists, determining whether the target vehicle and the surrounding vehicle are parallel according to the target vehicle detection result and the surrounding vehicle detection result, and determining an initial course angle of the target vehicle according to the determination result of whether the target vehicle and the surrounding vehicle are parallel and the course angle of the current road section; and if the surrounding vehicle detection result is that no surrounding vehicle exists, determining an initial course angle of the target vehicle according to the target vehicle detection result, the reference point position corresponding to the current road section and the course angle of the current road section.
In some embodiments of the present application, the vehicle detection result includes a bottom ordinate and a top ordinate of a detection frame of the target vehicle and a bottom ordinate and a top ordinate of a detection frame of a surrounding vehicle, and the second determining unit 440 is specifically configured to: comparing the bottom side ordinate of the detection frame of the target vehicle with the top side ordinate of the detection frames of the surrounding vehicles, and comparing the top side ordinate of the detection frame of the target vehicle with the bottom side ordinate of the detection frames of the surrounding vehicles; if the bottom side ordinate of the detection frame of the target vehicle is larger than the top side ordinate of the detection frame of the surrounding vehicle and the top side ordinate of the detection frame of the target vehicle is smaller than the bottom side ordinate of the detection frame of the surrounding vehicle, determining that the target vehicle and the surrounding vehicle are parallel; otherwise, it is determined that there is no parallelism of the target vehicle with the surrounding vehicles.
In some embodiments of the present application, the vehicle detection result includes a lateral abscissa and a center point coordinate of a detection frame of the target vehicle and a lateral abscissa of a detection frame of surrounding vehicles, and the second determining unit 440 is specifically configured to: if the target vehicle and the surrounding vehicles are parallel, determining the relative position relation between the target vehicle and the surrounding vehicles in the road image according to the lateral abscissa of the detection frame of the target vehicle and the lateral abscissa of the detection frame of the surrounding vehicles, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the surrounding vehicles in the road image and the course angle of the current road section; if the target vehicle and surrounding vehicles do not have parallelism, determining the relative position relation between the target vehicle and the left and right boundaries of the road image according to the center point coordinates of the detection frame of the target vehicle, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the left and right boundaries of the road image and the course angle of the current road section.
In some embodiments of the present application, the heading angle of the current road segment includes a forward heading angle and an backward heading angle of the current road segment with respect to the roadside camera, and the second determining unit 440 is specifically configured to: if the relative position relation between the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned at the left side of the surrounding vehicles, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle; and if the relative position relation of the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned on the right side of the surrounding vehicles, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
In some embodiments of the present application, the heading angle of the current road segment includes a forward heading angle and an backward heading angle of the current road segment with respect to the roadside camera, and the second determining unit 440 is specifically configured to: if the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the left boundary of the road image, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle; and if the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the right boundary of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
In some embodiments of the present application, the heading angle of the current road segment includes a forward heading angle and a backward heading angle of the current road segment with respect to the roadside camera, the reference point position includes an absolute position corresponding to a bottom edge point of the road image and an absolute position corresponding to a road vanishing point of the road image, and the second determining unit 440 is specifically configured to: determining the absolute position of the target vehicle according to the target vehicle detection result; comparing the absolute position of the target vehicle with the absolute position corresponding to the bottom edge point of the road image and the absolute position corresponding to the road vanishing point of the road image respectively; if the absolute position of the target vehicle is close to the absolute position corresponding to the bottom edge point of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle; and if the absolute position of the target vehicle is close to the absolute position corresponding to the road vanishing point of the road image, taking the incoming course angle of the current road section relative to the road side camera as the initial course angle of the target vehicle.
It can be understood that the above-mentioned initial course angle calculating device for a vehicle can implement each step of the initial course angle calculating method for a vehicle provided in the foregoing embodiment, and the relevant explanation about the initial course angle calculating method for a vehicle is applicable to the initial course angle calculating device for a vehicle, which is not described herein.
Fig. 5 is a schematic structural view of an electronic device according to an embodiment of the present application. Referring to fig. 5, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 5, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form an initial course angle calculation device of the vehicle on a logic level. The processor is used for executing the programs stored in the memory and is specifically used for executing the following operations:
acquiring a road image acquired by a road side camera at a current road section and detecting vehicles in the road image to obtain a vehicle detection result, wherein the current road section comprises a road section of a bidirectional single lane;
tracking the vehicle according to the vehicle detection result, determining a target vehicle detection result according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle;
detecting surrounding vehicles corresponding to the target vehicle according to the target vehicle detection result to obtain a surrounding vehicle detection result;
and determining an initial course angle of the target vehicle according to the target vehicle detection result, the surrounding vehicle detection result and the course angle of the current road section.
The method performed by the initial heading angle calculation device of the vehicle disclosed in the embodiment of fig. 1 of the present application may be applied to a processor or implemented by the processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may further execute the method executed by the initial course angle computing device of the vehicle in fig. 1, and implement the function of the initial course angle computing device of the vehicle in the embodiment shown in fig. 1, which is not described herein.
The embodiment of the present application also proposes a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device comprising a plurality of application programs, enable the electronic device to perform a method performed by an initial heading angle calculation apparatus of a vehicle in the embodiment shown in fig. 1, and specifically configured to perform:
acquiring a road image acquired by a road side camera at a current road section and detecting vehicles in the road image to obtain a vehicle detection result, wherein the current road section comprises a road section of a bidirectional single lane;
tracking the vehicle according to the vehicle detection result, determining a target vehicle detection result according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle;
detecting surrounding vehicles corresponding to the target vehicle according to the target vehicle detection result to obtain a surrounding vehicle detection result;
And determining an initial course angle of the target vehicle according to the target vehicle detection result, the surrounding vehicle detection result and the course angle of the current road section.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A method of calculating an initial heading angle of a vehicle, wherein the method comprises:
acquiring a road image acquired by a road side camera at a current road section and detecting vehicles in the road image to obtain a vehicle detection result, wherein the current road section comprises a road section of a bidirectional single lane;
Tracking the vehicle according to the vehicle detection result, determining a target vehicle detection result according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle;
detecting surrounding vehicles corresponding to the target vehicle according to the target vehicle detection result to obtain a surrounding vehicle detection result;
and determining an initial course angle of the target vehicle according to the target vehicle detection result, the surrounding vehicle detection result and the course angle of the current road section.
2. The method of claim 1, wherein the detecting the surrounding vehicles corresponding to the target vehicle according to the target vehicle detection result includes:
determining an absolute position of a vehicle according to the vehicle detection result, wherein the absolute position of the vehicle comprises an absolute position of a target vehicle and absolute positions of other vehicles;
determining a relative distance between the target vehicle and the other vehicles according to the absolute position of the target vehicle and the absolute positions of the other vehicles;
if the relative distance between the target vehicle and other vehicles is smaller than a preset distance threshold, using the other vehicles as surrounding vehicles corresponding to the target vehicle and determining that the surrounding vehicle detection result is that the surrounding vehicles exist;
And if the relative distances between the target vehicle and other vehicles are not smaller than a preset distance threshold value, determining that the surrounding vehicle detection result is no surrounding vehicle.
3. The method of claim 1, wherein the determining the initial heading angle of the target vehicle according to the target vehicle detection result and the surrounding vehicle detection result and the heading angle of the current road segment comprises:
if the surrounding vehicle detection result is that a surrounding vehicle exists, determining whether the target vehicle and the surrounding vehicle are parallel according to the target vehicle detection result and the surrounding vehicle detection result, and determining an initial course angle of the target vehicle according to the determination result of whether the target vehicle and the surrounding vehicle are parallel and the course angle of the current road section;
and if the surrounding vehicle detection result is that no surrounding vehicle exists, determining an initial course angle of the target vehicle according to the target vehicle detection result, the reference point position corresponding to the current road section and the course angle of the current road section.
4. The method of claim 3, wherein the vehicle detection results include a bottom and top ordinate of a detection frame of a target vehicle and a bottom and top ordinate of a detection frame of a surrounding vehicle, the determining whether the target vehicle is parallel to the surrounding vehicle based on the target vehicle detection results and the surrounding vehicle detection results comprising:
Comparing the bottom side ordinate of the detection frame of the target vehicle with the top side ordinate of the detection frames of the surrounding vehicles, and comparing the top side ordinate of the detection frame of the target vehicle with the bottom side ordinate of the detection frames of the surrounding vehicles;
if the bottom side ordinate of the detection frame of the target vehicle is larger than the top side ordinate of the detection frame of the surrounding vehicle and the top side ordinate of the detection frame of the target vehicle is smaller than the bottom side ordinate of the detection frame of the surrounding vehicle, determining that the target vehicle and the surrounding vehicle are parallel;
otherwise, it is determined that there is no parallelism of the target vehicle with the surrounding vehicles.
5. The method of claim 3, wherein the vehicle detection result includes lateral abscissa and center point coordinates of a detection frame of the target vehicle and lateral abscissas of detection frames of surrounding vehicles, and the determining an initial heading angle of the target vehicle according to the determination result of whether to be parallel and the heading angle of the current road section includes:
if the target vehicle and the surrounding vehicles are parallel, determining the relative position relation between the target vehicle and the surrounding vehicles in the road image according to the lateral abscissa of the detection frame of the target vehicle and the lateral abscissa of the detection frame of the surrounding vehicles, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the surrounding vehicles in the road image and the course angle of the current road section;
If the target vehicle and surrounding vehicles do not have parallelism, determining the relative position relation between the target vehicle and the left and right boundaries of the road image according to the center point coordinates of the detection frame of the target vehicle, and determining the initial course angle of the target vehicle according to the relative position relation between the target vehicle and the left and right boundaries of the road image and the course angle of the current road section.
6. The method of claim 5, wherein the heading angle of the current road segment includes a sum of a forward heading angle of the current road segment with respect to a road side camera, and wherein determining the initial heading angle of the target vehicle based on the relative positional relationship of the target vehicle and the surrounding vehicles in the road image and the heading angle of the current road segment includes:
if the relative position relation between the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned at the left side of the surrounding vehicles, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle;
and if the relative position relation of the target vehicle and the surrounding vehicles in the road image is that the target vehicle is positioned on the right side of the surrounding vehicles, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
7. The method of claim 5, wherein the heading angle of the current road segment includes a sum of a forward heading angle and a backward heading angle of the current road segment with respect to a road side camera, and the determining the initial heading angle of the target vehicle according to the relative positional relationship of the target vehicle and the left and right boundaries of the road image and the heading angle of the current road segment includes:
if the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the left boundary of the road image, taking the incoming course angle of the current road section relative to a road side camera as the initial course angle of the target vehicle;
and if the relative position relation between the target vehicle and the left and right boundaries of the road image is that the target vehicle is positioned at the right boundary of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle.
8. The method of claim 5, wherein the heading angle of the current road segment includes a sum of a heading angle of the current road segment with respect to a road side camera, the reference point position includes an absolute position corresponding to a bottom edge point of the road image and an absolute position corresponding to a road vanishing point of the road image, and the determining the initial heading angle of the target vehicle based on the target vehicle detection result and the reference point position corresponding to the current road segment and the heading angle of the current road segment includes:
Determining the absolute position of the target vehicle according to the target vehicle detection result;
comparing the absolute position of the target vehicle with the absolute position corresponding to the bottom edge point of the road image and the absolute position corresponding to the road vanishing point of the road image respectively;
if the absolute position of the target vehicle is close to the absolute position corresponding to the bottom edge point of the road image, taking the heading angle of the current road section relative to the road side camera as the initial heading angle of the target vehicle;
and if the absolute position of the target vehicle is close to the absolute position corresponding to the road vanishing point of the road image, taking the incoming course angle of the current road section relative to the road side camera as the initial course angle of the target vehicle.
9. An initial heading angle calculation apparatus of a vehicle, wherein the apparatus includes:
the system comprises a first detection unit, a second detection unit and a third detection unit, wherein the first detection unit is used for acquiring a road image acquired by a road side camera at a current road section and detecting vehicles in the road image to obtain a vehicle detection result, and the current road section comprises a road section of a bidirectional single lane;
the first determining unit is used for tracking the vehicle according to the vehicle detection result, determining a target vehicle detection result according to the vehicle tracking result, wherein the target vehicle is a vehicle needing to determine an initial course angle;
The second detection unit is used for detecting surrounding vehicles corresponding to the target vehicle according to the detection result of the target vehicle to obtain a detection result of the surrounding vehicles;
and the second determining unit is used for determining an initial course angle of the target vehicle according to the detection result of the target vehicle, the detection result of the surrounding vehicles and the course angle of the current road section.
10. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any of claims 1 to 8.
CN202310621797.6A 2023-05-30 2023-05-30 Method and device for calculating initial course angle of vehicle and electronic equipment Pending CN116823931A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310621797.6A CN116823931A (en) 2023-05-30 2023-05-30 Method and device for calculating initial course angle of vehicle and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310621797.6A CN116823931A (en) 2023-05-30 2023-05-30 Method and device for calculating initial course angle of vehicle and electronic equipment

Publications (1)

Publication Number Publication Date
CN116823931A true CN116823931A (en) 2023-09-29

Family

ID=88119506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310621797.6A Pending CN116823931A (en) 2023-05-30 2023-05-30 Method and device for calculating initial course angle of vehicle and electronic equipment

Country Status (1)

Country Link
CN (1) CN116823931A (en)

Similar Documents

Publication Publication Date Title
US7542835B2 (en) Vehicle image processing device
US20190072970A1 (en) Travel assist apparatus
CN114705121B (en) Vehicle pose measurement method and device, electronic equipment and storage medium
CN113791435B (en) GNSS signal abnormal value detection method and device, electronic equipment and storage medium
CN112381025A (en) Driver attention detection method and device, electronic equipment and storage medium
JP2018073275A (en) Image recognition device
CN116682091A (en) Obstacle sensing method and device for automatic driving vehicle
CN115950441B (en) Fusion positioning method and device for automatic driving vehicle and electronic equipment
CN115556827A (en) Course angle determination method and device of automatic driving vehicle and electronic equipment
KR102003387B1 (en) Method for detecting and locating traffic participants using bird's-eye view image, computer-readerble recording medium storing traffic participants detecting and locating program
JP6302205B2 (en) OBE
CN115661014A (en) Point cloud data processing method and device, electronic equipment and storage medium
CN116823931A (en) Method and device for calculating initial course angle of vehicle and electronic equipment
US11884303B2 (en) Apparatus and method for determining lane change of surrounding objects
CN111989541A (en) Stereo camera device
CN115031755A (en) Automatic driving vehicle positioning method and device, electronic equipment and storage medium
JP7334632B2 (en) Object tracking device and object tracking method
CN114066958A (en) Method and device for predicting depth information of target, electronic device and storage medium
CN114037977A (en) Road vanishing point detection method, device, equipment and storage medium
US11958483B2 (en) Vehicle external environment recognition apparatus
CN116625384B (en) Data association method and device and electronic equipment
CN116843888A (en) Target positioning method and device and electronic equipment
CN113538546B (en) Target detection method, device and equipment for automatic driving
CN116381698B (en) Road remains detection method and device and electronic equipment
CN116580090A (en) Initial course angle determining method and device and electronic equipment

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