Distance calculation method, device, vehicle and storage medium based on vehicle-mounted sensor
By identifying the target vehicle type in the environmental image and combining the on-board sensor data, the initial and secondary correction of distances is achieved, and the problem of low accuracy of distance calculation in the prior art is solved, which improves the accuracy of distance calculation and the safety of the driving assistance system.
Patent Information
- Application Number
- CN202410641188.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-05-22
AI Technical Summary
In the prior art, the accuracy of calculating distance based on camera or lidar is low, resulting in missing targets or inaccurate distance calculations.
By identifying the target vehicle and its vehicle type in the environmental image, calling the pre-trained distance parameter model to obtain distance correction parameters, calculating the preliminary distance with vehicle position information, and correcting the real-time driving data collected by the on-board sensors to obtain a more accurate target distance.
It improves the initial accuracy and dynamic accuracy of distance calculation, reduces the error of distance calculation, and enhances the safety and performance of the driving assistance system.
Smart Images

Figure CN118604834B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and in particular to a distance calculation method, device, vehicle and storage medium based on a vehicle-mounted sensor. Background Art
[0002] With the rapid development of intelligent transportation technology, distance calculation between vehicles has become one of the key technologies to achieve intelligent driving and traffic safety.
[0003] Currently, the vehicle's camera and lidar are used to identify or detect targets in front of the vehicle, and the distance is calculated based on the position information of the identified target. The driving assistance system controls the vehicle based on the calculated distance. However, the image captured by the camera has perspective distortion, which leads to errors in distance calculation. The detection distance and angle of the lidar are limited by its hardware performance and cannot cover all areas that need to be detected, resulting in missed targets or inaccurate distance calculation. Summary of the invention
[0004] In view of this, the present application provides a distance calculation method, device, vehicle and storage medium based on vehicle-mounted sensors to solve the technical problem of low accuracy in distance calculation based on cameras or lidars in the prior art.
[0005] A first aspect of the present application provides a distance calculation method based on a vehicle-mounted sensor, the method comprising:
[0006] Acquire an environmental image of the environment in which the vehicle is located;
[0007] Identifying a target vehicle and a vehicle type of the target vehicle in the environment image;
[0008] Calling a pre-trained distance parameter model to obtain a distance correction parameter based on the vehicle type;
[0009] Determine the position information of the target vehicle in the environment image, and calculate the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information;
[0010] Obtain real-time driving data collected by vehicle-mounted sensors;
[0011] The preliminary distance is corrected based on the real-time driving data to obtain a target distance between the target vehicle and the host vehicle.
[0012] Optionally, the calculating the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information includes:
[0013] Converting the position information into physical position information according to the intrinsic parameters of the image sensor and the triangle similarity principle;
[0014] Correcting the physical location information according to the distance correction parameter to obtain corrected location information;
[0015] The preliminary distance between the target vehicle and the host vehicle is calculated according to the position information of the host vehicle and the corrected position information.
[0016] Optionally, the correcting the preliminary distance based on the real-time driving data to obtain a target distance between the target vehicle and the host vehicle includes:
[0017] Acquire a first driving speed and a first driving direction of the target vehicle;
[0018] Acquire a second driving speed and a second driving direction of the vehicle in the real-time driving data;
[0019] Calculate a relative speed according to the first driving speed, the second driving speed, the first driving direction, and the second driving direction;
[0020] Determine the distance change at each update according to the preset update frequency and the relative speed;
[0021] The preliminary distance is corrected according to the distance change to obtain a target distance between the target vehicle and the host vehicle.
[0022] Optionally, the method further includes:
[0023] Determine whether the target distance is less than a preset distance threshold;
[0024] When the target distance is less than the preset distance threshold, determining the driving risk level according to the target distance;
[0025] Determining a warning prompt level based on the driving risk level;
[0026] A warning is given to the target vehicle according to the warning level.
[0027] Optional,
[0028] Determining the driving risk level according to the target distance includes:
[0029] Calculate the closing speed according to the relative speed and the target distance;
[0030] Calculate the collision time according to the closing speed;
[0031] Determining the road type according to the position information of the host vehicle;
[0032] Obtaining a risk impact factor corresponding to the road type;
[0033] The collision time, the risk impact factor, the first driving speed, and the second driving speed are input into a preset driving risk level calculation model to obtain the driving risk level.
[0034] Optionally, the preset driving risk level calculation model is expressed as follows:
[0035]
[0036] Among them, F represents the driving risk level, which is between 0 and 1, T represents the collision time, α represents the risk impact factor, V1 represents the first driving speed, and V2 represents the second driving speed.
[0037] Optionally, the method further includes:
[0038] The second driving speed and / or the second driving direction are adjusted based on the driving risk level.
[0039] A second aspect of the present application provides a distance calculation device based on a vehicle-mounted sensor, the device comprising:
[0040] An image acquisition module is used to acquire an environmental image of the environment in which the vehicle is located;
[0041] A target recognition module, used to recognize a target vehicle and a vehicle type of the target vehicle in the environment image;
[0042] A model calling module, used to call a pre-trained distance parameter model to obtain a distance correction parameter based on the vehicle type;
[0043] A distance calculation module, used to determine the position information of the target vehicle in the environment image, and calculate the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information;
[0044] A data acquisition module is used to obtain real-time driving data collected by vehicle-mounted sensors;
[0045] The distance correction module is used to correct the preliminary distance based on the real-time driving data to obtain a target distance between the target vehicle and the host vehicle.
[0046] A third aspect of the present application provides a vehicle, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the distance calculation method based on the vehicle-mounted sensor when executing the computer program.
[0047] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the distance calculation method based on the vehicle-mounted sensor are implemented.
[0048] The distance calculation method, device, vehicle and storage medium based on the vehicle-mounted sensor provided in the embodiment of the present application can call the pre-trained distance parameter model by identifying the target vehicle and its vehicle type in the environmental image, and obtain the distance correction parameter based on the vehicle type, so as to calculate the preliminary distance between the target vehicle and the vehicle according to the distance correction parameter and the position information of the target vehicle in the environmental image, thereby realizing the initial correction of the distance, taking into account the different effects of different vehicle types on the distance calculation, thereby improving the initial accuracy of the distance calculation. On the basis of the initial correction, the real-time driving data collected by the vehicle-mounted sensor is further obtained, and the preliminary distance is corrected for the second time based on the real-time driving data to obtain the target distance between the target vehicle and the vehicle. The introduction of real-time driving data enables the distance calculation to take into account the dynamic behavior of the vehicle, thereby greatly improving the accuracy of the distance calculation. The process of secondary correction is not only a fine-tuning of the static distance, but also an accurate tracking of the relative position changes between vehicles in dynamic scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flow chart of a distance calculation method based on a vehicle-mounted sensor shown in an embodiment of the present application;
[0050] Figure 2 is a functional module diagram of a distance calculation device based on a vehicle-mounted sensor shown in an embodiment of the present application;
[0051] Figure 3 It is a structural diagram of a vehicle shown in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more of the listed items.
[0053] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0054] The distance calculation method based on the vehicle-mounted sensor provided in the embodiment of the present invention is executed by the vehicle, and accordingly, the distance calculation device based on the vehicle-mounted sensor runs in the vehicle.
[0055] Figure 1 The flowchart of the distance calculation method based on the vehicle-mounted sensor provided by the embodiment of the present invention is as follows. The distance calculation method based on the vehicle-mounted sensor specifically includes the following steps.
[0056] S11, obtaining an environmental image of the environment in which the vehicle is located.
[0057] The host vehicle refers to the specific vehicle currently being used, operated, or analyzed.
[0058] When the vehicle is started, or when the driving assistance system (e.g., adaptive cruise assistance system, front collision warning system, automatic emergency braking system, etc.) requires an environmental image, the vehicle's control system will issue a command to activate the image sensor installed on the vehicle. After receiving the activation command, the image sensor (e.g., a vehicle-mounted camera or other image acquisition device) starts to supply power and starts its internal image capture mechanism.
[0059] The image sensor begins to capture real-time visual data of the vehicle's surroundings. The real-time visual data can exist in the form of static images, namely environmental images. Environmental images can include environmental information such as road conditions, traffic signs, other vehicles, pedestrians, etc.
[0060] Environmental images can be stored in an onboard storage device for later analysis or playback.
[0061] Through environmental images, the vehicle can perceive surrounding obstacles, traffic signals, other vehicles and pedestrians, and make corresponding driving decisions.
[0062] S12, identifying a target vehicle in the environment image and the vehicle type of the target vehicle.
[0063] The acquired environment image can be preprocessed to improve the accuracy of subsequent target detection. The preprocessing steps may include, but are not limited to: image denoising, contrast enhancement, and color space conversion.
[0064] Object detection algorithms, such as YOLO (You Only Look Once), SSD (Single Shot MultiBox Detector) or Faster R-CNN (Faster Region-based Convolutional Neural Network), can be applied to perform object detection in the environment image or preprocessed environment image. The object detection algorithm generates one or more bounding boxes for each detected target vehicle in the environment image or preprocessed environment image. The bounding box accurately identifies the location and size of the target vehicle in the image.
[0065] Extract vehicle features in the image area corresponding to the bounding box, such as shape, color, texture, edge information, etc., input the extracted features into a pre-trained vehicle type recognition model, and output the vehicle type corresponding to each bounding box through the vehicle type recognition model, such as sedan, truck, motorcycle, bus, etc.
[0066] S13, calling a pre-trained distance parameter model to obtain a distance correction parameter based on the vehicle type.
[0067] When the driver assistance system is started or initialized, the distance parameter model is loaded into the driver assistance system. The distance parameter model is a pre-trained machine learning model that can provide the parameters required to calculate the distance based on the vehicle type.
[0068] The vehicle type of the identified target vehicle is passed as input to the loaded distance parameter model, and the distance parameter model extracts the corresponding distance correction parameters from the pre-learned knowledge according to the input vehicle type.
[0069] It should be understood that the parameters such as the installation position of the image sensor of the host vehicle are known in advance and stored in the vehicle storage device of the host vehicle, and these parameters will not change according to the vehicle type of the target vehicle. In order to better adapt to different scenarios or improve the accuracy of distance calculation, a pre-trained distance parameter model is used to output correction or adjustment parameters related to distance calculation based on the vehicle type of the target vehicle, so as to correct the position information of the target vehicle in the environment image according to these parameters, so as to more accurately estimate the actual distance between the target vehicle and the host vehicle.
[0070] In some optional embodiments, the distance correction parameter may include a position offset correction parameter. Due to the influence of the camera installation position and the viewing angle, the position of the target vehicle in the environment image may deviate from the actual position. In order to correct this deviation, the distance parameter model may provide a position offset correction parameter for each vehicle type, which is used to adjust the position information of the target vehicle in the image to make it closer to the actual position.
[0071] S14, determining the position information of the target vehicle in the environment image, and calculating the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information.
[0072] The position information of the target vehicle in the environment image refers to the coordinate position of the target vehicle in the environment image relative to the image coordinate system (or camera field of view), expressed in pixels.
[0073] The installation position of the image sensor is obtained from the vehicle-mounted storage device of the vehicle. The installation position of the image sensor is the position of the image sensor relative to the vehicle, such as the height of the image sensor from the ground, the offset between the image sensor and the center of the vehicle, etc.
[0074] The initial distance between the target vehicle and the host vehicle is calculated by combining the installation position of the image sensor, the position information of the target vehicle in the environment image, and the distance correction parameters.
[0075] In an optional implementation, the calculating the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information includes:
[0076] Converting the position information into physical position information according to the intrinsic parameters of the image sensor and the triangle similarity principle;
[0077] Correcting the physical location information according to the distance correction parameter to obtain corrected location information;
[0078] The preliminary distance between the target vehicle and the host vehicle is calculated according to the position information of the host vehicle and the corrected position information.
[0079] The bounding box contains the horizontal and vertical coordinate range of the target vehicle in the environment image. The center point coordinates, width and height of the bounding box are extracted, and the center point coordinates are used as the position information of the target vehicle in the environment image.
[0080] The intrinsic parameters of the image sensor describe the mapping relationship between the image coordinate system and the real-world coordinate system. The intrinsic parameters may include focal length, principal point coordinates (the coordinates of the center point of the image), distortion coefficients, etc.
[0081] The image sensor's intrinsic parameters and triangle similarity principle are used to convert the coordinates in the image coordinate system into the coordinates in the camera coordinate system. Based on parameters such as the height and angle between the image sensor and the ground, the coordinates in the camera coordinate system are further converted into the physical position in the world coordinate system, thereby obtaining the target vehicle's physical position information in the real world.
[0082] Due to various factors (such as camera calibration error, image distortion, target vehicle posture change, etc.), the physical position information obtained by direct conversion may have errors. Therefore, it is necessary to use distance correction parameters to correct the physical position information. In specific implementation, the physical position information is corrected by using position offset correction parameters. After obtaining the corrected physical position information, the Euclidean distance between the position information of the vehicle and the corrected target vehicle position information can be calculated as the preliminary distance.
[0083] S15, obtaining real-time driving data collected by the vehicle-mounted sensor.
[0084] The vehicle-mounted sensors may include, but are not limited to, radar sensors, inertial measurement units (IMUs), and global positioning systems (GPS).
[0085] The on-board sensors are used to collect various driving data of the vehicle in real time, such as the driving speed, acceleration, driving direction, location information of the vehicle, and the driving speed, acceleration, driving direction, location information of the target vehicle.
[0086] Since the driving data collected by the on-board sensors may contain noise, interference or outliers, in order to improve the accuracy and reliability of the driving data, and thus improve the accuracy and reliability of distance calculation, it is necessary to filter or smooth the driving data, detect outliers, etc.
[0087] S16, correcting the preliminary distance based on the real-time driving data to obtain a target distance between the target vehicle and the host vehicle.
[0088] Although the distance correction parameters were used to correct the distance during the preliminary calculation, the environmental image cannot capture real-time road conditions, traffic conditions or other dynamic changes. Dynamic information such as the driving speed, acceleration and driving direction of the vehicle and the target vehicle also affects the accurate calculation of the distance. Therefore, the real-time driving data collected by the on-board sensors is used to correct the preliminary distance obtained based on the environmental image again, so as to obtain a more accurate target distance between the target vehicle and the vehicle.
[0089] Optionally, before the preliminary distance is merged with the driving data, the driving data may be verified first, and abnormal or invalid data may be filtered or replaced to ensure the accuracy and reliability of the driving data.
[0090] By fusing the preliminary distance with the driving data and making comprehensive use of information from different sources, the accuracy of distance calculation is improved, providing strong support for subsequent driving decisions and control systems.
[0091] In an optional implementation, the correcting the preliminary distance based on the real-time driving data to obtain the target distance between the target vehicle and the host vehicle includes:
[0092] Acquire a first driving speed and a first driving direction of the target vehicle;
[0093] Acquire a second driving speed and a second driving direction of the vehicle in the real-time driving data;
[0094] Calculate a relative speed according to the first driving speed, the second driving speed, the first driving direction, and the second driving direction;
[0095] Determine the distance change at each update according to the preset update frequency and the relative speed;
[0096] The preliminary distance is corrected according to the distance change to obtain a target distance between the target vehicle and the host vehicle.
[0097] The current driving speed (first driving speed) and current driving direction (first driving direction) of the target vehicle may be acquired through vehicle-mounted sensors or communication with the target vehicle (such as vehicle-to-vehicle communication, V2V).
[0098] The current driving speed (second driving speed) and current driving direction (second driving direction) of the vehicle may be directly obtained through vehicle-mounted sensors (such as speed sensors, steering wheel sensors, etc.).
[0099] The first driving direction and the second driving direction are both calculated from the true north direction. To simplify the calculation, the math.radians() function can be used to convert the first driving direction into the first radian and the second driving direction into the second radian.
[0100] Assuming that V1 represents the first driving speed, V2 represents the second driving speed, θ1 represents the first radian, and θ2 represents the second radian, the relative speed V between the host vehicle and the target vehicle can be calculated by the following formula:
[0101] According to the update frequency of the driver assistance system (such as once per second) and the relative speed between the two vehicles, the distance change at each update is determined, and the distance change = relative speed × time step. The time step is determined by the preset update frequency. In each time step, the distance change is calculated using the new relative speed, and the estimated distance between the target vehicle and the host vehicle is updated. If the relative speed is large (i.e., the two vehicles are approaching or moving away quickly), the change of the preliminary distance will also be faster. If the relative speed is small or zero (i.e., the two vehicles are approaching or stationary), the change of the preliminary distance will be slower or remain unchanged.
[0102] In an optional embodiment, the method further comprises:
[0103] Determine whether the target distance is less than a preset distance threshold;
[0104] When the target distance is less than the preset distance threshold, determining the driving risk level according to the target distance;
[0105] Determining a warning prompt level based on the driving risk level;
[0106] A warning is given to the target vehicle according to the warning level.
[0107] The preset distance threshold is a distance value preset based on factors such as safe driving specifications, road conditions, and vehicle performance.
[0108] After calculating the target distance between the target vehicle and the vehicle, the target distance is compared with the preset distance threshold. When the target distance is less than the preset distance threshold, it is considered that there is a potential collision risk, and the driving risk level needs to be determined based on the target distance. The driving risk level can be determined based on a variety of factors such as the distance difference between the target distance and the preset distance threshold, vehicle speed, relative speed, etc. The larger the distance difference and the slower the speed, the lower the risk level; the smaller the distance difference and the faster the speed, the higher the risk level.
[0109] After determining the driving risk level, the warning level corresponding to the driving risk level is retrieved from the risk warning level database table. The warning level may include multiple levels, such as primary warning, intermediate warning, emergency warning, etc. Different levels of warning prompts correspond to different warning methods and intensities.
[0110] The driver or the vehicle will be given a corresponding warning according to the warning method and intensity corresponding to the warning level. The warning method may include sound prompts, visual prompts (such as warning lights on the dashboard or warning information on the display), tactile prompts (such as vibrations of the steering wheel or seat), etc. For emergency warnings, active safety measures can be taken, such as automatic braking, emergency steering, etc., to avoid potential collision accidents to the greatest extent.
[0111] The above-mentioned optional implementation methods can not only help the driver to more accurately judge the distance to surrounding vehicles and potential risks, but also remind the driver to take corresponding driving operations in time through different levels of early warning prompts, thereby effectively improving driving safety and road safety levels.
[0112] In an optional implementation, determining the driving risk level according to the target distance includes:
[0113] Calculate the closing speed according to the relative speed and the target distance;
[0114] Calculate the collision time according to the closing speed;
[0115] Determining the road type according to the position information of the host vehicle;
[0116] Obtaining a risk impact factor corresponding to the road type;
[0117] The collision time, the risk impact factor, the first driving speed, and the second driving speed are input into a preset driving risk level calculation model to obtain the driving risk level.
[0118] The closing speed refers to the component of the relative speed between the host vehicle and the target vehicle in the target distance direction. Assuming that the target direction is from the target vehicle to the host vehicle, the closing speed V0 = V*cos(|θ2-θ1|) / 2. The collision time T can be calculated using the following formula: T = D / V0, where D represents the target distance.
[0119] The location information of the vehicle (such as GPS data or map data) is obtained, and the type of road currently being traveled is determined based on the location information. Road types may include highways, city streets, rural roads, curves, intersections, etc. Different road types have different driving rules and risk levels, which will affect the assessment of driving risk levels. Driving risk levels can be quantitative (such as numbers from 1 to 10) or qualitative (such as low, medium, and high).
[0120] Different road types correspond to different risk impact factors, and the label values corresponding to the road types are obtained, for example, 0 = highway, 1 = urban road, 2 = rural road, 3 = parking lot. The risk impact factor is a value between 0 and 1, where 0 represents the most dangerous road type (such as a busy highway) and 1 represents the safest road type (such as an empty parking lot).
[0121] In an optional implementation, the preset driving risk level calculation model is expressed as follows:
[0122]
[0123] Among them, F represents the driving risk level, which is between 0 and 1, T represents the collision time, α represents the risk impact factor, V1 represents the first driving speed, and V2 represents the second driving speed.
[0124] Optionally, after the driving risk level is calculated, the driving risk level may be normalized or standardized using linear transformation, logarithmic transformation, sigmoid function, etc., so as to map the driving risk level between 0 and 1, where 0 represents no risk (or very low risk) and 1 represents very high risk.
[0125] Different application scenarios may have different tolerances or requirements for risks. By mapping the driving risk level between 0 and 1, it not only provides an intuitive scale that enables the assisted driving system to more easily understand and interpret the risk level, but also makes it easier to set risk thresholds or take corresponding actions according to the needs of specific applications.
[0126] The above-mentioned optional implementation mode can more comprehensively and accurately assess the driving risk level through factors such as the target distance between the vehicle and the target vehicle, the driving speed and direction of the vehicle, the driving speed and direction of the target vehicle, and the road type, thereby providing the vehicle with more effective early warning and auxiliary decision-making information and improving the driving safety of the vehicle.
[0127] In an optional embodiment, after the driving risk level is calculated, the second driving speed and / or second driving direction of the vehicle can be further adjusted according to the driving risk level, thereby achieving automatic or semi-automatic driving control, improving driving safety and reducing potential accident risks.
[0128] If the driving risk level is high, the driver may be prompted to reduce the second driving speed and / or change the second driving direction, or the second driving speed and / or the second driving direction may be automatically reduced to reduce the risk of collision. The second driving speed may be reduced by sending a deceleration instruction to the control system of the vehicle, or directly through the automatic braking system of the vehicle. The second driving direction may be changed by sending a steering instruction to the steering control system of the vehicle, or through the automatic steering system of the vehicle.
[0129] If the driving risk level is low, the current driving speed of the vehicle can be maintained. The driver can also be prompted to increase the second driving speed, or the second driving speed can be automatically increased to improve driving efficiency. The second driving speed can be automatically increased by sending an increase speed instruction to the control system of the vehicle.
[0130] By adjusting the second driving speed and / or the second driving direction according to the driving risk level, it is possible to participate in the driving process more actively, thereby improving driving safety and efficiency.
[0131] By identifying the target vehicle and its vehicle type in the environmental image, the pre-trained distance parameter model can be called, and the distance correction parameters can be obtained based on the vehicle type. Then, according to the distance correction parameters and the position information of the target vehicle in the environmental image, the preliminary distance between the target vehicle and the host vehicle is calculated, and the initial correction of the distance is realized. The different effects of different vehicle types on the distance calculation are considered, thereby improving the initial accuracy of the distance calculation. On the basis of the initial correction, the real-time driving data collected by the on-board sensor is further obtained, and the preliminary distance is corrected for the second time based on the real-time driving data to obtain the target distance between the target vehicle and the host vehicle. The introduction of real-time driving data enables the distance calculation to take into account the dynamic behavior of the vehicle, thereby greatly improving the accuracy of the distance calculation.
[0132] By combining the initial calibration and the secondary calibration, the present application can significantly improve the accuracy of distance calculation. The secondary calibration process is not only a fine-tuning of the static distance, but also an accurate tracking of the relative position changes between vehicles in dynamic scenes.
[0133] Accurate distance information is crucial for collision warning, automatic obstacle avoidance, path planning and other functions. Therefore, the application of this application can effectively improve the safety and performance of the driver assistance system. In addition, this application is not limited to a specific environment or vehicle type and has strong adaptability and robustness. Whether in urban roads, highways or complex traffic scenes, it can effectively identify the target vehicle and accurately calculate the distance.
[0134] Figure 2 It is a structural diagram of a distance calculation device based on a vehicle-mounted sensor provided in an embodiment of the present invention.
[0135] In some embodiments, the distance calculation device 20 based on the vehicle-mounted sensor may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the distance calculation device 20 based on the vehicle-mounted sensor may be stored in the memory of the vehicle and executed by at least one processor to execute (see Figure 1 Description) Function for distance calculation based on vehicle-mounted sensors.
[0136] In this embodiment, the distance calculation device 20 based on the vehicle-mounted sensor can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an image acquisition module 201, a target recognition module 202, a model call module 203, a distance calculation module 204, a data acquisition module 205, a distance correction module 206, an early warning module 207 and a vehicle adjustment module 208. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0137] The image acquisition module 201 is used to acquire an environmental image of the environment in which the vehicle is located;
[0138] The target recognition module 202 is used to recognize the target vehicle and the vehicle type of the target vehicle in the environment image;
[0139] The model calling module 203 is used to call a pre-trained distance parameter model to obtain a distance correction parameter based on the vehicle type;
[0140] The distance calculation module 204 is used to determine the position information of the target vehicle in the environment image, and calculate the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information;
[0141] The data acquisition module 205 is used to acquire real-time driving data collected by vehicle-mounted sensors;
[0142] The distance correction module 206 is used to correct the preliminary distance based on the real-time driving data to obtain a target distance between the target vehicle and the host vehicle.
[0143] The early warning prompt module 207 is used to determine whether the target distance is less than a preset distance threshold; when the target distance is less than the preset distance threshold, determine the driving risk level according to the target distance; determine the early warning prompt level based on the driving risk level; and issue an early warning prompt to the target vehicle according to the early warning prompt level.
[0144] The vehicle adjustment module 208 is configured to adjust the second driving speed and / or the second driving direction based on the driving risk level.
[0145] It should be understood that the various variations and specific embodiments of the distance calculation method based on the vehicle-mounted sensor provided in the above embodiments are also applicable to the distance calculation device based on the vehicle-mounted sensor in this embodiment. Through the detailed description of the distance calculation method based on the vehicle-mounted sensor, those skilled in the art can clearly understand the implementation process of the distance calculation device based on the vehicle-mounted sensor in this embodiment. For the sake of brevity of the specification, it will not be described in detail here.
[0146] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, all or part of the steps of the distance calculation method based on the vehicle-mounted sensor are implemented.
[0147] See also Figure 3 In the preferred embodiment of the present application, the vehicle 3 includes a memory 31 , at least one processor 32 , an image sensor 35 , an onboard sensor 34 and at least one communication bus 35 .
[0148] Those skilled in the art should understand that Figure 3 The structure of the vehicle shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The vehicle 3 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components.
[0149] In some embodiments, the vehicle 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The vehicle 3 may also include a client device, which includes but is not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smart phone, digital camera, etc.
[0150] It should be noted that the vehicle 3 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0151] In some embodiments, the memory 31 stores a computer program, and when the computer program is executed by the at least one processor 32, all or part of the steps in the distance calculation method based on the vehicle-mounted sensor are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc memory, magnetic disk memory, magnetic tape memory, or any other computer-readable medium that can be used to carry or store data. Further, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, and the like.
[0152] In some embodiments, the at least one processor 32 is the control core (ControlUnit) of the vehicle 3, and uses various interfaces and lines to connect various components of the entire vehicle 3, and executes various functions and processes data of the vehicle 3 by running or executing programs or modules stored in the memory 31, and calling data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the distance calculation method based on the vehicle sensor described in the embodiment of the present application; or implements all or part of the functions of the distance calculation device based on the vehicle sensor. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.
[0153] In some embodiments, the at least one communication bus 35 is configured to realize connection and communication between the memory 31 and the at least one processor 32, etc. Although not shown, the vehicle 3 may also include a power source (such as a battery) for powering various components. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can realize functions such as management of charging, discharging, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, etc. The vehicle 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0154] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a vehicle (which can be a personal computer, a vehicle, or a network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0156] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Claims
1. A distance calculation method based on a vehicle-mounted sensor, characterized in that: The method comprises: Acquire an environmental image of the environment in which the vehicle is located; Identifying a target vehicle and a vehicle type of the target vehicle in the environment image; Calling a pre-trained distance parameter model to obtain a distance correction parameter based on the vehicle type, wherein due to the influence of the camera installation position and the viewing angle, the position of the target vehicle in the environment image deviates from the actual position, and the distance correction parameter is used to correct the deviation; Determine the position information of the target vehicle in the environment image, and calculate the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information; Obtain real-time driving data collected by vehicle-mounted sensors; Correcting the preliminary distance based on the real-time driving data to obtain a target distance between the target vehicle and the host vehicle; The step of calculating the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information includes: Converting the position information into physical position information according to the intrinsic parameters of the image sensor and the triangle similarity principle; Correcting the physical location information according to the distance correction parameter to obtain corrected location information; Calculating a preliminary distance between the target vehicle and the host vehicle according to the position information of the host vehicle and the corrected position information; The correcting the preliminary distance based on the real-time driving data to obtain the target distance between the target vehicle and the host vehicle comprises: Acquire a first driving speed and a first driving direction of the target vehicle; Acquire a second driving speed and a second driving direction of the vehicle in the real-time driving data; Calculate a relative speed according to the first driving speed, the second driving speed, the first driving direction, and the second driving direction; Determine the distance change at each update according to the preset update frequency and the relative speed; The preliminary distance is corrected according to the distance change to obtain a target distance between the target vehicle and the host vehicle.
2. The distance calculation method based on the vehicle-mounted sensor according to claim 1 is characterized in that: The method further comprises: Determine whether the target distance is less than a preset distance threshold; When the target distance is less than the preset distance threshold, determining the driving risk level according to the target distance; Determining a warning prompt level based on the driving risk level; A warning is given to the target vehicle according to the warning level.
3. The distance calculation method based on the vehicle-mounted sensor according to claim 2 is characterized in that: Determining the driving risk level according to the target distance includes: Calculate the closing speed according to the relative speed and the target distance; Calculate the collision time according to the closing speed; Determining the road type according to the position information of the host vehicle; Obtaining a risk impact factor corresponding to the road type; The collision time, the risk impact factor, the first driving speed, and the second driving speed are input into a preset driving risk level calculation model to obtain the driving risk level.
4. The distance calculation method based on the vehicle-mounted sensor according to claim 3 is characterized in that: The preset driving risk level calculation model is expressed as follows: , Among them, F represents the driving risk level, which is between 0 and 1, T represents the collision time, α represents the risk impact factor, V1 represents the first driving speed, and V2 represents the second driving speed.
5. The distance calculation method based on the vehicle-mounted sensor according to any one of claims 3 to 4, characterized in that: The method further comprises: The second driving speed and / or the second driving direction are adjusted based on the driving risk level.
6. A distance calculation device based on a vehicle-mounted sensor, characterized in that: The distance calculation method based on a vehicle-mounted sensor applied to any one of claims 1 to 4 above, the device comprising: An image acquisition module is used to acquire an environmental image of the environment in which the vehicle is located; A target recognition module, used to recognize a target vehicle and a vehicle type of the target vehicle in the environment image; A model calling module, used to call a pre-trained distance parameter model to obtain a distance correction parameter based on the vehicle type; A distance calculation module, used to determine the position information of the target vehicle in the environment image, and calculate the preliminary distance between the target vehicle and the host vehicle according to the distance correction parameter and the position information; A data acquisition module is used to obtain real-time driving data collected by vehicle-mounted sensors; The distance correction module is used to correct the preliminary distance based on the real-time driving data to obtain a target distance between the target vehicle and the host vehicle.
7. A vehicle, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the distance calculation method based on the vehicle-mounted sensor as claimed in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the distance calculation method based on a vehicle-mounted sensor as claimed in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and device for controlling vehicle distance, medium and control equipment
CN110091871A
Vehicle position correction method and system, storage medium and terminal
CN110991232A
Vehicle collision early warning method and device, electronic equipment and storage medium
CN115635977A
Vehicle driving early warning method and device, storage medium and electronic equipment
CN116834733A
Early warning system and method for preventing vehicle collision
CN117601859A