A safe assisted driving method and system based on image processing
Through image processing technology, the distance between vehicles and the minimum safety distance is calculated, and the calculation formula is selected based on the situation of the vehicle ahead of the vehicle, which solves the problem of low intelligence of the existing safety assisted driving system and achieves a more timely and accurate collision warning.
Patent Information
- Application Number
- CN202410637479.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-05-22
AI Technical Summary
The existing safety assisted driving system is not very intelligent when preventing vehicle collisions, and fails to consider the situation of the vehicle ahead of the vehicle, resulting in untimely and inaccurate early warning information.
Through image processing technology, image data in the driving direction of one's own vehicle is obtained, reference points and feature points of the vehicle are extracted, distances and minimum safety distances between one's own vehicle and the vehicle ahead are calculated, and different safety distance calculation formulas are selected for calculation based on whether there is a vehicle ahead of one's front, and finally, real-time monitoring and collision warning are issued during the vehicle's driving process.
The early warning level of the safety assisted driving system has been improved, ensuring timely and accurate warning information, and enhancing driving safety.
Smart Images

Figure CN118506606B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of driving safety assisted driving, and in particular relates to a safe assisted driving method and system based on image processing. Background Art
[0002] With the development of the economy on a global scale, people's quality of life is getting higher and higher, and the number of cars has also increased significantly year by year. As an indispensable part of food, clothing, housing and transportation, transportation is becoming more and more closely related to people. At the same time, traffic problems are becoming increasingly prominent. Among them, the occurrence of traffic accidents has attracted people's attention, and thus a driving safety assisted driving system was born. The safety assisted driving system can monitor the dangerous situation around the vehicle in real time when the vehicle is driving, and analyze and process the collected information. When a certain state is found to threaten the safety of the vehicle, the system will promptly issue an alarm signal to remind the driver to pay attention and deal with it. The safety assisted driving system can play an important role in preventing collisions between vehicles in motion. However, the safety assisted driving system in the prior art often only sends anti-collision warning information to the driver by monitoring the distance between the vehicle itself and the vehicle in front, but does not consider the relevant situation of the vehicle in front of the vehicle in front, resulting in the low intelligence level of the system warning and the limited warning effect of the system. Summary of the invention
[0003] In response to the technical problems raised above, the present invention provides a safe assisted driving method and system based on image processing, which calculates the real-time distance between the own vehicle and the vehicle in front of it through image ranging technology, and calculates the minimum safe distance between the own vehicle and the vehicle in front of it according to different situations of whether the vehicle in front of the vehicle in front of the own vehicle exists, and then performs anti-collision warning during the driving process of the own vehicle, thereby improving the intelligence level of the warning of the safety assisted driving system, and at the same time has the advantages of timely and high accuracy of warning.
[0004] In order to achieve the above-mentioned purpose of the invention, a safe assisted driving method based on image processing is provided as follows, which is implemented by the following steps:
[0005] Step 1: During vehicle driving, the camera module of the safety auxiliary driving system is used to obtain image data directly in front of the own vehicle in the driving direction, wherein the image data includes an image of the own vehicle, an image of a vehicle in front of the own vehicle, and an image of a vehicle in front of the vehicle in front of the vehicle in front;
[0006] Step 2: The image preprocessing module of the safety assisted driving system preprocesses the image data, and the preprocessing steps include image cropping, image graying, detection of the rear of the vehicle contained in the image, and extraction of the reference point of the own vehicle and the feature point of the rear of the front vehicle from the image;
[0007] Step 3: Based on the reference point of the own vehicle and the characteristic point of the rear of the front vehicle, the image analysis module of the safety auxiliary driving system calculates the distance value between the own vehicle and the front vehicle;
[0008] Step 4: The speed measurement module of the safety auxiliary driving system obtains the driving speed value of the own vehicle, and calculates the current driving speed value of the front vehicle by combining the distance value between the own vehicle and the front vehicle at different times;
[0009] Step 5: The image analysis module of the safety auxiliary driving system determines whether there is a vehicle in front of the vehicle in front of the own vehicle in the image data based on the image data obtained by the processing of the above step 2. If it does not exist, the minimum safety distance value between the own vehicle and the vehicle in front is obtained by using the safety distance calculation formula 1. If it exists, the minimum safety distance value between the own vehicle and the vehicle in front is obtained by using the safety distance calculation formula 2.
[0010] Step 6: The warning module of the safety auxiliary driving system monitors the relationship between the distance value between the own vehicle and the vehicle in front and the minimum safety distance value between the own vehicle and the vehicle in front in real time. When the former is less than or equal to the latter, the warning module sends a warning message to the driver of the own vehicle.
[0011] As a preferred technical solution of the present invention, in step 4, the current driving speed value v of the vehicle ahead of the own vehicle is calculated by the following formula: 1 :
[0012]
[0013] Among them, S n is the distance between the vehicle and the vehicle in front at the current moment, S n-1 is the distance between the vehicle and the vehicle in front at the moment before the current moment, Δt is the time interval between the current moment and the moment before, v 0 is the driving speed of the own vehicle.
[0014] As a preferred technical solution of the present invention, the specific description of the safety distance calculation formula 1 in step 5 is as follows:
[0015]
[0016] Where L is the minimum safe distance between the vehicle and the vehicle ahead, v 0 is the driving speed of the vehicle, a 0 is the braking acceleration value of the own vehicle, t 0 is the reaction time value of the driver of the own vehicle, v 1is the driving speed of the vehicle in front of the vehicle, a 1 It is the braking acceleration value of the vehicle in front of the own vehicle.
[0017] As a preferred technical solution of the present invention, the specific description of the safety distance calculation formula 2 in step 6 is as follows:
[0018]
[0019] Where L is the minimum safe distance between the vehicle and the vehicle ahead, v 0 is the driving speed of the vehicle, a 0 is the braking acceleration value of the own vehicle, t 0 is the reaction time value of the driver of the own vehicle, v 1 is the driving speed of the vehicle in front of the vehicle, a 1 is the braking acceleration value of the vehicle in front of the own vehicle, t 1 It is the reaction time value of the driver of the vehicle ahead of the own vehicle.
[0020] Compared with the prior art, the present invention has the following beneficial effects:
[0021] The present invention first obtains image data directly in front of the own vehicle in the direction of travel, and extracts the reference point of the own vehicle and the feature point of the rear of the front vehicle from the image, and also calculates the distance between the own vehicle and the front vehicle based on the reference point and the feature point, then obtains the travel speed of the own vehicle, and calculates the current travel speed of the front vehicle in combination with the distance value between the own vehicle and the front vehicle, and then calculates the minimum safe distance between the own vehicle and the front vehicle respectively according to the different situations of the front vehicle of the front vehicle and the front vehicle of the own vehicle in the image, and finally performs anti-collision warning during the driving process of the own vehicle based on the distance between the own vehicle and the front vehicle and the minimum safe distance between them. The present invention solves the problem that the safety auxiliary driving system in the prior art often only sends anti-collision warning information to the driver by monitoring the distance between the own vehicle and the front vehicle, but does not consider the relevant situation of the front vehicle of the front vehicle, resulting in the low intelligence level of the system warning and the limited warning effect of the system, and at the same time, the present invention has the advantages of timely system warning and high warning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flowchart of a safe assisted driving method based on image processing according to the present invention;
[0023] Figure 2 A flowchart of the steps of preprocessing image data according to the present invention;
[0024] Figure 3A flowchart of the steps of calculating the distance value between the own vehicle and the vehicle in front of the present invention;
[0025] Figure 4 This is a structural diagram of the components of a safety assisted driving system based on image processing of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0027] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0028] References Figure 1 As shown, the present invention provides a safe assisted driving method based on image processing, which is specifically implemented by executing the following steps:
[0029] Step 1: During vehicle driving, the camera module of the safety auxiliary driving system is used to obtain image data directly in front of the own vehicle in the driving direction, wherein the image data includes an image of the own vehicle, an image of a vehicle in front of the own vehicle, and an image of a vehicle in front of the vehicle in front of the vehicle in front;
[0030] Step 2: The image preprocessing module of the safety assisted driving system preprocesses the image data, and the preprocessing steps include image cropping, image graying, detection of the rear of the vehicle contained in the image, and extraction of the reference point of the own vehicle and the feature point of the rear of the front vehicle from the image;
[0031] Step 3: Based on the reference point of the own vehicle and the characteristic point of the rear of the front vehicle, the image analysis module of the safety auxiliary driving system calculates the distance value between the own vehicle and the front vehicle;
[0032] Step 4: The speed measurement module of the safety auxiliary driving system obtains the driving speed value of the own vehicle, and calculates the current driving speed value of the front vehicle by combining the distance value between the own vehicle and the front vehicle at different times;
[0033] Step 5: The image analysis module of the safety auxiliary driving system determines whether there is a vehicle in front of the vehicle in front of the own vehicle in the image data based on the image data obtained by the processing of the above step 2. If it does not exist, the minimum safety distance value between the own vehicle and the vehicle in front is obtained by using the safety distance calculation formula 1. If it exists, the minimum safety distance value between the own vehicle and the vehicle in front is obtained by using the safety distance calculation formula 2.
[0034] Step 6: The warning module of the safety auxiliary driving system monitors the relationship between the distance value between the own vehicle and the vehicle in front and the minimum safety distance value between the own vehicle and the vehicle in front in real time. When the former is less than or equal to the latter, the warning module sends a warning message to the driver of the own vehicle.
[0035] Furthermore, in step one, the camera module of the safety assistance driving system can be implemented by a CCD camera. The camera module is specifically installed on the top of the own vehicle, and by debugging the installation height, shooting angle and other parameters of the camera module in advance, it is ensured that the camera module can obtain image data within a certain field of view directly in front of the own vehicle's driving direction. The image data not only includes the image of the own vehicle, usually a partial front image of the own vehicle, but also may include the image of the vehicle in front of the own vehicle, usually an image of the rear of the vehicle, and may also include the image of the vehicle in front of the vehicle in front of the own vehicle, usually also an image of the rear of the vehicle. The image data about the vehicle collected by the camera module in this step is subsequently used to calculate the real-time distance value between the own vehicle and the vehicle in front of it through image ranging technology, and as a calculation condition for the minimum safe distance between the own vehicle and the vehicle in front of it.
[0036] Further, refer to Figure 2 As shown, in step 2, the image preprocessing module of the safety auxiliary driving system preprocesses the image data obtained in step 1, including image cropping, image graying, detection of the rear of the vehicle contained in the image, and further extracting the reference point of the own vehicle and the feature point of the rear of the front vehicle from the image to calculate the distance value between the own vehicle and the vehicle in front of it. The image preprocessing specifically includes the following steps:
[0037] The first step is to cut out redundant image information from the image data, including images of buildings, plants, pedestrians, etc. located at the edge of the image, and make the bottom edge of the image just separate the vehicle from the road surface. The midpoint of the bottom edge of the image is used as the reference point of the vehicle, and the color image data is further grayed to obtain grayed image data.
[0038] Step 2: For the grayscale image data, the contour of the rear of the vehicle contained in the image data is extracted by using edge detection technology, and a rectangle circumscribed thereto is generated from the contour of the rear of the vehicle to obtain a rectangular area corresponding to the rear of the vehicle;
[0039] The third step is to extract the center point and four vertices of the rectangular area corresponding to the rear of the vehicle in front of the own vehicle as feature points of the image data, which are subsequently used to calculate the distance between the own vehicle and the vehicle in front.
[0040] Specifically, considering that the image data not only contains vehicle images, but also contains image information such as building images, plant images, pedestrian images, etc. that are useless to the safety assisted driving system of the present invention, cropping these useless image information can reduce the amount of data to be processed by the system subsequently and speed up the execution of other preprocessing steps. Since the contour of the rear of the vehicle is irregular, in order to enable the system to conveniently extract the feature points of the rear of the front vehicle from the image according to unified rules, a circumscribed rectangle of the rear contour of the vehicle is generated. Finally, the midpoint of the bottom edge of the image is used as the reference point of the own vehicle, and the center point and four vertices of the rectangular area corresponding to the rear of the front vehicle are extracted as feature points, which are subsequently used to calculate the distance value between the own vehicle and the vehicle in front.
[0041] Further, refer to Figure 3 As shown, in step 3, based on the reference point of the own vehicle and the characteristic points of the rear of the front vehicle, the image analysis module of the safety auxiliary driving system calculates the distance value between the own vehicle and the front vehicle. The distance value and the minimum safety distance value between the own vehicle and the front vehicle are used together in the subsequent steps to perform anti-collision monitoring during vehicle driving. The specific calculation process includes the following steps:
[0042] The first step is to determine the model used for distance measurement, including establishing the world coordinate system, camera coordinate system, image coordinate system, and pixel coordinate system;
[0043] The second step is to calculate the conversion relationship between the target point in the camera coordinate system and the projection point in the pixel coordinate system, as well as the conversion relationship between the target point in the camera coordinate system and the corresponding point in the world coordinate system, and then obtain the point-to-point relationship between the world coordinate system and the pixel coordinate system;
[0044] The third step is to convert the pixel coordinates of the reference point of the own vehicle and the feature point of the rear of the front vehicle into world coordinates, and calculate the distance value between the reference point and each feature point respectively, and take their average value as the distance value between the own vehicle and the front vehicle.
[0045] Specifically, the distance measurement model for calculating the distance between the own vehicle and the vehicle in front involves the world coordinate system, the camera coordinate system, the image coordinate system, and the pixel coordinate system. The world coordinate system is an imaginary coordinate system that can be adjusted according to actual needs. The position of the origin is selected, and the coordinates of the point in the world coordinate system are represented by (x, y, z). A reference point is selected in the coordinate system to confirm the position of the CCD camera, and the reference point can also be used as a reference to describe the relative coordinates of other objects in the scene. This reference point is the origin of the world coordinate system; the camera coordinate system can also be called the optical center coordinate system, which is a coordinate system established with the optical center of the CCD camera as the coordinate origin, in which the coordinates of the point can be represented by (x ,y,z), the X and Y axes of the coordinate system are parallel to the X axis of the CCD imaging plane coordinate system respectively, the Y axis and the Z axis coincide with the optical axis, and the three coordinate axes conform to the right-hand rule; the origin of the image coordinate system is the intersection of the optical axis and the imaging plane, which is generally at the center of the CCD image, and (x,y) is used to represent the coordinate points thereon, and the X axis and Y axis are parallel to the two sides of the CCD image; the origin of the pixel coordinate system is located at the vertex in the upper left corner of the CCD image, and the coordinates are represented by (x,y), and the coordinate values represent the grayscale value of the pixel at that point. The horizontal and vertical coordinates represent the number of rows and columns of a point in the image data matrix, and there is no actual object unit. The X axis is in the direction of increasing columns, and the Y axis is in the direction of increasing rows.
[0046] After establishing the model for distance measurement, a certain distance measurement algorithm is needed to calculate the actual distance value between the reference point of the own vehicle and the various feature points at the rear of the front vehicle. Since the distance measurement algorithm has been developed relatively maturely, this example will not repeat its calculation process. Finally, the average value of the actual distance between the reference point and each feature point is taken as the distance value between the own vehicle and the front vehicle, which can reduce the calculation error of the distance value and improve the accuracy of the system.
[0047] Furthermore, in step 4, the speed measurement module of the safety auxiliary driving system obtains the driving speed value of the own vehicle, wherein the speed measurement module can be composed of a vehicle speed measurement sensor. In step 4, the current driving speed value of the front vehicle is calculated by combining the distance values between the own vehicle and the front vehicle at different times, and the current driving speed value of the front vehicle will be used to participate in the calculation of the minimum safe distance value between the own vehicle and the front vehicle. Specifically, the driving speed value v of the front vehicle of the own vehicle at the current time is calculated by the following formula: 1 :
[0048]
[0049] Among them, S n is the distance between the vehicle and the vehicle in front at the current moment, S n-1is the distance between the vehicle and the vehicle in front at the moment before the current moment, Δt is the time interval between the current moment and the moment before, v 0 is the driving speed of the own vehicle.
[0050] Specifically, in this embodiment, the normal driving process in a short period of time is regarded as the vehicle moving at a uniform speed. First, the distance value S between the vehicle and the vehicle in front at the current moment is obtained. n , and the distance value S between the vehicle and the vehicle in front at the previous moment n-1 Then, within the time interval Δt between the current moment and the previous moment, the moving distance of the vehicle is expressed as v 0 ×Δt, then the moving distance of the vehicle in front of the own vehicle within the time interval Δt can be further expressed as S n -S n-1 +v 0 ×Δt, and finally the speed value of the vehicle in front moving at a constant speed within the time interval Δt can be obtained and used as the driving speed value v at the current moment 1 .
[0051] Further, in step five, based on the image data obtained by processing in the above step two, different safety distance calculation formulas 1 or 2 are selected to calculate the minimum safety distance value between the own vehicle and the vehicle in front, depending on whether there is a vehicle in front of the vehicle in front of the own vehicle in the image. Among them, the number of rectangular areas corresponding to the rear of the vehicle in the image is obtained to determine whether there is a vehicle in front of the vehicle in front of the own vehicle in the image. Specifically, when the number of rectangular areas is 1, there is no vehicle in front of the vehicle in front of the own vehicle, and when the number of rectangular areas is greater than 1, there is a vehicle in front of the vehicle in front of the own vehicle.
[0052] When there is no vehicle ahead of the vehicle ahead, the minimum safety distance value between the vehicle ahead and the vehicle ahead is calculated using safety distance calculation formula 1. The specific description of safety distance calculation formula 1 is as follows:
[0053]
[0054] Where L is the minimum safe distance between the vehicle and the vehicle ahead, v 0 is the driving speed of the vehicle, a 0 is the braking acceleration value of the own vehicle, t 0 is the reaction time value of the driver of the own vehicle, v 1 is the driving speed of the vehicle in front of the vehicle, a 1 It is the braking acceleration value of the vehicle in front of the own vehicle.
[0055] Specifically, in this embodiment, it is considered that during actual driving, when the vehicle in front of the own vehicle performs emergency braking, the driver of the own vehicle also performs emergency braking after a certain reaction time. When the own vehicle and the vehicle in front of it are both completely stopped, in extreme cases, the front part of the own vehicle just touches the rear part of the vehicle in front of it, and the two do not collide. The distance value between the own vehicle and the vehicle in front when the vehicle in front of it performs emergency braking corresponding to this situation is used as the minimum safe distance value between the own vehicle and the vehicle in front of it, wherein the braking process is regarded as a uniform deceleration movement of the vehicle. The calculation process of the minimum safe distance value includes, first, expressing the distance value moved by the own vehicle during the time from the emergency braking of the vehicle in front to the complete stop of the own vehicle and the vehicle in front, that is, Then the moving distance of the front vehicle during this time is expressed, that is, The minimum safe distance value L between the own vehicle and the vehicle in front can be finally derived, and the minimum safe distance value L is used for collision avoidance monitoring during the driving process of the own vehicle together with the distance value between the own vehicle and the vehicle in front.
[0056] When there is a vehicle ahead of the vehicle ahead, the minimum safe distance value between the vehicle ahead and the vehicle ahead is calculated using the safety distance calculation formula 2. The specific description of the safety distance calculation formula 2 is as follows:
[0057]
[0058] Where L is the minimum safe distance between the vehicle and the vehicle ahead, v 0 is the driving speed of the vehicle, a 0 is the braking acceleration value of the own vehicle, t 0 is the reaction time value of the driver of the own vehicle, v 1 is the driving speed of the vehicle in front of the vehicle, a 1 is the braking acceleration value of the vehicle in front of the own vehicle, t 1 It is the reaction time value of the driver of the vehicle ahead of the own vehicle.
[0059] Specifically, in this embodiment, it is considered that in the actual driving process, the vehicle in front of the own vehicle may also be affected by the driving state of the vehicle in front of it. For example, when the vehicle in front of the vehicle in front of the own vehicle performs emergency braking, in order to avoid vehicle collision, the vehicle in front of the own vehicle will take a reaction time t 1 After that, the vehicle will also brake. When the vehicle finds that the vehicle in front of it brakes, it will also take a reaction time t 0Then, the same braking operation is performed. When both the own vehicle and the vehicle in front of it are completely stopped, and regardless of whether the vehicle in front of it collides with the vehicle in front of it, in extreme cases, the front part of the own vehicle just touches the rear part of the vehicle in front of it, and the two do not collide. The distance value between the own vehicle and the vehicle in front of it when the vehicle in front of it performs emergency braking corresponding to this situation is used as the minimum safe distance value between the own vehicle and the vehicle in front of it, wherein the braking process is regarded as a uniform deceleration movement of the vehicle. The calculation process of the minimum safe distance value includes, firstly, expressing the distance value moved by the own vehicle during the time from the emergency braking of the vehicle in front to the time when the own vehicle and the vehicle in front of it are completely stopped, that is, Then the moving distance of the front vehicle during this time is expressed, that is, The minimum safe distance value L between the own vehicle and the vehicle in front can be finally derived, and the minimum safe distance value L is used for collision avoidance monitoring during the driving process of the own vehicle together with the distance value between the own vehicle and the vehicle in front.
[0060] Furthermore, in step six, the warning module of the safety assisted driving system monitors in real time the distance value between the own vehicle and the vehicle in front obtained by image ranging, and the relationship between the distance value L between the own vehicle and the vehicle in front at the same moment. When the former is less than or equal to the latter, the warning module sends a warning message to the driver of the own vehicle in real time to remind the driver to adjust the current driving status, so as to avoid the collision between the own vehicle and the vehicle in front and ensure the safety of the driving process.
[0061] References Figure 4 As shown, the present invention also provides a safe assisted driving system based on image processing, which is used to implement the safe assisted driving method based on image processing described above, and specifically includes the following modules:
[0062] A camera module is used to collect image data directly in front of the own vehicle in the direction of travel, specifically including image data of the vehicle in front of the own vehicle and image data of the vehicle in front of the vehicle in front of the vehicle in front;
[0063] A preprocessing module is used to preprocess the image data collected by the camera module. The preprocessing steps include image cropping, image graying, detection of the rear of the vehicle contained in the image, and extraction of the reference point of the own vehicle and the feature point of the rear of the front vehicle from the image;
[0064] An image analysis module, used to calculate the distance values between the own vehicle and the front vehicle at different times based on the reference point of the own vehicle in the image processed by the preprocessing module and the feature points of the rear of the front vehicle, and also calculate the minimum safe distance value between the own vehicle and the front vehicle based on the image processed by the preprocessing module;
[0065] The speed measurement module is used to obtain the driving speed value of the own vehicle, and calculate the current driving speed value of the front vehicle in combination with the distance value between the own vehicle and the front vehicle at different times;
[0066] The early warning module is used to monitor in real time the relationship between the distance value between the own vehicle and the vehicle in front and the minimum safe distance value between the own vehicle and the vehicle in front. When the former is less than or equal to the latter, a warning message is sent to the driver of the own vehicle.
[0067] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0068] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0069] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0070] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0071] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A safe assisted driving method based on image processing, characterized in that: The steps include: S1. During vehicle driving, the camera module of the safety auxiliary driving system is used to obtain image data directly in front of the own vehicle in the driving direction, wherein the image data includes an image of the own vehicle, an image of a vehicle in front of the own vehicle, and an image of a vehicle in front of the vehicle in front of the vehicle in front; S2, the image preprocessing module of the safety auxiliary driving system preprocesses the image data, the preprocessing steps include image cropping, image graying, detection of the rear of the vehicle contained in the image, and extraction of the reference point of the own vehicle and the feature point of the rear of the front vehicle from the image; S3, based on the reference point of the own vehicle and the characteristic point of the rear of the front vehicle, the image analysis module of the safety auxiliary driving system calculates the distance value between the own vehicle and the front vehicle; S4, the speed measurement module of the safety auxiliary driving system obtains the driving speed value of the own vehicle, and calculates the current driving speed value of the front vehicle in combination with the distance value between the own vehicle and the front vehicle at different times; S5, the image analysis module of the safety auxiliary driving system determines whether there is a vehicle in front of the vehicle in front of the own vehicle in the image data based on the image data processed by S2, if not, the minimum safety distance value between the own vehicle and the vehicle in front is obtained by using the safety distance calculation formula 1, if it exists, the minimum safety distance value between the own vehicle and the vehicle in front is obtained by using the safety distance calculation formula 2; S6. The warning module of the safety auxiliary driving system monitors the relationship between the distance value between the own vehicle and the vehicle in front and the minimum safety distance value between the own vehicle and the vehicle in front in real time. When the former is less than or equal to the latter, the warning module sends a warning message to the driver of the own vehicle; The specific description of the safety distance calculation formula 1 in S5 is as follows: , Among them, L is the minimum safe distance between the vehicle and the vehicle in front. is the driving speed of the vehicle itself, is the braking acceleration value of the vehicle, is the reaction time value of the driver of the own vehicle, is the driving speed of the vehicle in front of the own vehicle, is the braking acceleration value of the vehicle in front of the own vehicle; The specific description of the safety distance calculation formula 2 in S5 is as follows: , Among them, L is the minimum safe distance between the vehicle and the vehicle in front. is the driving speed of the vehicle itself, is the braking acceleration value of the vehicle, is the reaction time value of the driver of the own vehicle, is the driving speed of the vehicle in front of the own vehicle, is the braking acceleration value of the vehicle in front of the own vehicle, is the reaction time value of the driver of the vehicle in front of the own vehicle; The image preprocessing module of the safety assisted driving system in S2 preprocesses the image data, specifically including the following steps: S21, cutting out redundant image information from the image data, including images of buildings, plants, and pedestrians located at the edge of the image, while making the bottom edge of the image just separate the vehicle from the road surface, taking the midpoint of the bottom edge of the image as the reference point of the vehicle, and continuing to grayscale the color image data to obtain grayscale image data; S22, for the grayscale image data, extracting the contour of the rear of the vehicle contained in the image data by using edge detection technology, and generating a rectangle circumscribed thereto from the contour of the rear of the vehicle to obtain a rectangular area corresponding to the rear of the vehicle; S23. In the rectangular area corresponding to the rear of the vehicle in front of the own vehicle, the center point and four vertices of the rectangular area are respectively extracted as feature points of the image data, which are subsequently used to calculate the distance between the own vehicle and the vehicle in front.
2. The image processing-based safe driving assistance method according to claim 1, characterized in that: In S4, the current driving speed of the vehicle ahead of the own vehicle is calculated by the following formula: : , in, is the distance between the vehicle and the vehicle in front at the current moment, is the distance between the vehicle and the vehicle in front at the moment before the current moment, is the time interval between the current moment and its previous moment, is the driving speed of the vehicle.
3. The image processing-based safe driving assistance method according to claim 1, characterized in that: S3 calculates the distance between the own vehicle and the vehicle in front, which specifically includes the following steps: S31, determining a model for distance measurement, including establishing a world coordinate system, a camera coordinate system, an image coordinate system, and a pixel coordinate system; S32, calculating the conversion relationship between the target point in the camera coordinate system and the projection point in the pixel coordinate system, and the conversion relationship between the target point in the camera coordinate system and the corresponding point in the world coordinate system, and then obtaining the point-to-point relationship between the world coordinate system and the pixel coordinate system; S33, converting the pixel coordinates of the reference point of the own vehicle and the feature points at the rear of the front vehicle into world coordinates, and respectively calculating the distance values between the reference point and each of the feature points, and taking their average value as the distance value between the own vehicle and the front vehicle.
4. The image processing-based safe driving assistance method according to claim 1, characterized in that: In S5, within the image data obtained by processing in S2, the number of rectangular areas corresponding to the rear of the vehicle in the image is obtained to determine whether there is a vehicle in front of the vehicle in front of the own vehicle in the image. Specifically, when the number of rectangular areas is 1, there is no vehicle in front of the vehicle in front of the own vehicle; when the number of rectangular areas is greater than 1, there is a vehicle in front of the vehicle in front of the own vehicle.
5. A safety assisted driving system based on image processing, used to implement the method according to any one of claims 1 to 4, characterized in that: Includes the following modules: A camera module is used to collect image data directly in front of the own vehicle in the direction of travel, specifically including image data of the vehicle in front of the own vehicle and image data of the vehicle in front of the vehicle in front of the vehicle in front; A preprocessing module is used to preprocess the image data collected by the camera module. The preprocessing steps include image cropping, image graying, detection of the rear of the vehicle contained in the image, and extraction of the reference point of the own vehicle and the feature point of the rear of the front vehicle from the image; An image analysis module, used to calculate the distance values between the own vehicle and the front vehicle at different times based on the reference point of the own vehicle in the image processed by the preprocessing module and the feature points of the rear of the front vehicle, and also calculate the minimum safe distance value between the own vehicle and the front vehicle based on the image processed by the preprocessing module; The speed measurement module is used to obtain the driving speed value of the own vehicle, and calculate the current driving speed value of the front vehicle in combination with the distance value between the own vehicle and the front vehicle at different times; The early warning module is used to monitor in real time the relationship between the distance value between the own vehicle and the vehicle in front and the minimum safe distance value between the own vehicle and the vehicle in front. When the former is less than or equal to the latter, a warning message is sent to the driver of the own vehicle.
Citation Information
Patent Citations
Safe driving assistance method and system based on change of license plate pixel height
CN109318893A
Anti-rear-end collision warning method based on reverse ST-MRF vehicle tracking algorithm
CN110444014A