Disclosure of Invention
The embodiment of the invention provides a vehicle early warning method which can accurately provide warning information for a driver in real time. The specific technical scheme is as follows:
the embodiment of the application provides a vehicle early warning method, which comprises the following steps:
determining a relative distance between a target vehicle and a preceding vehicle when a vehicle is present in front of the target vehicle;
identifying a driving state of a driver of the target vehicle according to image information of the driver;
obtaining the braking distance of the emergency braking of the target vehicle at the current moment according to the driving state of the driver and the state information of the target vehicle;
and when the relative distance between the target vehicle and the front vehicle is not greater than the braking distance of the target vehicle, warning information is sent out.
Optionally, the determining the relative distance between the target vehicle and the preceding vehicle comprises:
acquiring position information of the target vehicle and the front vehicle, wherein the position information comprises longitude and latitude information;
carrying out direction adjustment on the position information numerical value;
calculating a relative distance between the target vehicle and the preceding vehicle according to a first formula:
wherein,
C=sin(MlatA)*sin(MlatB)*cos(MlonA-MlonB)+cos(MlatA)*cos(MlatB);
r represents the average radius of the earth, and takes 6371.004 km;
MlatA represents the latitude value of the target vehicle after the direction adjustment;
mlat b represents the latitude value of the preceding vehicle after the direction adjustment;
MlonA represents a longitude value of the target vehicle after direction adjustment;
MlonB represents a longitude value of the preceding vehicle after direction adjustment;
D1representing the relative distance between the target vehicle and the preceding vehicle.
Optionally, before the acquiring the position information of the preceding vehicle, the method further includes:
acquiring image information of a road in front of the target vehicle;
and detecting whether the collected image information has a vehicle or not by using a first cascade classifier, wherein the first cascade classifier is obtained by training road image samples under different conditions, and the road image samples comprise image samples with vehicles in front of the target vehicle under different scenes and image samples without vehicles in front of the target vehicle under corresponding scenes.
Optionally, before the identifying the driving state of the driver, the method further comprises:
detecting the collected image information of the driver by using a second cascade classifier and analyzing and identifying the driving state of the driver;
the second cascade classifier is obtained by training image samples of a driver in different driving states, wherein the driving states of the driver comprise a wakefulness state, a slight fatigue state, a moderate fatigue state and a severe fatigue state.
Optionally, obtaining the braking distance of the emergency braking of the target vehicle at the current moment according to the driving state of the driver comprises:
acquiring the speeds of the target vehicle and the front vehicle, and calculating the relative speed between the target vehicle and the front vehicle according to a second formula as follows:
ΔV=V1-V2
wherein,
av represents a relative speed between the target vehicle and the preceding vehicle,
V1represents the traveling speed of the target vehicle,
V2indicates the traveling speed of the preceding vehicle,
acquiring corresponding reaction time according to the driving state of the driver, and calculating the braking distance of the target vehicle according to a third formula as follows:
wherein,
D2indicating the braking distance of the target vehicle,
tiindicating that the driver is driving in different driving statesThe reaction time corresponding to the state is,
t0representing the reaction time corresponding to the driver in the waking state,
t1indicating the corresponding reaction time of the driver in a slight fatigue state,
t2indicating the reaction time corresponding to the driver in a moderate fatigue state,
t3representing the corresponding reaction time of the driver in a severe fatigue state,
a represents the maximum braking deceleration of the target vehicle.
The embodiment of the present application further provides a vehicle early warning system, including:
a relative distance calculation module configured to determine a relative distance between a target vehicle and a preceding vehicle when the vehicle exists ahead of the target vehicle;
a state recognition module configured to recognize a driving state of the driver from the image information of the driver;
the braking distance acquisition module is configured to obtain the braking distance of emergency braking of the target vehicle at the current moment according to the driving state of the driver and the state information of the target vehicle;
the warning module is configured to send out warning information when the relative distance between the target vehicle and the front vehicle is not larger than the braking distance of the target vehicle.
Optionally, the relative distance calculating module includes:
a position acquisition unit configured to acquire position information of the target vehicle and the preceding vehicle, wherein the position information includes latitude and longitude information;
a direction adjustment unit configured to perform direction adjustment on the position information data;
a relative distance calculation unit configured to calculate a relative distance between the target vehicle and the preceding vehicle according to a first formula below;
wherein,
C=sin(MlatA)*sin(MlatB)*cos(MlonA-MlonB)+cos(MlatA)*cos(MlatB);
r represents the average radius of the earth, and takes 6371.004 km;
MlatA represents the latitude value of the target vehicle after the direction adjustment;
mlat b represents the latitude value of the preceding vehicle after the direction adjustment;
MlonA represents a longitude value of the target vehicle after direction adjustment;
MlonB represents a longitude value of the preceding vehicle after direction adjustment;
D1representing the relative distance between the target vehicle and the preceding vehicle.
Optionally, the system further comprises:
an image acquisition module configured to acquire image information of a road ahead of the target vehicle;
the first cascade classifier is configured to detect whether a vehicle exists in the acquired image information, wherein the first cascade classifier is obtained by training each road image sample under different conditions, and the road image samples comprise image samples with a vehicle in front of the target vehicle under different scenes and image samples without a vehicle in front of the target vehicle under corresponding scenes.
Optionally, the system further comprises:
the second cascade classifier is configured to detect the collected image information of the driver and analyze and identify the driving state of the driver before identifying the driving state of the driver;
the second cascade classifier is obtained by training image samples of a driver in different driving states, wherein the driving states of the driver comprise a wakeful state, a slight fatigue state, a moderate fatigue state and a severe fatigue state.
Optionally, the braking distance obtaining module includes:
a relative speed calculation unit configured to acquire speeds of the target vehicle and the preceding vehicle, and calculate a relative speed between the target vehicle and the preceding vehicle according to a second formula as follows:
ΔV=V1-V2
wherein,
av represents a relative speed between the target vehicle and the preceding vehicle,
V1represents the traveling speed of the target vehicle,
V2representing a running speed of the preceding vehicle;
a braking distance calculation unit configured to acquire a corresponding reaction time according to a driving state of the driver, and calculate a braking distance of the target vehicle according to a second formula as follows:
wherein,
D2indicating a braking distance of the target vehicle;
tirepresenting the corresponding reaction time of the driver in different driving states;
t0representing the reaction time corresponding to the driver in the waking state;
t1representing the corresponding reaction time of the driver in a slight fatigue state;
t2representing the corresponding reaction time of the driver in the moderate fatigue state;
t3representing the corresponding reaction time of the driver in a severe fatigue state;
a represents the maximum braking deceleration of the target vehicle.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
the method comprises the steps of collecting image information of a driver, identifying the driving state of the driver according to the image information, and obtaining the corresponding braking distance according to the current driving state of the driver, so that the braking distance of the target vehicle can be obtained in real time according to the current state of the driver under different conditions, and the braking distance of the target vehicle is more accurate. When a vehicle exists in front of the target vehicle, the relative distance between the target vehicle and the vehicle in front is calculated, so that the braking distance of the target vehicle and the relative distance between the two vehicles can be compared, when the relative distance between the two vehicles is not greater than the braking distance of the target vehicle, namely, when an emergency happens at the current moment, potential safety hazards exist between the two vehicles, and warning information can be sent at the moment to remind a driver. Therefore, the timeliness of the warning information can be ensured by acquiring the image information of the road in front of the target vehicle and the driver in real time to judge the safety of the target vehicle, so that the accurate warning information can be provided for the driver in real time.
Detailed Description
In order to make the technical solutions and advantages of the present invention clearer, the following will describe embodiments of the present invention in further detail with reference to the accompanying drawings.
Referring to fig. 1, an implementation environment of a vehicle warning method provided in an embodiment of the present application may include: a target vehicle 1 and a preceding vehicle 2, wherein,
the front vehicle 2 may be provided with a positioning module 205 and a short-range communication module 203, the positioning module 205 is used for acquiring the position information and the running speed of the vehicle, and the short-range communication module 203 is used for establishing communication connection with other vehicles.
The target vehicle 1 may be provided with a grayscale camera 101, an infrared camera 102, a positioning module 103, a short-range communication module 105, an alarm 104, and an in-vehicle terminal 106, wherein the grayscale camera 101 is used for collecting image information of a road in front of the target vehicle 1 and transmitting the acquired image to the in-vehicle terminal 106.
The positioning module 103 is configured to acquire the position information and the traveling speed of the target vehicle 1, and send the position information and the traveling speed of the target vehicle 1 to the in-vehicle terminal 106. The short-range communication module 103 is configured to establish a communication connection with the short-range communication module 203 of the preceding vehicle 2, receive the position information and the traveling speed transmitted by the short-range communication module 203 of the preceding vehicle 2, and transmit the position information and the traveling speed of the preceding vehicle 2 to the in-vehicle terminal 106. The in-vehicle terminal 106 receives the traveling speed and the position information of the target vehicle 1 and the preceding vehicle 2 transmitted by the positioning module 105 and the short range communication module 103, and obtains the relative distance and the relative speed between the two vehicles.
The infrared camera 102 collects image information of the driver, recognizes the driving state of the driver from the image, and transmits the driving state to the in-vehicle terminal 106. The vehicle-mounted terminal 106 obtains the braking distance of the target vehicle 1 according to the reaction time corresponding to the driving state of the driver, the relative speed between the two vehicles and the state information of the target vehicle 1, and compares the relative distance between the two vehicles with the braking distance of the target vehicle 1; when the relative distance between the two vehicles is not greater than the braking distance of the target vehicle 1, the vehicle-mounted terminal 106 starts the alarm 104 to send out warning information.
Referring to fig. 2, some embodiments of the present application provide a vehicle warning method, including:
in step S201, when there is a vehicle in front of the target vehicle 1, the relative distance between the target vehicle 1 and the preceding vehicle 2 is determined.
For example, in one implementation manner of the embodiment of the present application, when the target vehicle 1 is in a driving process, it may be determined whether there is another vehicle in front of the target vehicle 1. When there are other running vehicles ahead of the target vehicle 1, the relative distance between the target vehicle 1 and the preceding vehicle 2 can be detected next.
Step S202, obtaining the braking distance of the emergency braking of the target vehicle 1 at the present time according to the driving state of the driver and the state information of the target vehicle 1.
For example, in one implementation manner of the embodiment of the present application, the reaction times corresponding to different driving states of the driver are different, so that when the state information of the target vehicle 1, such as the vehicle speed and the maximum braking deceleration of the target vehicle 1, is consistent, the difference in the reaction times of the driver directly results in the difference in the emergency braking distance of the target vehicle 1 at the time of emergency.
In step S203, the driving state of the driver is recognized from the image information of the driver of the target vehicle 1.
For example, in one implementation manner of the embodiment of the present application, the infrared camera 102 may be installed in the target vehicle 1, the infrared camera 102 may collect image information of the face of the driver, and the infrared camera 102 may upload the collected image information of the face of the driver to the in-vehicle terminal 106, and the image of the face of the driver is recognized through an algorithm in the in-vehicle terminal 106 to obtain the current driving state of the driver.
And step S204, when the relative distance between the target vehicle 1 and the front vehicle 2 is not more than the braking distance of the target vehicle 1, sending out warning information.
When the target vehicle 1 and the preceding vehicle 2 travel in the front-rear direction, it is necessary to determine whether the relative distance between the target vehicle 1 and the preceding vehicle 2 satisfies the braking distance at the current time of the target vehicle 1. When the relative distance between the target vehicle 1 and the front vehicle 2 is not greater than the braking distance of the target vehicle 1, it indicates that the target vehicle 1 may collide with the front vehicle 2 if an accident occurs at the current moment, and therefore, the target vehicle 1 may send out warning information to remind the driver of the vehicle speed and the distance to the front vehicle 2.
The vehicle early warning method provided by the embodiment of the application collects the image information of the driver, identifies the driving state of the driver according to the image information, and obtains the corresponding braking distance according to the current driving state of the driver, so that the braking distance of the target vehicle 1 can be obtained in real time according to the current state of the driver under different conditions, and the braking distance of the target vehicle 1 is more accurate.
When a vehicle exists in front of the target vehicle 1, the relative distance between the target vehicle 1 and the front vehicle 2 is calculated, so that the braking distance of the target vehicle 1 and the relative distance between the two vehicles can be compared, when the relative distance between the two vehicles is not greater than the braking distance of the target vehicle 1, namely, an emergency situation is supposed to occur at the current moment, potential safety hazards exist between the two vehicles, and warning information can be sent at the moment to remind a driver. Therefore, the occupation of resources can be reduced by acquiring the image information in real time to judge the safety of the target vehicle 1, and the timeliness of alarm information can be ensured, so that accurate early warning information can be provided for a driver in real time.
Referring to fig. 3, some embodiments of the present application further provide a vehicle warning method, which may include:
in step S301, image information of the road ahead of the target vehicle 1 is acquired.
Taking the implementation environment shown in fig. 1 as an example, in order to improve accurate detection of the target vehicle 1 on other vehicles on the road ahead, before the target vehicle 1 determines whether there are other vehicles on the front vehicle 2, the grayscale camera 101 on the target vehicle 1 may collect a large number of vehicle positive samples and vehicle negative samples in different driving scenes, where a positive sample may be an image sample of a vehicle on the road ahead of the target vehicle 1 in different scenes, and a negative sample may be an image sample of no vehicle on the road ahead of the target vehicle 1 in a corresponding scene.
Step S302, a first cascade classifier is used for detecting whether vehicles exist in the collected image information, wherein the first cascade classifier is obtained by training road image samples under different conditions, and the road image sample plate can comprise image samples of vehicles in front of the target vehicle 1 under different scenes and image samples of vehicles not in front of the target vehicle 1 under corresponding scenes.
The vehicle-mounted terminal 106 detects, identifies and classifies a large number of vehicle image positive samples and vehicle image negative samples in different scenes by adopting an adaboost machine learning algorithm, and trains a first cascade classifier capable of detecting vehicles on the front road in different scenes, so that the accuracy of judging whether vehicles exist on the front road or not by the vehicle-mounted terminal 106 in different scenes is improved. The vehicle image positive sample refers to an image sample of a vehicle in front of the target vehicle 1, and the vehicle image negative sample refers to an image sample of a vehicle in front of the target vehicle 1.
Different scenes may include different time periods and different conditions, for example, different time periods may include day, night, different conditions may include sunny, rainy, cloudy, snowy, and so on. Therefore, under different scenes, the vehicle-mounted terminal 106 of the target vehicle 1 can accurately detect whether a vehicle exists on the road ahead.
Taking the implementation environment shown in fig. 1 as an example, a grayscale camera 101 may be installed on a front hood of the target vehicle 1, and the grayscale camera 101 has better imaging quality and can clearly display details of an image. Therefore, the grayscale camera 101 can acquire an image of the road in front of the target vehicle 1 in real time and send the image to the vehicle-mounted terminal 106, and the first cascade classifier of the vehicle-mounted terminal 106 can detect and analyze the received image and determine whether a vehicle exists in the image.
In step S303, when there is a vehicle in front of the target vehicle 1, the relative distance between the target vehicle 1 and the preceding vehicle 2 is determined.
For example, if the first cascade classifier of the in-vehicle terminal 106 determines that there is another vehicle by performing detection analysis on the road image in front of the target vehicle 1, the in-vehicle terminal 106 may determine the relative distance between the target vehicle 1 and the preceding vehicle 2 again.
Specifically, referring to fig. 4, this step S303 may include:
step S3031, obtaining the position information of the target vehicle 1 and the front vehicle 2, wherein the position information may include latitude and longitude information.
For example, in one implementation environment shown in fig. 1, the target vehicle 1 may be installed with a positioning module 105, and the positioning module 105 may position the longitude value and the latitude value of the target vehicle 1 in real time to determine the position information of the target vehicle 1.
Moreover, in order to reduce the potential safety hazard between vehicles, a special short-range communication module 103 is mostly installed on the vehicles, and the special short-range communication module 103 can acquire longitude and latitude information and driving speed of the vehicles around the target vehicle 1.
The target vehicle 1 can perform inter-vehicle information communication interaction according to the short-range communication module 203 of the preceding vehicle, so that the position information and the speed information of the belonging vehicle, which are acquired by the positioning module 203 of the preceding vehicle 2, can be obtained. Moreover, information exchange and interaction can be performed among the short-range communication modules, for example, when other vehicles are traveling in multiple directions such as the front, the side front and the like of the target vehicle 1 or multiple vehicles travel in the same direction, the dedicated short-range communication module 103 on the target vehicle 1 can also acquire the position information and the vehicle speed information of all other vehicles.
Taking the implementation environment shown in fig. 1 as an example, when only one other vehicle is traveling in front of the target vehicle 1, the latitude and longitude information of the target vehicle 1 may be (latA, lonA) and the latitude and longitude information of the front vehicle 2 may be (latB, lonB), where lat represents latitude and lon represents longitude.
Step S3032, the direction of the position information data is adjusted.
For example, in an implementation manner of the embodiment of the present application, the latitude includes north latitude and south latitude, and the longitude includes east longitude and west longitude, and due to a relationship of regions, different positions may have the same value, and in order to avoid that the difference of the regions affects the calculation of the vehicle-mounted terminal 106 provided with the warning method, a set of direction adjustment rules may be set in the vehicle-mounted terminal 106, so that the latitude and longitude information values in different regions are directionally distinguished by positive and negative values.
For example, the position value in the east longitude direction may be a positive value and the position value in the north latitude direction may be a 90-latitude value according to the included range of the longitude and latitude in the geographical location of our country, so that the longitude and latitude values of the destination vehicle 1 and the front vehicle 2 after the direction arrangement may be (mlat, MlonA) and (mlat, MlonB), respectively.
Of course, the adjustment of the longitude and latitude directions in the present application is not limited to the above-mentioned taking the positive value in the east longitude direction and the 90-latitude value in the north latitude, and in other implementation manners of the embodiment of the present application, the positive value in the west longitude direction or the 90-latitude value in the south latitude may also be taken. In addition, the present application is not limited to the above-described east longitude and north latitude as to the combination of the direction adjustment, and the east longitude and south latitude may be combined or may be combined in another implementation manner in the embodiment of the present application.
In step S3033, the relative distance between the target vehicle 1 and the preceding vehicle 2 may be calculated according to the following first formula:
wherein,
C=sin(MlatA)*sin(MlatB)*cos(MlonA-MlonB)+cos(MlatA)*cos(MlatB);
r represents the average radius of the earth, and takes 6371.004 km;
mlat a represents the latitude value of the target vehicle 1 after the direction adjustment;
mlat b represents the latitude value of the preceding vehicle 2 after the direction adjustment;
MlonA represents a longitude value of the target vehicle 1 after direction adjustment;
MlonB represents a longitude value of the preceding vehicle 2 after the direction adjustment;
D1representing the relative distance between the target vehicle 1 and the preceding vehicle 2.
For example, in one implementation of the embodiments of the present application, the first formula may be D1R · arccos (sin (mlat) · sin (mlat) -mlab) + cos (mlat) -cos (mlat) · pi/180. To avoid the overlong first formula, sin (mlata) sin (mlatb) cos (MlonA-MlonB) + cos (mlata) cos (mlat b) may be used as a transition value C. Firstly, a transition value C is obtained through calculation according to longitude and latitude information of the target vehicle 1 and the front vehicle 2, and then the relative distance between the target vehicle 1 and the front vehicle 2 can be obtained through calculation according to the transition value C, the earth radius R, a constant pi and a first formula.
Of course, the present application is not limited to the above-mentioned longitude and latitude information as to the position information of the target vehicle 1 and the preceding vehicle 2, and is not limited to the relative distance between the two vehicles obtained by the above-mentioned first formula. In other implementation manners of the embodiment of the application, the relative distance between the two vehicles can also be obtained by obtaining position information of the two vehicles in other manners and other reasonable formulas or manners.
And step S304, detecting the acquired image information of the driver by using a second cascade classifier, analyzing and identifying the driving state of the driver, and acquiring the reaction time in different driving states.
The second cascade classifier is obtained by training image samples of a driver in different driving states, and the driving states of the driver can comprise a waking state, a slight fatigue state, a moderate fatigue state and a severe fatigue state.
Taking the implementation environment shown in fig. 1 as an example, the vehicle-mounted terminal 106 may first acquire a large number of face sample images of the driver in different driving states through the infrared camera 102 in the target vehicle 1, detect the face sample images of the driver in different driving states by using an adaboost machine learning algorithm, analyze and recognize the driving state corresponding to the sample images, and train a second cascade classifier that can detect and analyze the current driving state according to the face image of the driver, thereby improving the accuracy of the determination of the vehicle-mounted terminal 106 on the driving state of the driver.
And the reaction time of the driver in different driving states is different, so that the obtained reaction time of the driver at the current moment is more accurate.
Specifically, referring to fig. 5, the step S304 may include:
in step S3041, the face image information of the driver is acquired.
In step S3042, the expression of the driver in the image may be recognized.
Step S3043 determines whether the driver is in a fatigue state. If the determination result is yes, the process proceeds to step S3044. If the determination result is negative, the process proceeds to step S3047.
Step S3044, determines whether the driver is in a light fatigue state. If the determination result is yes, the process proceeds to step S3047. If the determination result is negative, the process proceeds to step S3045.
Step S3045 determines whether the driver is in a moderate fatigue state. If the determination result is yes, the process proceeds to step S3047. If the determination result is negative, the process proceeds to step S3046.
Step S3046, it is determined whether the driver is in a severe fatigue state.
Step S3047, a corresponding reaction time is obtained according to the different driving states of the driver.
After the facial image information of the driver is collected, the second cascade classifier can analyze the current driving state of the driver. For example, the in-vehicle terminal 106 may store a corresponding relationship between different driving states and reaction times, and when the driving state of the driver at the current time is identified, the in-vehicle terminal 106 may directly obtain the reaction time corresponding to the current driving state of the driver according to the corresponding relationship.
In step S305, the braking distance of the emergency braking of the target vehicle 1 at the present time is obtained according to the reaction time of the driver and the state information of the target vehicle 1.
Specifically, referring to fig. 6, in an implementation manner of the embodiment of the present application, the step S305 may include:
step S3051, obtaining speeds of the target vehicle 1 and the preceding vehicle 2, and calculating a relative speed between the target vehicle 1 and the preceding vehicle 2 according to a second formula as follows:
ΔV=V1-V2
wherein,
av represents the relative speed between the target vehicle 1 and the preceding vehicle 2,
V1represents the traveling speed of the target vehicle 1,
V2represents the traveling speed of the preceding vehicle 2.
Step S3052, obtaining a corresponding reaction time according to the driving state of the driver, and calculating a braking distance of the target vehicle 1 according to a third formula as follows:
wherein,
D2indicates the braking distance of the target vehicle 1,
tirepresenting the corresponding reaction time of the driver in different driving states,
t0representing the reaction time corresponding to the driver in the waking state,
t1indicating the corresponding reaction time of the driver in a slight fatigue state,
t2indicating the reaction time corresponding to the driver in a moderate fatigue state,
t3representing the corresponding reaction time of the driver in a severe fatigue state,
a represents the maximum braking deceleration of the target vehicle 1.
The braking distance of the vehicle is related to the reaction time of the driver, the maximum braking deceleration of the vehicle, and the vehicle speed of the vehicle, and when there is another vehicle in front of the target vehicle 1, the braking distance of the target vehicle 1 may be related to the relative vehicle speed between the two vehicles.
And step S306, when the relative distance between the target vehicle 1 and the front vehicle 2 is not more than the braking distance of the target vehicle 1, sending out warning information.
In one implementation of the embodiment of the present application, the braking distance of the target vehicle 1 is different according to the driving state of the driver, so in order to enhance the reminding effect of the method to the driver, the intensity of the warning information sent by the system in the method can be enhanced according to the enhancement of the fatigue degree of the driver.
For example, in an implementation environment shown in fig. 1, the target vehicle 1 may be provided with an audible alarm 104, and when the in-vehicle terminal 106 analyzes the fatigue state of the driver, the audible alarm 104 may emit an alarm sound of 300Hz when the driver is awake. The warning sound of the audible alarm 104 may be greater than 300Hz when the driver is in a tired state. And as the driver's fatigue level increases, the driver's sensory response to the outside world also becomes gradually weaker, so the audible alarm 104 may be designed such that the alarm sound intensity increases gradually as the driver's fatigue level increases.
Taking the implementation environment shown in fig. 1 as an example, the vehicle early warning method provided by this embodiment can acquire road image information in front of the target vehicle 1 in real time and determine whether there are other vehicles, and when there are other vehicles in front of the target vehicle 1, the position information and the traveling speed of the target vehicle 1 and the front vehicle 2 are acquired through the positioning module 105 and the short-range communication module 103, so that the relative distance between the two vehicles can be quickly and accurately obtained. Therefore, according to the image information of the road in front of the target vehicle 1 and the position and speed information of the vehicle 2 in front which are acquired in real time, the space occupied by the algorithm of the vehicle-mounted terminal 106 of the target vehicle 1 can be reduced, and the timeliness and the accuracy of the relative distance between the two vehicles can be ensured by acquiring the image information of the road in front of the target vehicle 1 and the position and speed information of the vehicle 2 in front in real time.
Meanwhile, the camera in the target vehicle 1 can acquire the facial image information of the driver in real time and recognize and analyze the current driving state of the driver, so that the braking distance of the target vehicle 1 at the current moment can be obtained according to the reaction time corresponding to the driving state, the speed difference between the two vehicles and the state information of the target vehicle 1. Therefore, the braking distance obtained according to the driving state of the driver can reduce the occupied space of the algorithm and improve the accuracy of the braking distance.
And then judging whether the relative distance between the two vehicles is greater than the braking distance of the target vehicle 1 or not to know whether the target vehicle 1 is safe at the current moment or not, thereby judging whether warning information needs to be sent or not. Thus, the warning information is determined according to the driving state of the driver at the current time and the driving speed of the target vehicle 1, and if a sudden situation occurs at the current time and the braking distance corresponding to the current driving state of the driver is greater than the relative distance between the two vehicles, the alarm 104 may send the warning information, so that the driver may decrease the driving speed of the target vehicle 1 to increase the relative distance between the two vehicles.
Some embodiments of the present application provide a vehicle early warning system, see fig. 7, including:
a relative distance calculation module 710 configured to determine a relative distance between the target vehicle 1 and the preceding vehicle 2 when there is a vehicle in front of the target vehicle 1;
a state recognition module 720 configured to recognize a driving state of the driver from the image information of the driver;
the braking distance obtaining module 730 is configured to obtain the braking distance of the emergency braking of the target vehicle 1 at the current moment according to the driving state of the driver and the state information of the target vehicle 1;
and the alarm module 740 is configured to send out alarm information when the relative distance between the target vehicle 1 and the front vehicle 2 is not greater than the braking distance of the target vehicle 1.
Referring to fig. 8, some embodiments of the present application further provide a vehicle early warning system, which may include:
an image acquisition module 810 configured to acquire image information of a road ahead of the target vehicle 1.
And a first cascade classifier 820 configured to detect whether a vehicle exists in the acquired image information, wherein the first cascade classifier 820 is obtained by training road image samples under different conditions, and the road image samples include image samples of vehicles in front of the target vehicle 1 in different scenes and image samples of vehicles in front of the target vehicle 1 in corresponding scenes.
A relative distance calculation module 830 configured to determine a relative distance between the target vehicle 1 and the preceding vehicle 2 when there is a vehicle in front of the target vehicle 1.
A second cascade classifier 840 configured to detect the collected image information of the driver and analyze and recognize the driving state of the driver before recognizing the driving state of the driver;
the second cascade classifier 840 is obtained by training image samples of a driver in different driving states, wherein the driving states of the driver include a wakeful state, a slight fatigue state, a moderate fatigue state and a severe fatigue state.
A braking distance obtaining module 850 configured to obtain a braking distance of emergency braking of the target vehicle 1 at the current time according to the driving state of the driver and the state information of the target vehicle 1;
an alarm module 860 configured to issue a warning message when a relative distance between the target vehicle 1 and the preceding vehicle 2 is not greater than a braking distance of the target vehicle 1.
Wherein, referring to fig. 9, the relative distance calculating 830 module may include:
a position acquisition unit 831 configured to acquire position information of the target vehicle 1 and the preceding vehicle 2, wherein the position information includes latitude and longitude information;
a direction adjustment unit 832 configured to perform direction adjustment on the position information data;
a relative distance calculation unit 833 configured to calculate a relative distance between the target vehicle 1 and the preceding vehicle 2 according to the following first formula;
wherein,
C=sin(MlatA)*sin(MlatB)*cos(MlonA-MlonB)+cos(MlatA)*cos(MlatB);
r represents the average radius of the earth, and takes 6371.004 km;
mlat a represents the latitude value of the target vehicle 1 after the direction adjustment;
mlat b represents the latitude value of the front vehicle 2 after the direction adjustment;
MlonA represents the longitude value of the target vehicle 1 after the direction adjustment;
MlonB represents the longitude value of the preceding vehicle 2 after the direction adjustment;
D1indicating the relative distance between the target vehicle 1 and the preceding vehicle 2.
Referring to fig. 10, the braking distance acquisition module 850 may include:
a relative speed calculation unit 851 configured to acquire the speeds of the target vehicle 1 and the preceding vehicle 2, and calculate the relative speed between the target vehicle 1 and the preceding vehicle 2 according to the following second formula:
ΔV=V1-V2
wherein,
av represents the relative speed between the target vehicle 1 and the preceding vehicle 2,
V1indicates the traveling speed of the target vehicle 1,
V2represents the traveling speed of the preceding vehicle 2;
a braking distance calculation unit 852 configured to acquire a corresponding reaction time according to the driving state of the driver, and calculate a braking distance of the target vehicle 1 according to the following second formula:
wherein,
D2represents the braking distance of the target vehicle 1;
tirepresenting the corresponding reaction time of the driver in different driving states;
t0representing the reaction time corresponding to the driver in the waking state;
t1representing the corresponding reaction time of the driver in a slight fatigue state;
t2representing the corresponding reaction time of the driver in the moderate fatigue state;
t3representing the corresponding reaction time of the driver in a severe fatigue state;
a represents the maximum braking deceleration of the target vehicle 1.
Some embodiments of the present application also provide a vehicle warning system that may include a processor and a memory for storing processor executable commands. Wherein the processor may be configured to:
determining a relative distance between the target vehicle 1 and the preceding vehicle 2 when there is a vehicle in front of the target vehicle 1;
recognizing a driving state of the driver from the image information of the driver of the target vehicle 1;
obtaining the braking distance of the emergency braking of the target vehicle 1 at the current moment according to the driving state of the driver and the state information of the target vehicle 1;
and when the relative distance between the target vehicle 1 and the front vehicle 2 is not more than the braking distance of the target vehicle 1, warning information is sent out.
The vehicle early warning system provided by the embodiment of the application corresponds to the vehicle early warning method provided by the embodiment of the application, and the modules for executing the functions can find corresponding steps in the embodiment.
Those skilled in the art will appreciate that all or part of the steps and modules for implementing the above embodiments may be implemented by hardware, or may be implemented by relevant hardware instructed by programs. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.