CN111301407B - Dangerous vehicle determination method and device, electronic equipment and readable storage medium - Google Patents
Dangerous vehicle determination method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN111301407B CN111301407B CN201811511372.5A CN201811511372A CN111301407B CN 111301407 B CN111301407 B CN 111301407B CN 201811511372 A CN201811511372 A CN 201811511372A CN 111301407 B CN111301407 B CN 111301407B
- Authority
- CN
- China
- Prior art keywords
- vehicle
- target vehicle
- target
- determining
- suspected
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000000875 corresponding effect Effects 0.000 claims description 44
- 231100001261 hazardous Toxicity 0.000 claims description 9
- 230000002596 correlated effect Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 206010039203 Road traffic accident Diseases 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60W—CONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
- B60W30/00—Purposes of road vehicle drive control systems not related to the control of a particular sub-unit, e.g. of systems using conjoint control of vehicle sub-units
- B60W30/08—Active safety systems predicting or avoiding probable or impending collision or attempting to minimise its consequences
- B60W30/095—Predicting travel path or likelihood of collision
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Automation & Control Theory (AREA)
- Transportation (AREA)
- Mechanical Engineering (AREA)
- Traffic Control Systems (AREA)
Abstract
The application provides a dangerous vehicle determination method, a dangerous vehicle determination device, an electronic device and a readable storage medium, wherein the dangerous vehicle determination method comprises the following steps: determining at least one suspect vehicle that is to collide with the target vehicle; calculating the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle; the longitudinal distance is the distance between the target vehicle and the suspected vehicle on the length of the target vehicle, and the overlapping length is the length of the overlapping part between the target vehicle and the suspected vehicle on the width direction of the target vehicle; determining collision scores of the target vehicle and each suspect vehicle according to the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle; and selecting the suspected vehicle with the largest collision score as the dangerous vehicle with the largest collision risk of the target vehicle. By the method, the dangerous vehicle with the largest collision risk can be determined before the target vehicle collides.
Description
Technical Field
The present application relates to the field of computer communications, and in particular, to a method and an apparatus for determining a dangerous vehicle, an electronic device, and a readable storage medium.
Background
As vehicles become more popular, more and more vehicles are used on roads, and traffic accidents caused by the increase of vehicles occur repeatedly, and especially, collision accidents among vehicles account for a large proportion of the traffic accidents.
In order to prevent collision between vehicles, the dangerous vehicle is determined before the target vehicle collides with the dangerous vehicle with the highest collision risk, and early warning and prevention are carried out, so that the important importance is brought to the guarantee of traffic safety. Therefore, how to determine the dangerous vehicle before the target vehicle collides with the dangerous vehicle is called an urgent problem to be solved.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, an electronic device and a readable storage medium for determining a dangerous vehicle with the highest risk of collision with a target vehicle before a collision.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, there is provided a method of determining a dangerous vehicle, the method comprising:
determining at least one suspect vehicle that is to collide with the target vehicle;
calculating the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle; the longitudinal distance is the distance between the target vehicle and the suspected vehicle on the length of the target vehicle, and the overlapping length is the length of the overlapping part between the target vehicle and the suspected vehicle on the width direction of the target vehicle;
determining collision scores of the target vehicle and each suspect vehicle according to the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle;
and selecting the suspected vehicle with the highest collision score as the dangerous vehicle with the highest collision risk of the target vehicle.
Optionally, before the determining at least one suspected vehicle about to collide with the target vehicle, the method further includes:
acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the determining at least one suspect vehicle that is to collide with the target vehicle, comprising:
determining a target lane where the target vehicle is located in the front road map;
and identifying other vehicles occupying the target lane as suspected vehicles, and using the other vehicles occupying the target lane.
Optionally, the determining the target lane in which the target vehicle is located in the front road map includes:
identifying a lane occupied by the target vehicle in the front road map;
if the lane occupied by the target vehicle is identified in the front road map, determining the identified lane as the target lane;
and if the lane occupied by the target vehicle cannot be identified in the front road map, drawing a virtual lane which is along the movement direction of the target vehicle and occupied by the target vehicle, and determining the drawn virtual lane as the target lane.
Optionally, the moving direction of the target vehicle is determined by:
acquiring steering wheel rotation parameters of the target vehicle;
determining a direction of motion of the target vehicle based on the steering wheel rotation parameter.
Optionally, before the determining at least one suspected vehicle colliding with the target vehicle, the method further includes:
acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the calculating of the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle comprises:
for each suspected vehicle, determining the overlapping length of the target vehicle and the suspected vehicle based on the pixel distance between a first designated point and a second designated point on the front road map; the first specified point is an intersection point of any one of extension lines of two line segments arranged on the front road map and the lower boundary of the suspected vehicle; the second designated point is an end point of the lower boundary of the suspected vehicle between two extension lines; the two preset line segments are respectively line segments formed on the front road map by respectively extending the left front wheel-rear wheel connecting line and the right front wheel-rear wheel connecting line of the target vehicle by preset lengths;
and determining the longitudinal distance between the target vehicle and the suspect vehicle according to the shortest pixel distance between the lower boundary of the suspect vehicle and the bottom edge of the front road map.
Optionally, the determining the collision score between the target vehicle and each suspect vehicle according to the calculated longitudinal distance and the calculated overlap length between the target vehicle and each suspect vehicle includes:
calculating the overlapping proportion of the overlapping length corresponding to each suspected vehicle in the width of the target vehicle for each suspected vehicle;
determining the weight values respectively corresponding to the longitudinal distance and the overlapping proportion of the suspected vehicle;
calculating a product S1 of the longitudinal distance and a weight value corresponding to the longitudinal distance, and a product S2 of an overlap ratio and a weight value corresponding to the overlap ratio;
the sum of S1 and S2 is calculated as the collision score of the suspect vehicle.
Optionally, the determining the weight values corresponding to the longitudinal proportion and the overlap proportion of the suspected vehicle respectively includes:
determining a weight value w corresponding to the longitudinal proportion according to the longitudinal distance of the suspected vehicle; wherein the value of w is positively correlated with the longitudinal distance, and w belongs to (0, 1);
and determining the weight value of the overlapping proportion of the suspected vehicle to be 1-w.
According to a second aspect of the present application, there is provided a dangerous vehicle determination apparatus, the apparatus comprising:
a first determination unit for determining at least one suspect vehicle that is about to collide with the target vehicle;
the calculating unit is used for calculating the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle; the longitudinal distance is the distance between the target vehicle and the suspected vehicle on the length of the target vehicle, and the overlapping length is the length of the overlapping part between the target vehicle and the suspected vehicle on the width direction of the target vehicle;
the second determining unit is used for determining the collision score of the target vehicle and each suspect vehicle according to the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle;
and the selecting unit is used for selecting the suspected vehicle with the highest collision score as the dangerous vehicle with the highest collision risk of the target vehicle.
Optionally, the apparatus further comprises:
the acquisition unit is used for acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the first determining unit is specifically configured to determine a target lane in which the target vehicle is located in the front road map; and identifying other vehicles occupying the target lane, and taking the other vehicles occupying the target lane as suspected vehicles.
Optionally, the first determining unit is specifically configured to identify a lane occupied by the target vehicle in the front road map when determining the target lane where the target vehicle is located in the front road map; if the lane occupied by the target vehicle is identified in the front road map, determining the identified lane as the target lane; and if the lane occupied by the target vehicle cannot be identified in the front road map, drawing a virtual lane which is along the movement direction of the target vehicle and occupied by the target vehicle, and determining the drawn virtual lane as the target lane.
Optionally, the moving direction of the target vehicle is determined by: acquiring steering wheel rotation parameters of the target vehicle; determining a direction of motion of the target vehicle based on the steering wheel rotation parameter.
Optionally, the apparatus further comprises:
the acquisition unit is used for acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the calculation unit is specifically configured to determine, for each suspected vehicle, an overlap length of the target vehicle and the suspected vehicle based on a pixel distance between a first specified point and a second specified point on the road map ahead; the first specified point is an intersection point of any one of extension lines of two line segments arranged on the front road map and the lower boundary of the suspected vehicle; the second designated point is an end point of the lower boundary of the suspected vehicle between two extension lines; the two preset line segments are respectively line segments formed on the front road map by respectively extending the left front wheel-rear wheel connecting line and the right front wheel-rear wheel connecting line of the target vehicle by preset lengths; and determining the longitudinal distance between the target vehicle and the suspect vehicle according to the shortest pixel distance between the lower boundary of the suspect vehicle and the bottom edge of the front road map.
Optionally, the second determining unit is specifically configured to calculate, for each suspected vehicle, an overlap ratio of an overlap length corresponding to the suspected vehicle to the width of the target vehicle; calculating the longitudinal proportion of the longitudinal distance corresponding to the suspected vehicle to a preset distance value; determining weight values respectively corresponding to the longitudinal proportion and the overlapping proportion of the suspected vehicle; calculating a product S1 of the longitudinal proportion and a weight value corresponding to the longitudinal proportion, and a product S2 of the overlap proportion and the weight value corresponding to the overlap proportion; the sum of S1 and S2 is calculated as the collision score of the suspect vehicle.
Optionally, the second determining unit is specifically configured to determine the weight value w corresponding to the longitudinal proportion according to the longitudinal distance of the suspected vehicle when determining the weight values corresponding to the longitudinal proportion and the overlap proportion of the suspected vehicle respectively; wherein the value of w is positively correlated with the longitudinal distance, and w belongs to (0, 1); and determining the weight value of the overlapping proportion of the suspected vehicle to be 1-w.
According to a third aspect of the application, there is provided an electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method of any one of claims 1 to 7.
According to a fourth aspect of the application, there is provided a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
As can be seen from the above description, in one aspect, the present application uses two parameters in calculating the collision score, one is the overlap length of the target vehicle and the suspected vehicle, and the other is the longitudinal distance between the target vehicle and the suspected vehicle. The overlap length represents a collision zone when the target vehicle collides with the suspect vehicle, and the longitudinal distance represents a vehicle separation of the target vehicle from the suspect vehicle. The collision score calculated using these two parameters is more accurate than calculating the collision score using only the longitudinal distance.
On the other hand, when the longitudinal distance is smaller, the weight value w of the longitudinal distance is smaller, and the weight value (1-w) of the overlap ratio is larger, that is, when the longitudinal distance is smaller, the calculation of the collision score focuses more on the overlap ratio, which is more in line with the actual situation. It is more accurate to calculate the collision score in a manner that w varies with longitudinal distance.
In the third aspect, the target lane represents the moving direction of the target vehicle, and the position to which the target vehicle moves in the future can be determined through the target lane, so that the method and the system can more accurately take the vehicle occupying the target lane as a suspected vehicle which is possibly collided with the target vehicle.
Drawings
FIG. 1 is a flow chart illustrating a method for determining a hazardous vehicle according to an exemplary embodiment of the present application;
FIG. 2 is a schematic view of a front road map shown in an exemplary embodiment of the present application;
FIG. 3a is a schematic view of another front road map shown in an exemplary embodiment of the present application;
FIG. 3b is a top view of a road ahead as shown in an exemplary embodiment of the present application;
FIG. 4 is a schematic view of another front road map shown in an exemplary embodiment of the present application;
FIG. 5 is a schematic illustration of a hazardous vehicle determination shown in an exemplary embodiment of the present application;
FIG. 6 is a schematic view of another front road map shown in an exemplary embodiment of the present application;
FIG. 7a is a schematic illustration of another hazardous vehicle determination shown in an exemplary embodiment of the present application;
FIG. 7b is a schematic illustration of another hazardous vehicle determination shown in an exemplary embodiment of the present application;
FIG. 8 is a diagram illustrating a hardware configuration of an electronic device according to an exemplary embodiment of the present application;
FIG. 9 is a block diagram illustrating a hazardous vehicle determination in accordance with an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for determining a dangerous vehicle according to an exemplary embodiment of the present application, which may be applied to an electronic device, and which may include the following steps.
It should be noted that the electronic device may be the target vehicle or the backend server, and here, the electronic device is only exemplarily described and is not specifically limited.
Step 101: determining at least one suspect vehicle for collision with the target vehicle.
In implementation, first, the electronic device may acquire a front road map captured by an image capture device mounted on a subject vehicle. The electronic device may then determine at least one suspect vehicle for a collision with the target vehicle based on the forward road map.
The front road map is a road image in front of a target vehicle captured by an image capturing device (such as a camera) mounted on the target vehicle. The front road map includes an image of the road ahead of the subject vehicle, an image of the vehicle ahead, etc., but does not include the entire image of the subject vehicle. For example, the front road map only includes the head image of the target vehicle, or the front road image does not include the image of the target vehicle. As shown in fig. 2, fig. 2 is a front road map including a road ahead of the target vehicle, a vehicle on the road ahead, and the like.
When the electronic device is a background server, the background server may receive the front road map collected by the image collecting device mounted on the target vehicle, and when the electronic device is the target vehicle, the target vehicle may collect the front road map by using the image collecting device.
After the front road map is obtained, two automatically set line segments are generated on the front road map. As shown in fig. 2, line 1 and line 2 in fig. 2 are the two lines. Line segment 1 is the left line segment and line segment 2 is the right line segment. The left line segment is a line segment formed in the front road map after a left front-rear wheel connecting line of the target vehicle is extended by a preset length, and the right line segment is a line segment formed in the front road map after the right front-rear wheel connecting line of the target vehicle is extended by the preset length. The two line segments are related to the mounting position of the image pickup device on the target vehicle. Once the mounting position of the image acquisition device is determined, the positions of the two line segments in the front road map of each frame acquired by the image acquisition device are the same.
In addition, in practical applications, the image capturing apparatus may be generally mounted on a rear view mirror of a target vehicle, but the mounting position of the image capturing apparatus is only described as an example and is not specifically limited.
In the embodiment of the application, the electronic device determines at least one suspected vehicle colliding with the target vehicle according to the front road map, and the following steps are performed.
Step 1: the electronic device may determine a target lane in which the target vehicle is located in a forward road map.
When the method is implemented, the electronic equipment can perform lane recognition on the road map in front and recognize a target lane occupied by the target vehicle.
A recognition method of recognizing a target lane occupied by a target vehicle is described below.
In implementation, the electronic device may recognize the lane lines on both sides of each lane in the road map in front using a classifier or the like.
The electronic device may then convert the front road map into a front road top view using existing algorithms, where the objects in the front road top view are the state of the objects in the front road map from the top view perspective. As shown in fig. 3(a), fig. 3(a) is a front road view, and fig. 3(b) is a converted front road top view of fig. 3 (a).
The electronic device may map each point on the identified lane line into the top view of the front road, and then fit each point of the lane line in the top view of the front road to obtain a curve equation of the lane line on the top view of the front road. And then the electronic equipment can determine the lane occupied by the target vehicle according to the curve equation of the lane lines on the two sides of each lane and the coordinates of the two line segments.
Of course, those skilled in the art may also recognize the target lane occupied by the target vehicle through machine learning and neural network technology, and the recognition of the target lane occupied by the target vehicle is only exemplarily illustrated and is not specifically limited.
In practical application, due to the complexity of the driving road of the target vehicle, the target vehicle does not always drive on the road with the lane lines, so that the front road map shot by the image acquisition device carried on the target vehicle may have no lane lines, and the target lane is determined in the following manner.
In the embodiment of the present application, if a lane occupied by the target vehicle can be identified in the front road map, the identified lane is determined as the target lane.
If the lane occupied by the target vehicle cannot be identified in the front road map, drawing a virtual lane which is along the movement direction of the target vehicle and is to be occupied by the target vehicle, and taking the drawn virtual lane as the target lane.
A method of drawing a virtual lane is described below.
The middle point of the bottom side of the top view of the front road is an image acquisition device, the electronic device can draw two points on the bottom side, and the distance between the two points and the middle point is a preset distance. This preset distance is related to the vehicle width, and is usually 1.6m, which is only exemplary and not specifically limited.
The electronic device may then extend the two points in the direction of movement of the target vehicle, forming two extension lines. The electronic device may map points on the two extension lines back to the road map in front to form two virtual lane lines, and the area between the two virtual lane lines is the virtual lane. The drawn virtual lane line direction is consistent with the moving direction of the target vehicle.
For example, as shown in fig. 4, the drawn virtual lane lines are the two dashed lines shown in fig. 4.
Of course, only one way of drawing the virtual lane is shown here, and of course, a person skilled in the art may also use machine learning, neural networks, etc. to draw the virtual lane, which is only illustrated here by way of example and is not specifically limited to drawing the virtual lane.
Further, in the embodiment of the present application, the moving direction of the vehicle is obtained as follows.
For example, a sensor is provided on the steering wheel of the subject vehicle, which can detect a steering wheel rotation parameter, such as the angle of rotation of the steering wheel, and the electronic device can calculate the direction of movement of the vehicle based on the steering wheel rotation parameter.
Step 2: the electronic device identifies other vehicles occupying the target lane and treats the identified other vehicles as suspect vehicles.
Since the target lane represents the moving direction of the target vehicle, the position to which the target vehicle moves in the future can be determined through the target lane, so that the target lane is more accurate to determine the suspected vehicle which is likely to collide with the target vehicle.
The electronic device determines the suspected vehicle according to the road map in front, but the electronic device may also determine the suspected vehicle in other manners, for example, the electronic device may use a distance measuring sensor mounted on a target vehicle, and use a vehicle in front with a distance smaller than a preset distance as the suspected vehicle, and the like. The method for determining the suspected vehicle is only shown by way of example, and is not particularly limited.
Step 102: and calculating the longitudinal distance and the overlapping length of the target vehicle and each suspected vehicle.
The longitudinal distance is a distance between the target vehicle and the suspected vehicle in the length direction of the target vehicle, in other words, a distance between the target vehicle and the suspected vehicle in the length direction of the target vehicle. For example, as shown in fig. 5, the longitudinal distance marked in fig. 5 is the longitudinal distance between the suspected vehicle and the target vehicle.
The overlap length is a length of an overlap portion between the target vehicle and the suspect vehicle in the vehicle width direction of the target vehicle. For example, as shown in fig. 5, the overlapping length marked in fig. 5 is the overlapping length of the suspected vehicle and the target vehicle.
In implementation, the electronic device may calculate the longitudinal distance and the overlapping length between the target vehicle and each suspect vehicle by using the front road map.
1) Calculating the overlapping length of the target vehicle and each suspect vehicle
Specifically, for each suspect vehicle, the electronic device may determine an overlap length of the target vehicle and the suspect vehicle based on a pixel distance between a first designated point and a second designated point on the front road map.
Wherein the first specified point is an intersection point of any one of extension lines of two line segments arranged on the front road map and the lower boundary of the suspected vehicle,
for example, as shown in fig. 6. Line segment 1 and line segment 2 are two set line segments. The vehicle framed by the frame in fig. 6 is a suspected vehicle, and the frame is a boundary frame of the suspected vehicle. The intersection (i.e., point 1) of the extension line of the line segment 2 and the lower boundary (i.e., edge 1 in fig. 6) of the suspected vehicle boundary frame is the first designated point (i.e., point 1).
The second designated point is an end point (i.e., point 2) of the lower boundary of the suspected vehicle between the two extension lines.
For example, as shown in fig. 6, the lower boundary of the bounding box of the suspect vehicle has two endpoints, point 2 and point 3, respectively. Point 2 is located between the two extension lines, so Point 2 is the second designated point.
In fig. 6, the pixel distance 1 between point 1 and point 2 is the pixel distance for calculating the overlap length.
As for determining the actual distance based on the pixel distance between two points on the image, the existing methods can be used to calculate the principle of pinhole imaging, etc., and will not be described herein.
2) Calculating the longitudinal distance between the target vehicle and each suspect vehicle
The electronic device can determine the overlapping length of the target vehicle and the suspect vehicle according to the shortest pixel distance between the lower boundary of the suspect vehicle and the bottom edge of the road map in front of the target vehicle.
As shown in fig. 6, the lower boundary of the suspected vehicle in fig. 6 is the shortest pixel distance (i.e., the pixel distance 2 marked in fig. 5) between the lower boundary (i.e., the side 1) of the boundary frame of the suspected vehicle and the bottom side (i.e., the side 2) of the front road map, and the pixel distance 2 is the pixel distance for calculating the longitudinal length.
The foregoing describes determining the longitudinal distance and the overlapping length between the target vehicle and each suspect vehicle by using a front road map, but the electronic device may also determine the longitudinal distance and the overlapping length between the target vehicle and each suspect vehicle by other methods, for example, the electronic device may determine the longitudinal distance and the overlapping length by distance information collected by a distance measuring sensor mounted on the target vehicle, and the calculation method for determining the longitudinal distance and the overlapping length is only exemplarily illustrated and is not specifically limited.
Step 103: and determining the collision score of the target vehicle and each suspect vehicle according to the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle.
Step 104: and selecting the suspected vehicle with the largest collision score as the dangerous vehicle with the largest collision risk of the target vehicle.
When the method is implemented, for each suspected vehicle, the electronic device can calculate the overlapping proportion of the overlapping length in the width of the target vehicle and calculate the longitudinal proportion of the longitudinal distance corresponding to the suspected vehicle and the preset distance value.
The preset distance value may be preset by a developer, and may be 120m, for example. The preset distance value is only exemplarily described here, and in practical applications, the preset distance value may be adjusted according to actual situations.
In addition, the electronic device may further obtain weight values corresponding to the longitudinal proportion and the overlapping proportion of the suspected vehicle, respectively.
In determining the weight value, the electronic device may determine the weight value w of the longitudinal proportion based on the longitudinal distance. w is positively correlated with the longitudinal distance, i.e., the larger the longitudinal distance, the larger the value of w. w ∈ (0, 1). The weight value of the overlap ratio is 1-w.
When determining the weight value w of the longitudinal proportion according to the longitudinal distance, the electronic device may determine w positively correlated to the longitudinal distance according to a formula in which a preset longitudinal distance is used as an independent variable and w is used as a dependent variable. Of course, the electronic device also pre-configures a list recorded with the corresponding relationship between the longitudinal distance and w, and the electronic device may determine w corresponding to the longitudinal distance by looking up a table, where the determination of w is merely exemplary and the determination method is not specifically limited.
Then, the electronic apparatus may calculate the product S1 of the longitudinal distance and the weight value corresponding to the longitudinal proportion, the product S2 of the overlap proportion and the weight value corresponding to the overlap proportion, and the sum of S1 and S2 as the collision score of the suspect vehicle.
For example, the electronic device may calculate the collision score for the suspect vehicle according to the following formula:
P=L*w+R*(1-w);
wherein, P is the collision score, L is the longitudinal ratio of the target vehicle to the suspected vehicle, w is the weight value corresponding to the longitudinal ratio, R is the overlap ratio of the target vehicle to the suspected vehicle, and (1-w) is the weight value corresponding to the overlap ratio.
After calculating the collision score of each suspect vehicle, the electronic device may select the suspect vehicle with the highest collision score as the dangerous vehicle with the highest risk of collision with the target vehicle.
As can be seen from the above description, in one aspect, the present application uses two parameters in calculating the collision score, one is the overlap length of the target vehicle and the suspected vehicle, and the other is the longitudinal distance between the target vehicle and the suspected vehicle. The overlap length represents a collision zone when the target vehicle collides with the suspect vehicle, and the longitudinal distance represents a vehicle separation of the target vehicle from the suspect vehicle. The collision score calculated using these two parameters is more accurate than calculating the collision score using only the longitudinal distance.
For example, as shown in fig. 7a and 7b, the collision score is calculated using only the longitudinal distance, and the collision score of the suspect vehicle of fig. 7a is the same as the collision score calculated by the suspect vehicle of fig. 7 b. However, as can be seen from fig. 7a, even if the longitudinal distance between the target vehicle and the suspect vehicle is very small, no collision occurs because of no overlap. In fig. 7b, the suspected vehicle is overlapped with the target vehicle, and therefore, the collision is likely to occur. So in practice the collision score of the suspect vehicle of fig. 7b should be larger than that of the suspect vehicle of fig. 7 a. Therefore, calculating a collision score using only the longitudinal distance is clearly inaccurate.
And this application adopts two parameters of longitudinal distance and overlap length to calculate the collision score, and the collision score of suspect vehicle is greater than the collision score of suspect vehicle of fig. 7a apparently, and this accords with reality, so the collision score of suspect vehicle that this application calculated is more accurate.
On the other hand, as the longitudinal distance is smaller, the weight value w of the longitudinal proportion is smaller, and the weight value (1-w) of the overlap proportion is larger, that is, as the longitudinal distance is smaller, the calculation of the collision score focuses more on the overlap proportion, which is more in line with the actual situation. It is more accurate to calculate the collision score in a manner that w varies with longitudinal distance.
In the third aspect, the target lane represents the moving direction of the target vehicle, and the position to which the target vehicle moves in the future can be determined through the target lane, so that the method and the system can more accurately take the vehicle occupying the target lane as a suspected vehicle which is possibly collided with the target vehicle.
Referring to fig. 8, fig. 8 is a hardware structure diagram of an electronic device according to an exemplary embodiment of the present application.
The electronic device includes: a communication interface 801, a processor 802, a machine-readable storage medium 803, and a bus 804; wherein the communication interface 801, the processor 802 and the machine-readable storage medium 803 communicate with each other via a bus 804. The processor 802 may perform the above-described hazardous vehicle determination method by reading and executing machine-executable instructions in the machine-readable storage medium 803 corresponding to the hazardous vehicle determination control logic.
The machine-readable storage medium 803 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 803 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Referring to fig. 9, fig. 9 is a block diagram illustrating a hazardous vehicle determination in accordance with an exemplary embodiment of the present application. The device can be applied to electronic equipment and can comprise the following units.
A first determination unit 901 for determining at least one suspect vehicle that is about to collide with the target vehicle;
a calculating unit 902, configured to calculate a longitudinal distance and an overlap length between the target vehicle and each suspect vehicle; the longitudinal distance is the distance between the target vehicle and the suspected vehicle on the length of the target vehicle, and the overlapping length is the length of the overlapping part between the target vehicle and the suspected vehicle on the width direction of the target vehicle;
a second determining unit 903, configured to determine collision scores between the target vehicle and each suspected vehicle according to the longitudinal distance and the overlapping length between the target vehicle and each suspected vehicle;
and a selecting unit 904, configured to select a suspected vehicle with the highest collision score as a dangerous vehicle with the highest collision risk of the target vehicle.
Optionally, the apparatus further comprises:
an obtaining unit 905, configured to obtain a front road map captured by an image capturing device mounted on the target vehicle;
the first determining unit 901 is specifically configured to determine a target lane where the target vehicle is located in the front road map; and identifying other vehicles occupying the target lane, and taking the other vehicles occupying the target lane as suspected vehicles.
Optionally, the first determining unit 901 is specifically configured to identify a lane occupied by the target vehicle in the front road map when determining the target lane where the target vehicle is located in the front road map; if the lane occupied by the target vehicle is identified in the front road map, determining the identified lane as the target lane; and if the lane occupied by the target vehicle cannot be identified in the front road map, drawing a virtual lane which is along the movement direction of the target vehicle and occupied by the target vehicle, and determining the drawn virtual lane as the target lane.
Optionally, the moving direction of the target vehicle is determined by: acquiring steering wheel rotation parameters of the target vehicle; determining a direction of motion of the target vehicle based on the steering wheel rotation parameter.
Optionally, the apparatus further comprises:
an obtaining unit 905, configured to obtain a front road map captured by an image capturing device mounted on the target vehicle;
the calculating unit 902 is specifically configured to determine, for each suspected vehicle, an overlapping length of the target vehicle and the suspected vehicle based on a pixel distance between a first specified point and a second specified point on the road map ahead; the first specified point is an intersection point of any one of extension lines of two line segments arranged on the front road map and the lower boundary of the suspected vehicle; the second designated point is an end point of the lower boundary of the suspected vehicle between two extension lines; the two preset line segments are respectively line segments formed on the front road map by respectively extending the left front wheel-rear wheel connecting line and the right front wheel-rear wheel connecting line of the target vehicle by preset lengths; and determining the longitudinal distance between the target vehicle and the suspect vehicle according to the shortest pixel distance between the lower boundary of the suspect vehicle and the bottom edge of the front road map.
Optionally, the second determining unit 903 is specifically configured to calculate, for each suspected vehicle, an overlap ratio of an overlap length corresponding to the suspected vehicle to the width of the target vehicle; calculating the longitudinal proportion of the longitudinal distance corresponding to the suspected vehicle to a preset distance value; determining weight values respectively corresponding to the longitudinal proportion and the overlapping proportion of the suspected vehicle; calculating a product S1 of the longitudinal proportion and a weight value corresponding to the longitudinal proportion, and a product S2 of the overlap proportion and the weight value corresponding to the overlap proportion; the sum of S1 and S2 is calculated as the collision score of the suspect vehicle.
Optionally, the second determining unit 903 is specifically configured to determine a weight value w corresponding to the longitudinal proportion according to the longitudinal distance of the suspected vehicle when determining the weight values corresponding to the longitudinal proportion and the overlap proportion of the suspected vehicle respectively; wherein the value of w is positively correlated with the longitudinal distance, and w belongs to (0, 1); and determining the weight value of the overlapping proportion of the suspected vehicle to be 1-w.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (16)
1. A method of determining a hazardous vehicle, the method comprising:
determining at least one suspect vehicle that is to collide with the target vehicle;
calculating the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle; the longitudinal distance is the distance between the target vehicle and the suspected vehicle in the length direction of the target vehicle, and the overlapping length is the length of the overlapping part between the target vehicle and the suspected vehicle in the width direction of the target vehicle;
determining collision scores of the target vehicle and each suspect vehicle according to the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle;
and selecting the suspected vehicle with the highest collision score as the dangerous vehicle with the highest collision risk of the target vehicle.
2. The method of claim 1, wherein prior to the determining at least one suspect vehicle that is to collide with the target vehicle, the method further comprises:
acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the determining at least one suspect vehicle that is to collide with the target vehicle, comprising:
determining a target lane where the target vehicle is located in the front road map;
and identifying other vehicles occupying the target lane, and taking the other vehicles occupying the target lane as suspected vehicles.
3. The method of claim 2, wherein the determining a target lane in which the target vehicle is located in the forward road map comprises:
identifying a lane occupied by the target vehicle in the front road map;
if the lane occupied by the target vehicle is identified in the front road map, determining the identified lane as the target lane;
and if the lane occupied by the target vehicle cannot be identified in the front road map, drawing a virtual lane which is along the movement direction of the target vehicle and occupied by the target vehicle, and determining the drawn virtual lane as the target lane.
4. The method of claim 3, wherein the direction of motion of the target vehicle is determined by:
acquiring steering wheel rotation parameters of the target vehicle;
determining a direction of motion of the target vehicle based on the steering wheel rotation parameter.
5. The method of claim 1, wherein prior to the determining at least one suspect vehicle that is about to collide with a target vehicle, the method further comprises:
acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the calculating of the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle comprises:
for each suspected vehicle, determining the overlapping length of the target vehicle and the suspected vehicle based on the pixel distance between a first designated point and a second designated point on the front road map; the first specified point is an intersection point of any one of extension lines of two line segments arranged on the front road map and the lower boundary of the suspected vehicle; the second designated point is an end point of the lower boundary of the suspected vehicle between two extension lines; the two preset line segments are respectively line segments formed on the front road map by respectively extending the left front wheel-rear wheel connecting line and the right front wheel-rear wheel connecting line of the target vehicle by preset lengths;
and determining the longitudinal distance between the target vehicle and the suspect vehicle according to the shortest pixel distance between the lower boundary of the suspect vehicle and the bottom edge of the front road map.
6. The method of claim 1, wherein determining the collision score of the target vehicle and each suspect vehicle according to the calculated longitudinal distance and overlap length of the target vehicle and each suspect vehicle comprises:
calculating the overlapping proportion of the overlapping length corresponding to each suspected vehicle in the width of the target vehicle for each suspected vehicle;
calculating the longitudinal proportion of the longitudinal distance corresponding to the suspected vehicle to a preset distance value;
determining weight values respectively corresponding to the longitudinal proportion and the overlapping proportion of the suspected vehicle;
calculating a product S1 of the longitudinal proportion and a weight value corresponding to the longitudinal proportion, and a product S2 of the overlap proportion and the weight value corresponding to the overlap proportion;
the sum of S1 and S2 is calculated as the collision score of the suspect vehicle.
7. The method according to claim 6, wherein the determining the weight values corresponding to the longitudinal proportion and the overlapping proportion of the suspected vehicle respectively comprises:
determining a weight value w corresponding to the longitudinal proportion according to the longitudinal distance of the suspected vehicle; wherein the value of w is positively correlated with the longitudinal distance, and w belongs to (0, 1);
and determining the weight value of the overlapping proportion of the suspected vehicle to be 1-w.
8. A dangerous vehicle determination apparatus, characterized in that the apparatus comprises:
a first determination unit for determining at least one suspect vehicle that is about to collide with the target vehicle;
the calculating unit is used for calculating the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle; the longitudinal distance is the distance between the target vehicle and the suspected vehicle on the length of the target vehicle, and the overlapping length is the length of the overlapping part between the target vehicle and the suspected vehicle on the width direction of the target vehicle;
the second determining unit is used for determining the collision score of the target vehicle and each suspect vehicle according to the longitudinal distance and the overlapping length of the target vehicle and each suspect vehicle;
and the selecting unit is used for selecting the suspected vehicle with the highest collision score as the dangerous vehicle with the highest collision risk of the target vehicle.
9. The apparatus of claim 8, further comprising:
the acquisition unit is used for acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the first determining unit is specifically configured to determine a target lane in which the target vehicle is located in the front road map; and identifying other vehicles occupying the target lane, and taking the other vehicles occupying the target lane as suspected vehicles.
10. The apparatus according to claim 9, wherein the first determining unit, when determining the target lane in which the target vehicle is located in the front road map, is specifically configured to identify the lane occupied by the target vehicle in the front road map; if the lane occupied by the target vehicle is identified in the front road map, determining the identified lane as the target lane; and if the lane occupied by the target vehicle cannot be identified in the front road map, drawing a virtual lane which is along the movement direction of the target vehicle and occupied by the target vehicle, and determining the drawn virtual lane as the target lane.
11. The apparatus of claim 10, wherein the direction of motion of the target vehicle is determined by: acquiring steering wheel rotation parameters of the target vehicle; determining a direction of motion of the target vehicle based on the steering wheel rotation parameter.
12. The apparatus of claim 8, further comprising:
the acquisition unit is used for acquiring a front road map shot by image acquisition equipment carried on the target vehicle;
the calculation unit is specifically configured to determine, for each suspected vehicle, an overlap length of the target vehicle and the suspected vehicle based on a pixel distance between a first specified point and a second specified point on the road map ahead; the first specified point is an intersection point of any one of extension lines of two line segments arranged on the front road map and the lower boundary of the suspected vehicle; the second designated point is an end point of the lower boundary of the suspected vehicle between two extension lines; the two preset line segments are respectively line segments formed on the front road map by respectively extending the left front wheel-rear wheel connecting line and the right front wheel-rear wheel connecting line of the target vehicle by preset lengths; and determining the longitudinal distance between the target vehicle and the suspect vehicle according to the shortest pixel distance between the lower boundary of the suspect vehicle and the bottom edge of the front road map.
13. The apparatus according to claim 8, wherein the second determining unit is specifically configured to calculate, for each suspected vehicle, an overlap ratio of an overlap length corresponding to the suspected vehicle to the width of the target vehicle; calculating the longitudinal proportion of the longitudinal distance corresponding to the suspected vehicle to a preset distance value; determining weight values respectively corresponding to the longitudinal proportion and the overlapping proportion of the suspected vehicle; calculating a product S1 of the longitudinal proportion and a weight value corresponding to the longitudinal proportion, and a product S2 of the overlap proportion and the weight value corresponding to the overlap proportion; the sum of S1 and S2 is calculated as the collision score of the suspect vehicle.
14. The apparatus according to claim 13, wherein the second determining unit, when determining the weight values corresponding to the longitudinal proportion and the overlap proportion of the suspected vehicle, is specifically configured to determine the weight value w corresponding to the longitudinal proportion according to the longitudinal distance of the suspected vehicle; wherein the value of w is positively correlated with the longitudinal distance, and w belongs to (0, 1); and determining the weight value of the overlapping proportion of the suspected vehicle to be 1-w.
15. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method of any one of claims 1 to 7.
16. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811511372.5A CN111301407B (en) | 2018-12-11 | 2018-12-11 | Dangerous vehicle determination method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811511372.5A CN111301407B (en) | 2018-12-11 | 2018-12-11 | Dangerous vehicle determination method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111301407A CN111301407A (en) | 2020-06-19 |
CN111301407B true CN111301407B (en) | 2021-09-21 |
Family
ID=71154364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811511372.5A Active CN111301407B (en) | 2018-12-11 | 2018-12-11 | Dangerous vehicle determination method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111301407B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11501538B2 (en) * | 2020-08-24 | 2022-11-15 | Verizon Connect Development Limited | Systems and methods for detecting vehicle tailgating |
CN116682095B (en) * | 2023-08-02 | 2023-11-07 | 天津所托瑞安汽车科技有限公司 | Method, device, equipment and storage medium for determining attention target |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6246961B1 (en) * | 1998-06-09 | 2001-06-12 | Yazaki Corporation | Collision alarm method and apparatus for vehicles |
CN1812901A (en) * | 2003-07-11 | 2006-08-02 | 丰田自动车株式会社 | Crash-safe vehicle control system |
KR20170019794A (en) * | 2015-08-12 | 2017-02-22 | 현대모비스 주식회사 | Vehicle and collision avoidance method for the same |
CN107609486A (en) * | 2017-08-16 | 2018-01-19 | 中国地质大学(武汉) | To anti-collision early warning method and system before a kind of vehicle |
-
2018
- 2018-12-11 CN CN201811511372.5A patent/CN111301407B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6246961B1 (en) * | 1998-06-09 | 2001-06-12 | Yazaki Corporation | Collision alarm method and apparatus for vehicles |
CN1812901A (en) * | 2003-07-11 | 2006-08-02 | 丰田自动车株式会社 | Crash-safe vehicle control system |
KR20170019794A (en) * | 2015-08-12 | 2017-02-22 | 현대모비스 주식회사 | Vehicle and collision avoidance method for the same |
CN107609486A (en) * | 2017-08-16 | 2018-01-19 | 中国地质大学(武汉) | To anti-collision early warning method and system before a kind of vehicle |
Also Published As
Publication number | Publication date |
---|---|
CN111301407A (en) | 2020-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108647638B (en) | Vehicle position detection method and device | |
EP3296923B1 (en) | A method of detecting an overtaking vehicle, related processing system, overtaking vehicle detection system and vehicle | |
US10580155B2 (en) | Image processing apparatus, imaging device, device control system, frequency distribution image generation method, and recording medium | |
JP6473571B2 (en) | TTC measuring device and TTC measuring program | |
US8406472B2 (en) | Method and system for processing image data | |
CN107914708A (en) | Rear barrier analyte detection and range estimation | |
JP2016148962A (en) | Object detection device | |
JP2013225295A5 (en) | ||
KR102195317B1 (en) | Method for Predicting Vehicle Collision Using Data Collected from Video Games | |
JP6815963B2 (en) | External recognition device for vehicles | |
JP6384802B2 (en) | MOBILE BODY DETECTING DEVICE, IMAGE PROCESSING DEVICE, MOBILE BODY DETECTING METHOD, AND INTEGRATED CIRCUIT | |
JP4940177B2 (en) | Traffic flow measuring device | |
WO2017159056A1 (en) | Image processing device, image pickup device, mobile-body apparatus control system, image processing method, and program | |
JP2011134207A (en) | Drive recorder and map generation system | |
KR102011231B1 (en) | Image processing apparatus and image processing method | |
KR20180047149A (en) | Apparatus and method for risk alarming of collision | |
CN111301407B (en) | Dangerous vehicle determination method and device, electronic equipment and readable storage medium | |
JP2017207874A (en) | Image processing apparatus, imaging apparatus, moving body device control system, image processing method, and program | |
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 | |
JP6384803B2 (en) | MOBILE BODY DETECTING DEVICE, IMAGE PROCESSING DEVICE, MOBILE BODY DETECTING METHOD, AND INTEGRATED CIRCUIT | |
JP2006140636A (en) | Obstacle detecting device and method | |
JP2013069045A (en) | Image recognition device, image recognition method, and image recognition program | |
JP6812701B2 (en) | Image processing equipment, mobile device control system, image processing method, and program | |
JP4575315B2 (en) | Object detection apparatus and method | |
JP5957182B2 (en) | Road surface pattern recognition method and vehicle information recording apparatus |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |