Collision warning method, device, storage medium and apparatus
By acquiring camera parameter information from vehicles to establish a distance measurement coordinate system, and using image information to calculate vehicle distance and issue warnings, the problem of insufficient computing power of embedded devices is solved, and the efficiency and accuracy of collision warning are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING 360 INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2020-10-22
- Publication Date
- 2026-04-17
AI Technical Summary
The insufficient computing power of existing embedded devices results in low collision warning efficiency and fails to effectively improve driving safety.
By acquiring parameter information from a preset camera installed on the current vehicle, a ranging coordinate system is established. The image coordinates of the target vehicle are calculated using the image information collected by the camera, thereby determining the distance to the target vehicle and issuing a warning when the warning threshold is reached.
It improves the efficiency of collision warning, enhances the computing power of embedded devices, and achieves more accurate collision warning.
Smart Images

Figure CN114463708B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of driver assistance technology, and in particular to collision warning methods, devices, storage media and apparatus. Background Technology
[0002] Collision warning technology is a type of advanced driver assistance system (ADAS) that uses sensors to determine the distance and relative speed between the vehicle and the vehicle in front, warning the driver when a potential collision risk is detected. Therefore, collision warning systems can effectively improve driving safety, reduce traffic accidents, and minimize economic losses.
[0003] However, current collision warnings are achieved by collecting video data through embedded devices. Due to the limited computing power of embedded devices, they cannot meet the requirements for efficient collision prediction. Summary of the Invention
[0004] The main objective of this invention is to provide a collision warning method, device, storage medium, and apparatus, aiming to solve the problem of how to improve the efficiency of collision warning.
[0005] To achieve the above objectives, the present invention provides a collision warning method, the collision warning method comprising the following steps:
[0006] Obtain parameter information from the preset camera installed on the current vehicle;
[0007] Establish a ranging coordinate system based on the parameter information of the preset camera;
[0008] Acquire image information of the target vehicle captured by the preset camera, and obtain the target image coordinates of the preset reference point of the target vehicle in the ranging coordinate system based on the image information;
[0009] The distance between the target vehicle and the target image coordinates is obtained.
[0010] When the distance reaches the warning threshold, a warning will be issued.
[0011] Optionally, establishing a ranging coordinate system based on the parameter information of the preset camera includes:
[0012] Obtain the optical center position of the preset camera;
[0013] The optical center position of the camera is taken as the origin of the coordinate axis, the horizontal direction of the world coordinate system is taken as the horizontal coordinate axis z-axis, and the direction perpendicular to the horizontal coordinate axis z-axis downward is taken as the vertical direction y-axis;
[0014] Establish a distance measurement coordinate system based on the origin of the coordinate axes, the horizontal z-axis, and the vertical y-axis.
[0015] Optionally, the preset reference point includes a reference point where the target vehicle is located at the bottom;
[0016] The step of acquiring image information of the target vehicle captured by the preset camera, and obtaining the target image coordinates of the preset reference point of the target vehicle in the ranging coordinate system based on the image information, includes:
[0017] Obtain image information of the target vehicle captured by the preset camera, and obtain the bottom coordinates of the reference point of the target vehicle located at the bottom in the ranging coordinate system based on the image information;
[0018] Obtain the pitch angle of the preset camera;
[0019] Based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix, the image coordinates of the bottom reference point of the target vehicle in the ranging coordinate system are obtained.
[0020] The target image coordinates are obtained based on the image coordinates of the bottom reference point.
[0021] Optionally, before obtaining the image coordinates of the reference point at the bottom of the target vehicle in the ranging coordinate system based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix, the method further includes:
[0022] Obtain the preset camera focal length, first principal point offset, and second principal point offset from the parameter information of the preset camera;
[0023] The preset camera intrinsic parameter matrix is obtained based on the preset camera focal length, the first principal point offset, and the second principal point offset.
[0024] Optionally, before obtaining the target image coordinates based on the image coordinates of the bottom reference point, the method further includes:
[0025] The image coordinates of the bottom reference point are normalized to obtain the normalized image coordinates;
[0026] The target image coordinates are obtained based on the normalized image coordinates.
[0027] Optionally, obtaining the target image coordinates based on the normalized image coordinates includes:
[0028] The top coordinates of the reference point where the target vehicle is located at the top are obtained in the ranging coordinate system based on the bottom coordinates.
[0029] Based on the normalized image coordinates and the top coordinates, the image coordinates of the top reference point of the target vehicle in the ranging coordinate system are obtained.
[0030] The target image coordinates are obtained based on the image coordinates of the top reference point.
[0031] Optionally, obtaining the distance between the target vehicle and the target image coordinates includes:
[0032] Obtain the pitch angle of the preset camera;
[0033] Determine whether the pitch angle of the preset camera is less than the pitch angle threshold;
[0034] When the pitch angle of the preset camera is less than the pitch angle threshold, the pitch angle of the preset camera is set to the preset pitch angle value;
[0035] Substituting the preset pitch angle value into the target image coordinates, the corresponding relationship between the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, the horizontal coordinate of the target vehicle image in the ranging coordinate system, and the preset camera focal length is obtained.
[0036] The distance to the target vehicle is obtained based on the correspondence.
[0037] Optionally, obtaining the distance to the target vehicle based on the correspondence includes:
[0038] The detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, and the preset camera focal length are obtained.
[0039] The horizontal coordinates of the target vehicle image in the ranging coordinate system are obtained based on the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, the preset camera focal length, and the corresponding relationship.
[0040] The distance between the target vehicle and the target vehicle is obtained based on the horizontal coordinates of the target vehicle image in the ranging coordinate system.
[0041] Optionally, the step of issuing a warning when the distance reaches the warning threshold includes:
[0042] When the distance reaches the warning threshold, vehicle information collected by a preset sensor is acquired;
[0043] When the vehicle information collected by the preset sensor meets the preset alarm conditions, a warning is issued.
[0044] Optionally, when the distance reaches the warning threshold, the current lane is obtained based on the lane line detection algorithm;
[0045] Determine whether the target vehicle belongs to the current lane.
[0046] When the target vehicle is within the current lane, vehicle information collected by preset sensors is acquired.
[0047] Optionally, when the distance reaches the warning threshold, obtaining the current lane based on the lane line detection algorithm includes:
[0048] When the distance reaches the warning threshold, select any number of reference points from the current location coordinates;
[0049] The current lane line is obtained based on any number of reference points;
[0050] The current lane is obtained based on the current lane line.
[0051] Optionally, the step of issuing a warning when the vehicle information collected by the preset sensor meets the preset alarm conditions includes:
[0052] Obtain the current vehicle speed, relative speed with the target vehicle, and absolute speed with the target vehicle from the vehicle information;
[0053] When the current vehicle speed is greater than a preset speed threshold, the relative collision time is obtained based on the relative speed with the target vehicle;
[0054] When the relative collision time is less than a preset time threshold, the absolute collision time is obtained based on the absolute speed with the target vehicle.
[0055] An early warning will be issued when the absolute collision time is less than a preset time threshold.
[0056] Optionally, before acquiring the image information of the target vehicle captured by the preset camera, the following steps are included:
[0057] Acquire the current driving image captured by the preset camera;
[0058] The current driving image is image recognized by a preset convolutional neural network model to obtain the image recognition result of the target vehicle. The preset convolutional neural network model includes a first stage for image feature extraction and a second stage for image category prediction. The first stage includes a convolutional layer with downsampling.
[0059] Based on the image recognition results, determine whether the target vehicle is the object to be tracked;
[0060] When the target vehicle is the object of tracking, the target vehicle is tracked to obtain image information of the target vehicle.
[0061] Furthermore, to achieve the above objectives, the present invention also proposes a collision warning device, the collision warning device comprising:
[0062] The acquisition module is used to acquire parameter information of a preset camera installed on the current vehicle;
[0063] A module is established to create a ranging coordinate system based on the parameter information of the preset camera.
[0064] The acquisition module is also used to acquire image information of the target vehicle captured by the preset camera, and to obtain the target image coordinates of the preset reference point of the target vehicle in the ranging coordinate system based on the image information;
[0065] The acquisition module is further configured to obtain the distance between itself and the target vehicle based on the target image coordinates;
[0066] The alert module is used to issue an alert when the distance reaches the warning threshold.
[0067] Optionally, the establishment module is further configured to obtain the optical center position of the preset camera;
[0068] The optical center position of the camera is taken as the origin of the coordinate axis, the horizontal direction of the world coordinate system is taken as the horizontal coordinate axis z-axis, and the direction perpendicular to the horizontal coordinate axis z-axis downward is taken as the vertical direction y-axis;
[0069] Establish a distance measurement coordinate system based on the origin of the coordinate axes, the horizontal z-axis, and the vertical y-axis.
[0070] Optionally, the preset reference point includes a reference point where the target vehicle is located at the bottom;
[0071] The acquisition module is also used to acquire image information of the target vehicle captured by the preset camera, and to obtain the bottom coordinates of the reference point of the target vehicle located at the bottom in the ranging coordinate system based on the image information;
[0072] Obtain the pitch angle of the preset camera;
[0073] Based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix, the image coordinates of the bottom reference point of the target vehicle in the ranging coordinate system are obtained.
[0074] The target image coordinates are obtained based on the image coordinates of the bottom reference point.
[0075] Optionally, the acquisition module is further configured to acquire the preset camera focal length, first principal point offset, and second principal point offset from the parameter information of the preset camera;
[0076] The preset camera intrinsic parameter matrix is obtained based on the preset camera focal length, the first principal point offset, and the second principal point offset.
[0077] Optionally, the acquisition module is further configured to normalize the image coordinates of the bottom reference point to obtain normalized image coordinates;
[0078] The target image coordinates are obtained based on the normalized image coordinates.
[0079] Furthermore, to achieve the above objectives, the present invention also proposes a collision warning device, which includes: a memory, a processor, and a collision warning program stored in the memory and running on the processor. When the collision warning program is executed by the processor, it implements the steps of the collision warning method described above.
[0080] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a collision warning program, which, when executed by a processor, implements the steps of the collision warning method as described above.
[0081] The technical solution provided by this invention involves: acquiring parameter information from a preset camera installed on a current vehicle; establishing a ranging coordinate system based on the parameter information of the preset camera; acquiring image information of the target vehicle captured by the preset camera; obtaining the target image coordinates of a preset reference point of the target vehicle in the ranging coordinate system based on the image information; obtaining the distance between the target vehicle and the target vehicle based on the target image coordinates; and issuing a warning when the distance reaches a warning threshold. This allows for the direct calculation and processing of the acquired image information of the target vehicle to determine the distance to the target vehicle, thereby improving the efficiency of collision warning while enhancing the computing power of embedded devices. Attached Figure Description
[0082] Figure 1 This is a schematic diagram of the collision warning device structure in the hardware operating environment involved in the embodiments of the present invention;
[0083] Figure 2 This is a flowchart illustrating the first embodiment of the collision warning method of the present invention;
[0084] Figure 3 This is a schematic diagram of the coordinate system setting for a monocular ranging algorithm according to an embodiment of the collision warning method of the present invention.
[0085] Figure 4This is a schematic diagram of the overall process of an embodiment of the collision warning method of the present invention;
[0086] Figure 5 This is a flowchart illustrating the second embodiment of the collision warning method of the present invention;
[0087] Figure 6 This is a flowchart illustrating the third embodiment of the collision warning method of the present invention;
[0088] Figure 7 This is a schematic diagram of the collision warning logic of an embodiment of the collision warning method of the present invention;
[0089] Figure 8 This is a structural block diagram of the first embodiment of the collision warning device of the present invention.
[0090] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0091] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0092] Reference Figure 1 , Figure 1 This is a schematic diagram of the collision warning device structure in the hardware operating environment involved in the embodiment of the present invention.
[0093] like Figure 1 As shown, the collision warning device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, and optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. In this invention, the wired interface of the user interface 1003 may be a Universal Serial Bus (USB) interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed random access memory (RAM); it may also be stable memory, such as non-volatile memory, specifically a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0094] Those skilled in the art will understand that Figure 1The structure shown does not constitute a limitation on the collision warning device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0095] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a collision warning program.
[0096] exist Figure 1 In the collision warning device shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to peripherals; the collision warning device calls the collision warning program stored in the memory 1005 through the processor 1001 and executes the collision warning method provided in the embodiment of the present invention.
[0097] Based on the above hardware structure, an embodiment of the collision warning method of the present invention is proposed.
[0098] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the collision warning method of the present invention.
[0099] In a first embodiment, the collision warning method includes the following steps:
[0100] Step S10: Obtain parameter information of the preset camera installed on the current vehicle.
[0101] It should be noted that the executing entity in this embodiment can be a dashcam, such as a camera installed on a vehicle, or other devices that can achieve the same or similar functions. This embodiment does not limit this; in this embodiment, a dashcam is used as an example for illustration.
[0102] In this embodiment, the preset camera's parameter information includes the camera's optical center position, focal length, and principal point offset, and may also include other parameter information. This embodiment does not limit this. The preset camera may be a camera on a dashcam installed on the current vehicle, or it may be a camera set in other ways. This embodiment does not limit this.
[0103] In practical implementation, when installing a camera on a dashcam, the camera's parameter configuration information can be obtained by calling a parameter acquisition command and stored in a preset storage area. The camera's parameter information can then be retrieved by querying the parameter configuration information stored in the preset storage area.
[0104] Step S20: Establish a ranging coordinate system based on the parameter information of the preset camera.
[0105] In this embodiment, the ranging coordinate system includes the world coordinate system, but other forms of coordinate systems are also possible. This embodiment does not limit this. In this embodiment, the world coordinate system is used as an example. The world coordinate system includes a horizontal z-axis and a y-axis that is perpendicular to the z-axis and pointing downwards. The optical center of the camera is taken as the origin. The world coordinate system is constructed based on the optical center, the horizontal z-axis, and the y-axis that is perpendicular to the z-axis and pointing downwards. When the coordinates of the current vehicle and the target vehicle are obtained based on the world coordinate system, the distance between the two vehicles can be obtained based on the z-axis coordinate. For example, the coordinates of the target vehicle are [x, h, z]. Since the ranging coordinate system takes the optical center of the camera on the dashcam of the current vehicle as the origin, the distance between the current vehicle and the target vehicle can be obtained by obtaining the z-coordinate of the target vehicle.
[0106] Step S30: Obtain image information of the target vehicle captured by the preset camera, and obtain the target image coordinates of the preset reference point of the target vehicle in the ranging coordinate system based on the image information.
[0107] In this embodiment, the preset reference point may include a reference point at the bottom of the target vehicle and a reference point at the top of the target vehicle, and may also include other reference points. This embodiment does not limit this. The image information of the target vehicle collected may be the image information of the target vehicle mapped in the camera. The target image coordinates of the preset reference point of the target vehicle in the ranging coordinate system are obtained by the image information mapped in the camera, that is, the image coordinates of the target vehicle mapped in the camera. Thus, the distance between the current vehicle and the target vehicle can be obtained according to the monocular ranging algorithm based on perspective change.
[0108] like Figure 3 The diagram illustrates the coordinate system setup for the monocular ranging algorithm. A world coordinate system and a camera coordinate system are established using the optical center of the camera. The camera's optical center serves as the origin of the coordinate axes. The z-axis of the world coordinate system points horizontally forward, and the y-axis points vertically downward. Considering that the camera angle may not be perfectly horizontal, a pitch angle α is introduced between the camera coordinate system and the world coordinate system. This makes the image coordinates of the target vehicle closer to its actual coordinates, thereby improving the accuracy of coordinate determination.
[0109] Step S40: Obtain the distance between the target vehicle and the target image coordinates.
[0110] In practical implementation, the target vehicle's coordinates [x, h, z] are obtained from its image coordinates, and the distance z between the current vehicle and the target vehicle can be obtained. Thus, the distance between the current vehicle and the target vehicle can be obtained from the target vehicle's image coordinates. By enhancing the on-chip computing capabilities of the dashcam, the distance between the two can be obtained, thereby improving the efficiency of collision warning.
[0111] Step S50: When the distance reaches the warning threshold, a warning is issued.
[0112] In this embodiment, the warning threshold can be 5m, or it can be other distance parameters. This embodiment does not limit this. Taking the warning threshold as 5m as an example, if the distance between the current vehicle and the target vehicle is 10m, the warning threshold has not yet been reached. In this case, no warning is issued. When the distance between the current vehicle and the target vehicle is 5m, the warning threshold is reached, and a warning is issued.
[0113] In practice, the alarm frequency can be adjusted based on whether the current distance exceeds the warning threshold. The greater the distance exceeds the threshold, the higher the alarm frequency, thus achieving a more intelligent collision warning.
[0114] In one embodiment, before acquiring the image information of the target vehicle captured by the preset camera, the following steps are included:
[0115] The system acquires the current driving image captured by the preset camera; performs image recognition on the current driving image using a preset convolutional neural network model to obtain the image recognition result of the target vehicle. The preset convolutional neural network model includes a first stage for image feature extraction and a second stage for image category prediction. The first stage includes a convolutional layer with downsampling. The system determines whether the target vehicle is a tracking object based on the image recognition result. If the target vehicle is a tracking object, the system tracks the target vehicle to obtain image information of the target vehicle.
[0116] In this embodiment, the preset convolutional neural network model can be a pre-constructed simplified convolutional neural network. A simplified neural network is a neural network obtained by simplifying the network model structure while maintaining the original performance. In this embodiment, the preset convolutional neural network model is a simplified neural network consisting of a first stage and a second stage. To ensure the accuracy of the simplified neural network, the first stage also includes a convolutional layer with downsampling. This embodiment places the downsampling operation, which would normally be performed by a pooling layer, into a convolutional layer, and then uses only one average pooling layer in the second stage for pooling operations, enabling the simplified neural network to have higher accuracy.
[0117] like Figure 4The overall process diagram illustrates how a simplified convolutional neural network is used to detect and track vehicles. Distance is measured from the acquired image information of the target vehicle to determine the distance between the current vehicle and the target vehicle. The current vehicle's driving information is collected, including vehicle acceleration from an inertial measurement unit (IMU) and vehicle speed from GPS. Based on the distance between the current vehicle and the target vehicle, vehicle acceleration, and vehicle speed from GPS, a collision warning logic is used to determine a collision. Collision warnings are then issued via the control panel and audible alarm, thus implementing a multi-sensor collision warning algorithm to improve the accuracy of collision warnings.
[0118] In this embodiment, parameter information from a preset camera installed on the current vehicle is acquired; a ranging coordinate system is established based on the parameter information of the preset camera; image information of the target vehicle captured by the preset camera is acquired; target image coordinates of a preset reference point of the target vehicle in the ranging coordinate system are obtained based on the image information; the distance between the target vehicle and the target vehicle is obtained based on the target image coordinates; and a warning is issued when the distance reaches a warning threshold. Thus, the distance between the target vehicle and the target vehicle can be directly obtained through analysis and processing of the acquired image information, improving the efficiency of collision warning while enhancing the computing power of the embedded device.
[0119] Reference Figure 5 , Figure 5 This is a flowchart illustrating the second embodiment of the collision warning method of the present invention, based on the above. Figure 2 The first embodiment shown presents a second embodiment of the collision warning method of the present invention.
[0120] In the second embodiment, step S20 includes:
[0121] Step S201: Obtain the optical center position of the preset camera.
[0122] Continue as Figure 3 As shown, the optical center position of the camera is obtained, and the optical center position of the camera is used as the origin of the coordinate axis. Thus, the coordinates of the target vehicle are obtained with the current vehicle as the reference position, so that the coordinates of the target vehicle can be converted into the distance between the current vehicle and the target vehicle.
[0123] Step S202: Take the optical center position of the camera as the origin of the coordinate axis, take the horizontal direction of the world coordinate system as the horizontal coordinate axis z-axis, and take the direction perpendicular to the z-axis as the vertical direction y-axis.
[0124] It should be noted that coordinate axes can be established using the origin and the horizontal and vertical directions. Therefore, the optical center of the camera will be used as the origin, the horizontal direction of the world coordinate system will be used as the horizontal z-axis, and the direction perpendicular to the z-axis downwards will be used as the vertical y-axis, thus establishing a ranging coordinate system. Figure 3 The world coordinate system shown.
[0125] Step S203: Establish a distance measurement coordinate system based on the origin of the coordinate axes, the horizontal coordinate axis z-axis, and the vertical direction y-axis.
[0126] In one embodiment, the preset reference point includes a reference point at the bottom of the target vehicle.
[0127] Step S30 includes:
[0128] The system acquires image information of the target vehicle captured by the preset camera, and obtains the bottom coordinates of the reference point at the bottom of the target vehicle in the ranging coordinate system based on the image information; it acquires the pitch angle of the preset camera; it obtains the image coordinates of the bottom reference point of the target vehicle in the ranging coordinate system based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix; and it obtains the target image coordinates based on the image coordinates of the bottom reference point.
[0129] In one embodiment, before obtaining the image coordinates of the reference point at the bottom of the target vehicle in the ranging coordinate system based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix, the method further includes:
[0130] Obtain the preset camera focal length, first principal point offset, and second principal point offset from the parameter information of the preset camera; obtain the preset camera intrinsic parameter matrix based on the preset camera focal length, first principal point offset, and second principal point offset.
[0131] In practical implementation, based on perspective transformation technology, the camera intrinsic parameter matrix A can be set as:
[0132]
[0133] Where f is the camera focal length, i.e., the preset camera focal length, and C v With C u The principal point offset, where C v Indicates the offset of the first principal point, C v This indicates the offset of the second principal point.
[0134] During the distance calculation, a point [x, h, z] is selected at the bottom of the target vehicle, and its image coordinates are:
[0135]
[0136] This also provides the image coordinates of the bottom reference point of the target vehicle in the ranging coordinate system; after normalizing the image coordinates, the normalized image coordinates v are obtained:
[0137]
[0138] Similarly, selecting a point [x, h + Δh, z] on the top of the vehicle, its normalized image coordinates v + Δv are:
[0139]
[0140] Furthermore, considering that camera installation typically involves calibration, α is usually small, and that the distance to the vehicle in front is generally large while the vehicle is in motion (i.e., z is much larger than h), therefore:
[0141] Δv≈(Δh×f) / z
[0142] Where Δv is the height of the vehicle's bounding box in the image, and Δh is the vehicle's height in the world coordinate system, therefore the final distance estimate is:
[0143] z≈(Δh×f) / Δv
[0144] This embodiment can accurately determine whether a target object needs to be tracked through the above method. On the other hand, when the target object needs to be tracked, it can also calculate the distance between the target object and the target object relatively accurately, thereby preventing vehicle collisions.
[0145] In one embodiment, before obtaining the target image coordinates based on the image coordinates of the bottom reference point, the method further includes:
[0146] The image coordinates of the bottom reference point are normalized to obtain normalized image coordinates; the target image coordinates are obtained based on the normalized image coordinates.
[0147] In one embodiment, obtaining the target image coordinates based on the normalized image coordinates includes:
[0148] The top coordinates of the reference point at the top of the target vehicle in the ranging coordinate system are obtained based on the bottom coordinates; the image coordinates of the top reference point of the top of the target vehicle in the ranging coordinate system are obtained based on the normalized image coordinates and the top coordinates; and the target image coordinates are obtained based on the image coordinates of the top reference point.
[0149] In one embodiment, step S40 includes:
[0150] Obtain the pitch angle of the preset camera; determine whether the pitch angle of the preset camera is less than a pitch angle threshold; when the pitch angle of the preset camera is less than the pitch angle threshold, set the pitch angle of the preset camera to a preset pitch angle value; substitute the preset pitch angle value into the target image coordinates to obtain the correspondence between the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, the horizontal coordinate of the target vehicle image in the ranging coordinate system, and the focal length of the preset camera; obtain the distance to the target vehicle based on the correspondence.
[0151] In this embodiment, the correspondence between the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, the horizontal coordinate of the target vehicle image in the ranging coordinate system, and the preset camera focal length is Δv≈(Δh×f) / z. Since there is an installation and correction step in the camera setup, α is relatively small, and during vehicle movement, the distance to the vehicle in front is relatively large, so z is much larger than h.
[0152] In one embodiment, obtaining the distance to the target vehicle based on the correspondence includes:
[0153] The detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, and the preset camera focal length are obtained. Based on the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, the preset camera focal length, and the corresponding relationship, the horizontal coordinates of the target vehicle image in the ranging coordinate system are obtained, i.e., z≈(Δh×f) / Δv. z is obtained based on Δh, f, and Δv. The distance between the target vehicle and the target vehicle is obtained based on the horizontal coordinates of the target vehicle image in the ranging coordinate system.
[0154] In this embodiment, the monocular ranging algorithm based on perspective transformation establishes a ranging coordinate system for the current vehicle, obtains the coordinate information of the target vehicle based on the image information captured by the camera of the target vehicle on the current vehicle, and obtains the distance information between the current vehicle and the target vehicle based on the coordinate information of the target vehicle, thereby determining the distance between the vehicles.
[0155] Reference Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the collision warning method of the present invention, based on the above. Figure 2 The first embodiment shown is followed by a third embodiment of the collision warning method of the present invention.
[0156] Step S50 includes:
[0157] Step S501: When the distance reaches the warning threshold, acquire vehicle information collected by a preset sensor.
[0158] In this embodiment, the warning threshold can be 5m, or it can be other distance parameters. This embodiment does not limit this. Taking the warning threshold as 5m as an example, if the distance between the current vehicle and the target vehicle is 10m, the warning threshold has not yet been reached. In this case, no warning is issued. When the distance between the current vehicle and the target vehicle is 5m, the warning threshold is reached, and a warning is issued.
[0159] In a specific implementation, the preset sensors can be IMU sensors and GPS sensors installed on the vehicle, as well as other sensors that collect vehicle parameters. This embodiment does not limit this. In this embodiment, IMU sensors and GPS sensors are used as examples for explanation. The IMU sensor is used to collect the vehicle's acceleration, and the GPS sensor is used to collect the vehicle's speed information, thereby realizing the joint operation of multiple sensors to achieve collision warning judgment.
[0160] Step S502: When the vehicle information collected by the preset sensor meets the preset alarm conditions, a warning prompt is issued.
[0161] In this embodiment, the preset alarm conditions may be vehicle speed greater than a vehicle speed threshold, whether the target vehicle is located in the current lane, whether the target vehicle's relative speed TTC is less than a collision time threshold, and whether the target vehicle's absolute speed TTC is less than a collision time threshold, etc. Other alarm conditions may also be used, and this embodiment does not limit them.
[0162] Specifically, the process involves: acquiring the current vehicle speed, relative speed with the target vehicle, and absolute speed with the target vehicle from the vehicle information; when the current vehicle speed is greater than a preset speed threshold, obtaining the relative collision time based on the relative speed with the target vehicle; when the relative collision time is less than a preset time threshold, obtaining the absolute collision time based on the absolute speed with the target vehicle; and issuing a warning when the absolute collision time is less than the preset time threshold.
[0163] It should be noted that relative collision time and absolute collision time can refer to vehicle collision time (TTC), or other forms of collision time calculation methods. This embodiment does not limit these methods; in this embodiment, TTC collision time is used as an example for illustration. Figure 7The collision warning logic diagram shown determines whether the current vehicle speed exceeds a speed threshold. If the current speed exceeds the speed threshold, it determines whether the target vehicle is in the current lane. If the target vehicle is in the current lane, it determines whether the distance to the target vehicle is too close. If the distance to the target vehicle is too close, an alarm is triggered. If the distance to the target vehicle is not too close, it determines whether the target vehicle's relative speed TTC is less than a threshold. If the target vehicle's relative speed TTC is less than the threshold, an alarm is triggered. If the target vehicle's relative speed TTC is not less than the threshold, it determines whether the target vehicle's absolute speed TTC is less than the threshold. If the target vehicle's absolute speed TTC is less than the threshold, an alarm is triggered. If the target vehicle's absolute speed TTC is not less than the threshold, no alarm is triggered.
[0164] In specific implementation, the relative collision time can be obtained by acquiring the relative speed between the current vehicle and the target vehicle, that is, by subtracting the speed of the target vehicle from the speed of the current vehicle. Then, the distance between the two vehicles is obtained. The relative collision time is obtained based on the relative speed and the distance between the two vehicles. The absolute collision time can be obtained by acquiring the speed of the current vehicle through GPS, then acquiring the distance between the two vehicles. The absolute collision time is obtained based on the speed of the current vehicle and the distance between the two vehicles. The collision logic is implemented through the collision time to determine whether a warning is needed.
[0165] In one embodiment, step S501 includes:
[0166] When the distance reaches the warning threshold, the current lane is obtained based on the lane line detection algorithm; it is determined whether the target vehicle belongs to the current lane; when the target vehicle belongs to the current lane, vehicle information collected by preset sensors is obtained.
[0167] Specifically, when the distance reaches the warning threshold, select any number of reference points from the current location coordinates; obtain the current lane line based on the arbitrary number of reference points; and obtain the current lane based on the current lane line.
[0168] In the specific implementation, the coordinates of two points in the current vehicle lane are obtained, such as A(x1, y1) and B(x2, y2). The coordinates of points A and B are input into y = kx + b, where x and y represent coordinates, k represents the slope of the lane line, and b represents a constant. Thus, a virtual lane line is obtained based on the coordinates of the two points, thereby determining whether the target vehicle is located in the current lane, thereby improving the accuracy of collision warning.
[0169] In this embodiment, to distinguish whether a target vehicle is in the current lane, it is necessary to determine the current lane range. Algorithms based on lane line detection consume a lot of computing power on embedded devices. This embodiment uses virtual lane lines to determine the current lane area for the target hardware, thereby improving the accuracy of collision detection.
[0170] Furthermore, this embodiment of the invention also proposes a storage medium storing a collision warning program, which, when executed by a processor, implements the steps of the terminal network access method described above.
[0171] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0172] In addition, refer to Figure 8 The present invention also proposes a collision warning device, the collision warning device comprising:
[0173] The acquisition module 10 is used to acquire parameter information of a preset camera installed on the current vehicle.
[0174] In this embodiment, the preset camera's parameter information includes the camera's optical center position, focal length, and principal point offset, and may also include other parameter information. This embodiment does not limit this. The preset camera may be a camera on a dashcam installed on the current vehicle, or it may be a camera set in other ways. This embodiment does not limit this.
[0175] In practical implementation, when installing a camera on a dashcam, the camera's parameter configuration information can be obtained by calling a parameter acquisition command and stored in a preset storage area. The camera's parameter information can then be retrieved by querying the parameter configuration information stored in the preset storage area.
[0176] The module 20 is used to establish a ranging coordinate system based on the parameter information of the preset camera.
[0177] In this embodiment, the ranging coordinate system includes the world coordinate system, but other forms of coordinate systems are also possible. This embodiment does not limit this. In this embodiment, the world coordinate system is used as an example. The world coordinate system includes a horizontal z-axis and a y-axis that is perpendicular to the z-axis and pointing downwards. The optical center of the camera is taken as the origin. The world coordinate system is constructed based on the optical center, the horizontal z-axis, and the y-axis that is perpendicular to the z-axis and pointing downwards. When the coordinates of the current vehicle and the target vehicle are obtained based on the world coordinate system, the distance between the two vehicles can be obtained based on the z-axis coordinate. For example, the coordinates of the target vehicle are [x, h, z]. Since the ranging coordinate system takes the optical center of the camera on the dashcam of the current vehicle as the origin, the distance between the current vehicle and the target vehicle can be obtained by obtaining the z-coordinate of the target vehicle.
[0178] The acquisition module 10 is further configured to acquire image information of the target vehicle captured by the preset camera, and obtain the target image coordinates of the preset reference point of the target vehicle in the ranging coordinate system based on the image information.
[0179] In this embodiment, the preset reference point may include a reference point at the bottom of the target vehicle and a reference point at the top of the target vehicle, and may also include other reference points. This embodiment does not limit this. The image information of the target vehicle collected may be the image information of the target vehicle mapped in the camera. The target image coordinates of the preset reference point of the target vehicle in the ranging coordinate system are obtained by the image information mapped in the camera, that is, the image coordinates of the target vehicle mapped in the camera. Thus, the distance between the current vehicle and the target vehicle can be obtained according to the monocular ranging algorithm based on perspective change.
[0180] like Figure 3 The diagram illustrates the coordinate system setup for the monocular ranging algorithm. A world coordinate system and a camera coordinate system are established using the optical center of the camera. The camera's optical center serves as the origin of the coordinate axes. The z-axis of the world coordinate system points horizontally forward, and the y-axis points vertically downward. Considering that the camera angle may not be perfectly horizontal, a pitch angle α is introduced between the camera coordinate system and the world coordinate system. This makes the image coordinates of the target vehicle closer to its actual coordinates, thereby improving the accuracy of coordinate determination.
[0181] The acquisition module 10 is further configured to obtain the distance between itself and the target vehicle based on the target image coordinates.
[0182] In practical implementation, the target vehicle's coordinates [x, h, z] are obtained from its image coordinates, and the distance z between the current vehicle and the target vehicle can be obtained. Thus, the distance between the current vehicle and the target vehicle can be obtained from the target vehicle's image coordinates. By enhancing the on-chip computing capabilities of the dashcam, the distance between the two can be obtained, thereby improving the efficiency of collision warning.
[0183] The prompting module 30 is used to provide a warning when the distance reaches the warning threshold.
[0184] In this embodiment, the warning threshold can be 5m, or it can be other distance parameters. This embodiment does not limit this. Taking the warning threshold as 5m as an example, if the distance between the current vehicle and the target vehicle is 10m, the warning threshold has not yet been reached. In this case, no warning is issued. When the distance between the current vehicle and the target vehicle is 5m, the warning threshold is reached, and a warning is issued.
[0185] In practice, the alarm frequency can be adjusted based on whether the current distance exceeds the warning threshold. The greater the distance exceeds the threshold, the higher the alarm frequency, thus achieving a more intelligent collision warning.
[0186] In one embodiment, before acquiring the image information of the target vehicle captured by the preset camera, the following steps are included:
[0187] The system acquires the current driving image captured by the preset camera; performs image recognition on the current driving image using a preset convolutional neural network model to obtain the image recognition result of the target vehicle. The preset convolutional neural network model includes a first stage for image feature extraction and a second stage for image category prediction. The first stage includes a convolutional layer with downsampling. The system determines whether the target vehicle is a tracking object based on the image recognition result. If the target vehicle is a tracking object, the system tracks the target vehicle to obtain image information of the target vehicle.
[0188] In this embodiment, the preset convolutional neural network model can be a pre-constructed simplified convolutional neural network. A simplified neural network is a neural network obtained by simplifying the network model structure while maintaining the original performance. In this embodiment, the preset convolutional neural network model is a simplified neural network consisting of a first stage and a second stage. To ensure the accuracy of the simplified neural network, the first stage also includes a convolutional layer with downsampling. This embodiment places the downsampling operation, which would normally be performed by a pooling layer, into a convolutional layer, and then uses only one average pooling layer in the second stage for pooling operations, enabling the simplified neural network to have higher accuracy.
[0189] like Figure 4The overall process diagram illustrates that a simplified convolutional neural network is used to detect and track vehicles. Distance is measured from the collected image information of the target vehicle to determine the distance between the current vehicle and the target vehicle. The current vehicle's driving information is collected, including vehicle acceleration from the IMU and vehicle speed from GPS. Based on the distance between the current vehicle and the target vehicle, vehicle acceleration, and vehicle speed from GPS, a collision warning logic is used to determine a collision. Collision warnings are then issued via the control panel and audible alarm, thus implementing a multi-sensor collision warning algorithm to improve the accuracy of collision warnings.
[0190] In this embodiment, parameter information from a preset camera installed on the current vehicle is acquired; a ranging coordinate system is established based on the parameter information of the preset camera; image information of the target vehicle captured by the preset camera is acquired; target image coordinates of a preset reference point of the target vehicle in the ranging coordinate system are obtained based on the image information; the distance between the target vehicle and the target vehicle is obtained based on the target image coordinates; and a warning is issued when the distance reaches a warning threshold. Thus, the distance between the target vehicle and the target vehicle can be directly obtained through analysis and processing of the acquired image information, improving the efficiency of collision warning while enhancing the computing power of the embedded device.
[0191] In one embodiment, the establishment module 20 is further configured to obtain the optical center position of the preset camera;
[0192] The optical center position of the camera is taken as the origin of the coordinate axis, the horizontal direction of the world coordinate system is taken as the horizontal coordinate axis z-axis, and the direction perpendicular to the horizontal coordinate axis z-axis downward is taken as the vertical direction y-axis;
[0193] Establish a distance measurement coordinate system based on the origin of the coordinate axes, the horizontal z-axis, and the vertical y-axis.
[0194] In one embodiment, the preset reference point includes a reference point where the target vehicle is located at the bottom;
[0195] The acquisition module 10 is also used to acquire image information of the target vehicle captured by the preset camera, and obtain the bottom coordinates of the reference point of the target vehicle located at the bottom in the ranging coordinate system based on the image information;
[0196] Obtain the pitch angle of the preset camera;
[0197] Based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix, the image coordinates of the bottom reference point of the target vehicle in the ranging coordinate system are obtained.
[0198] The target image coordinates are obtained based on the image coordinates of the bottom reference point.
[0199] In one embodiment, the acquisition module 10 is further configured to acquire the preset camera focal length, first principal point offset, and second principal point offset from the parameter information of the preset camera;
[0200] The preset camera intrinsic parameter matrix is obtained based on the preset camera focal length, the first principal point offset, and the second principal point offset.
[0201] In one embodiment, the acquisition module 10 is further configured to normalize the image coordinates of the bottom reference point to obtain normalized image coordinates;
[0202] The target image coordinates are obtained based on the normalized image coordinates.
[0203] In one embodiment, the acquisition module 10 is further configured to obtain the top coordinates of the reference point at the top of the target vehicle in the ranging coordinate system based on the bottom coordinates;
[0204] Based on the normalized image coordinates and the top coordinates, the image coordinates of the top reference point of the target vehicle in the ranging coordinate system are obtained.
[0205] The target image coordinates are obtained based on the image coordinates of the top reference point.
[0206] In one embodiment, the acquisition module 10 is further configured to acquire the pitch angle of the preset camera;
[0207] Determine whether the pitch angle of the preset camera is less than the pitch angle threshold;
[0208] When the pitch angle of the preset camera is less than the pitch angle threshold, the pitch angle of the preset camera is set to the preset pitch angle value;
[0209] Substituting the preset pitch angle value into the target image coordinates, the corresponding relationship between the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, the horizontal coordinate of the target vehicle image in the ranging coordinate system, and the preset camera focal length is obtained.
[0210] The distance to the target vehicle is obtained based on the correspondence.
[0211] In one embodiment, the acquisition module 10 is further configured to acquire the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, and the preset camera focal length;
[0212] The horizontal coordinates of the target vehicle image in the ranging coordinate system are obtained based on the detection box width of the target vehicle image, the height of the target vehicle image in the ranging coordinate system, the preset camera focal length, and the corresponding relationship.
[0213] The distance between the target vehicle and the target vehicle is obtained based on the horizontal coordinates of the target vehicle image in the ranging coordinate system.
[0214] In one embodiment, the prompting module 30 is further configured to acquire vehicle information collected by a preset sensor when the distance reaches a warning threshold;
[0215] When the vehicle information collected by the preset sensor meets the preset alarm conditions, a warning is issued.
[0216] In one embodiment, the prompting module 30 is further configured to obtain the current lane based on a lane line detection algorithm when the distance reaches the warning threshold;
[0217] Determine whether the target vehicle belongs to the current lane.
[0218] When the target vehicle is within the current lane, vehicle information collected by preset sensors is acquired.
[0219] In one embodiment, the prompting module 30 is further configured to select any number of reference points from the current location coordinates when the distance reaches the warning threshold;
[0220] The current lane line is obtained based on any number of reference points;
[0221] The current lane is obtained based on the current lane line.
[0222] In one embodiment, the prompting module 30 is further configured to acquire the current vehicle speed, relative speed with the target vehicle, and absolute speed with the target vehicle from the vehicle information;
[0223] When the current vehicle speed is greater than a preset speed threshold, the relative collision time is obtained based on the relative speed with the target vehicle;
[0224] When the relative collision time is less than a preset time threshold, the absolute collision time is obtained based on the absolute speed with the target vehicle.
[0225] An early warning will be issued when the absolute collision time is less than a preset time threshold.
[0226] In one embodiment, the acquisition module 10 is further configured to acquire the current driving image captured by the preset camera;
[0227] The current driving image is image recognized by a preset convolutional neural network model to obtain the image recognition result of the target vehicle. The preset convolutional neural network model includes a first stage for image feature extraction and a second stage for image category prediction. The first stage includes a convolutional layer with downsampling.
[0228] Based on the image recognition results, determine whether the target vehicle is the object to be tracked;
[0229] When the target vehicle is the object of tracking, the target vehicle is tracked to obtain image information of the target vehicle.
[0230] The collision warning device of the present invention adopts all the technical solutions of all the above embodiments, and therefore has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0231] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A collision warning method characterized by, The collision warning method includes the following steps: Obtain parameter information from the preset camera installed on the current vehicle; Establish a ranging coordinate system based on the parameter information of the preset camera; The image information of the vehicle ahead captured by the preset camera is obtained, and the target image coordinates of the preset reference point of the vehicle ahead in the ranging coordinate system are obtained based on the image information. The target image coordinates are the image coordinates of the vehicle ahead mapped in the preset camera. The distance between the current vehicle and the vehicle in front is obtained based on the target image coordinates; When the distance reaches the warning threshold, a warning will be issued. The step of obtaining the distance between the target image coordinates and the vehicle ahead includes: Obtain the pitch angle of the preset camera; Determine whether the pitch angle of the preset camera is less than the pitch angle threshold; When the pitch angle of the preset camera is less than the pitch angle threshold, the pitch angle of the preset camera is set to the preset pitch angle value; Substituting the preset pitch angle value into the target image coordinates, we obtain the corresponding relationship between the detection box width of the vehicle image in front, the height of the vehicle image in front in the ranging coordinate system, the horizontal coordinate of the vehicle image in the ranging coordinate system, and the preset camera focal length. The distance to the vehicle ahead is obtained based on the correspondence; The step of establishing a ranging coordinate system based on the parameter information of the preset camera includes: Obtain the optical center position of the preset camera; The optical center position of the camera is taken as the origin of the coordinate axis, the horizontal direction of the world coordinate system is taken as the horizontal coordinate axis z-axis, and the direction perpendicular to the horizontal coordinate axis z-axis downward is taken as the vertical direction y-axis; Establish a distance measurement coordinate system based on the origin of the coordinate axes, the horizontal z-axis, and the vertical y-axis.
2. The collision warning method of claim 1, wherein, The preset reference point includes the reference point where the vehicle in front is located at the bottom; The step of acquiring image information of the vehicle ahead captured by the preset camera, and obtaining the target image coordinates of the preset reference point of the vehicle ahead in the ranging coordinate system based on the image information, includes: Obtain image information of the vehicle ahead captured by the preset camera, and obtain the bottom coordinates of the reference point of the vehicle ahead located at the bottom in the ranging coordinate system based on the image information; Obtain the pitch angle of the preset camera; The image coordinates of the reference point at the bottom of the vehicle ahead in the ranging coordinate system are obtained based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix. The target image coordinates are obtained based on the image coordinates of the bottom reference point.
3. The collision warning method of claim 2, wherein, Before obtaining the image coordinates of the reference point at the bottom of the vehicle ahead in the ranging coordinate system based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix, the method further includes: Obtain the preset camera focal length, first principal point offset, and second principal point offset from the parameter information of the preset camera; The preset camera intrinsic parameter matrix is obtained based on the preset camera focal length, the first principal point offset, and the second principal point offset.
4. The collision warning method of claim 2, wherein, Before obtaining the target image coordinates based on the image coordinates of the bottom reference point, the method further includes: The image coordinates of the bottom reference point are normalized to obtain the normalized image coordinates; The target image coordinates are obtained based on the normalized image coordinates.
5. The collision warning method of claim 4, wherein, The step of obtaining the target image coordinates based on the normalized image coordinates includes: The top coordinates of the reference point where the vehicle in front is located at the top are obtained in the ranging coordinate system based on the bottom coordinates. Based on the normalized image coordinates and the top coordinates, the image coordinates of the top reference point of the top of the vehicle in front in the ranging coordinate system are obtained; The target image coordinates are obtained based on the image coordinates of the top reference point.
6. The collision warning method of claim 1, wherein, The step of obtaining the distance to the vehicle ahead based on the correspondence includes: The detection box width of the image of the vehicle ahead, the height of the image of the vehicle ahead in the ranging coordinate system, and the preset camera focal length are obtained. The horizontal coordinates of the vehicle image in the ranging coordinate system are obtained based on the detection frame width of the vehicle image in front, the height of the vehicle image in the ranging coordinate system, the preset camera focal length, and the corresponding relationship. The distance between the vehicle in front and the vehicle ahead is obtained based on the horizontal coordinates of the image of the vehicle ahead in the ranging coordinate system.
7. The collision warning method according to any one of claims 1 to 6, characterized by, The step of issuing a warning when the distance reaches the warning threshold includes: When the distance reaches the warning threshold, vehicle information collected by a preset sensor is acquired; When the vehicle information collected by the preset sensor meets the preset alarm conditions, a warning is issued.
8. The collision warning method as described in claim 7, characterized in that, When the distance reaches the warning threshold, the vehicle information collected by the preset sensor is acquired, including: When the distance reaches the warning threshold, the current lane is obtained based on the lane line detection algorithm; Determine whether the vehicle ahead belongs to the current lane. When the vehicle ahead is within the current lane, vehicle information collected by preset sensors is obtained.
9. The collision warning method as described in claim 8, characterized in that, When the distance reaches the warning threshold, the current lane is obtained based on the lane line detection algorithm, including: When the distance reaches the warning threshold, select any number of reference points from the current location coordinates; The current lane line is obtained based on any number of reference points; The current lane is obtained based on the current lane line.
10. The collision warning method as described in claim 7, characterized in that, The step of issuing a warning when the vehicle information collected by the preset sensor meets the preset alarm conditions includes: Obtain the current vehicle speed, relative speed with the vehicle in front, and absolute speed with the vehicle in front from the vehicle information; When the current vehicle speed is greater than a preset speed threshold, the relative collision time is obtained based on the relative speed with the vehicle in front; When the relative collision time is less than a preset time threshold, the absolute collision time is obtained based on the absolute speed with the vehicle in front. An early warning will be issued when the absolute collision time is less than a preset time threshold.
11. The collision warning method as described in any one of claims 1 to 6, characterized in that, Before acquiring the image information of the vehicle ahead captured by the preset camera, the following steps are included: Acquire the current driving image captured by the preset camera; The current driving image is image recognized by a preset convolutional neural network model to obtain the image recognition result of the vehicle in front. The preset convolutional neural network model includes a first stage for image feature extraction and a second stage for image category prediction. The first stage includes a convolutional layer with downsampling. Based on the image recognition results, determine whether the vehicle ahead is the target being tracked; When the vehicle ahead is the target of tracking, the vehicle ahead is tracked to obtain image information of the vehicle ahead.
12. A collision warning device, characterized in that, The collision warning device includes: The acquisition module is used to acquire parameter information of a preset camera installed on the current vehicle; A module is established to create a ranging coordinate system based on the parameter information of the preset camera. The acquisition module is further configured to acquire image information of the vehicle in front captured by the preset camera, and obtain the target image coordinates of the preset reference point of the vehicle in front in the ranging coordinate system based on the image information. The target image coordinates are the image coordinates of the vehicle in front mapped in the preset camera. The acquisition module is further configured to obtain the distance between the current vehicle and the vehicle in front based on the target image coordinates; The alert module is used to provide an early warning alert when the distance reaches the warning threshold. The acquisition module is further configured to acquire the pitch angle of the preset camera; determine whether the pitch angle of the preset camera is less than a pitch angle threshold; when the pitch angle of the preset camera is less than the pitch angle threshold, set the pitch angle of the preset camera to a preset pitch angle value; substitute the preset pitch angle value into the target image coordinates to obtain the correspondence between the detection box width of the image of the vehicle in front, the height of the image of the vehicle in front in the ranging coordinate system, the horizontal coordinate of the image of the vehicle in front in the ranging coordinate system, and the focal length of the preset camera; and obtain the distance between the vehicle in front and the vehicle in front based on the correspondence. The establishment module is further configured to obtain the optical center position of the preset camera; take the optical center position of the camera as the origin of the coordinate axis, take the horizontal direction of the world coordinate system as the horizontal coordinate axis z-axis, and take the direction perpendicular to the z-axis as the vertical direction y-axis; and establish a ranging coordinate system based on the origin of the coordinate axis, the horizontal coordinate axis z-axis, and the vertical direction y-axis.
13. The collision warning device as described in claim 12, characterized in that, The preset reference point includes the reference point where the vehicle in front is located at the bottom; The acquisition module is also used to acquire image information of the vehicle in front captured by the preset camera, and to obtain the bottom coordinates of the reference point of the vehicle in front in the ranging coordinate system based on the image information. Obtain the pitch angle of the preset camera; The image coordinates of the reference point at the bottom of the vehicle ahead in the ranging coordinate system are obtained based on the bottom coordinates, the pitch angle of the preset camera, and the preset camera intrinsic parameter matrix. The target image coordinates are obtained based on the image coordinates of the bottom reference point.
14. The collision warning device as described in claim 13, characterized in that, The acquisition module is also used to acquire the preset camera focal length, first principal point offset, and second principal point offset from the parameter information of the preset camera; The preset camera intrinsic parameter matrix is obtained based on the preset camera focal length, the first principal point offset, and the second principal point offset.
15. The collision warning device as described in claim 13, characterized in that, The acquisition module is also used to normalize the image coordinates of the bottom reference point to obtain normalized image coordinates; The target image coordinates are obtained based on the normalized image coordinates.
16. A collision warning device, characterized in that, The collision warning device includes: a memory, a processor, and a collision warning program stored in the memory and running on the processor, wherein when the collision warning program is executed by the processor, it implements the steps of the collision warning method as described in any one of claims 1 to 11.
17. A storage medium, characterized in that, The storage medium stores a collision warning program, which, when executed by a processor, implements the steps of the collision warning method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Vehicle ranging and collision early warning method based on monocular vision
CN105574552A
ADAS preceding vehicle collision early warning method based on monocular vision fused with millimeter waves
CN111098815A