Distance measurement method and device under ramp conditions, storage medium and electronic equipment
By identifying the changes in the position relationship between the weekly and the target vehicle, the slope value is calculated to improve the distance measurement accuracy of the intelligent driving system, the problem of low visual distance measurement accuracy in the ramp scene is solved, and the safety of vehicle decision-making and control is enhanced .
Patent Information
- Application Number
- CN202411055968.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-02
AI Technical Summary
In intelligent driving systems, visual ranging method has low accuracy in ramp scenarios, which affects vehicle decision-making and control safety.
By obtaining the road image sequence collected by the bicycle, identifying the perimeter and target vehicles that meet the driving conditions, using the change in the positional relationship between the perimeter and target vehicles to determine the slope value, and then calculating the distance between the vehicle and the target vehicle to improve the distance measurement Accuracy.
The accuracy of vehicle ranging is improved under ramp operating conditions, the accuracy of visual ranging methods in ramp scenarios is solved, and the safety of intelligent driving systems is enhanced.
Smart Images

Figure CN118584463B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and more specifically, to a distance measurement method and device, a storage medium, and an electronic device under slope conditions. Background Art
[0002] In the intelligent driving system, the perception system is the basic link for subsequent decision-making and control. Sensors such as cameras can be used to obtain information such as road environment. Among them, monocular cameras are widely installed in smart vehicles due to their higher applicability.
[0003] However, when an intelligent vehicle is driving on a complex road environment such as a ramp, the pitch angle of the vehicle changes with the change of the road, resulting in a large error in visual ranging, which in turn causes the vehicle to brake incorrectly or late based on visual ranging, affecting the safety of intelligent driving. That is, the visual ranging method provided by the relevant technology has a low accuracy problem in ramp scenarios.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a distance measurement method and device, a storage medium and an electronic device under ramp conditions, so as to at least solve the technical problem that the visual distance measurement method provided by the related art has low accuracy in ramp scenarios.
[0006] According to one aspect of an embodiment of the present application, a distance measurement method under a ramp condition is provided, comprising: obtaining a road image sequence collected by an ego vehicle, wherein the road image sequence includes road images collected in multiple time frames respectively; in a case where the road image does not include a lane line object that meets an image quality condition, determining a surrounding vehicle that meets a driving condition from a plurality of vehicles included in the road image, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and travels to a first ramp before the ego vehicle; determining a first slope value of the first ramp according to a change in a first positional relationship between the ego vehicle and the surrounding vehicle; in a case where the ego vehicle travels to the first ramp and a target vehicle traveling on a second ramp is detected from the road image sequence, determining a second slope value of the second ramp according to the first slope value and a change in a second positional relationship between the ego vehicle and the target vehicle; determining a target vehicle distance between the ego vehicle and the target vehicle according to the first slope value, the second slope value and a geometric positional relationship between the ego vehicle and the target vehicle.
[0007] According to another aspect of an embodiment of the present application, a distance measuring device under a ramp condition is further provided, comprising: an acquisition unit, for acquiring a road image sequence acquired by a self-vehicle, wherein the road image sequence includes road images acquired respectively in a plurality of time frames; a surrounding vehicle determination unit, for determining a surrounding vehicle that meets a driving condition from a plurality of vehicles included in the road image when the road image does not include a lane line object that meets an image quality condition, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and has traveled to a first ramp before the self-vehicle; a first slope determination unit, for determining a first slope according to the relationship between the self-vehicle and the surrounding vehicle. a second slope determining unit, for determining, when the self-vehicle travels to the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, a second slope value of the second ramp according to the first slope value and a change in the second positional relationship between the self-vehicle and the target vehicle; and a vehicle distance determining unit, for determining a target vehicle distance between the self-vehicle and the target vehicle according to the first slope value, the second slope value and the geometric positional relationship between the self-vehicle and the target vehicle.
[0008] Optionally, the first slope determination unit includes: a longitudinal distance acquisition module, used to acquire M longitudinal distances according to the M road images in the road image sequence, wherein the M longitudinal distances correspond to the M road images one by one, the longitudinal distance is the distance between the surrounding vehicle and the self-vehicle along the driving direction, and the M is an integer greater than 1; a reference distance estimation module, used to estimate the speed of the surrounding vehicle in the M time frames using the M longitudinal distances, obtain M reference speeds corresponding to the M time frames, and use the M reference speeds to respectively determine the M reference longitudinal distances between the self-vehicle and the surrounding vehicle; a first slope value determination module, used to respectively calculate the first difference between the M longitudinal distances and the M reference longitudinal distances, and when the first difference between the i-th longitudinal distance and the i-th reference longitudinal distance is greater than a first threshold, determine the first slope value according to the i-th longitudinal distance, the i-th reference speed and the i-th reference longitudinal distance, wherein the i is an integer greater than or equal to 1 and less than or equal to M.
[0009] Optionally, the first slope value determination module is further used to: obtain a first distance traveled by the surrounding vehicle from the i-1th time frame to the i-th time frame according to the i-1th reference speed corresponding to the i-1th time frame and the length of the time frame interval between the time frames; obtain a second distance traveled by the self-vehicle from the i-1th time frame to the i-th time frame according to the self-vehicle speed corresponding to the i-1th time frame and the length of the time frame interval; obtain a first difference between the i-th longitudinal distance and the length of the surrounding vehicle, and obtain a second difference between the i-1th longitudinal distance and the second distance; obtain a third difference between the first difference and the second difference, and determine the first slope value according to the ratio of the third difference to the fourth difference, wherein the fourth difference is the difference between the first distance and the length of the surrounding vehicle.
[0010] Optionally, the longitudinal distance acquisition module is further used to: acquire the focal length of the image acquisition device used to acquire the road image sequence; acquire one of the road images as the current road image from the M road images; acquire the vehicle width ratio between the vehicle width length of the surrounding vehicle and the pixel width corresponding to the surrounding vehicle, wherein the pixel width is determined based on the image area matching the surrounding vehicle in the current road image; determine the current longitudinal distance matching the current road image based on the product of the vehicle width ratio and the focal length.
[0011] Optionally, the acquisition unit includes: a feature point set acquisition module, which is used to acquire a feature point set indicating the lane line object in the road image when the road image includes a lane line object that meets the image quality condition; a variation coefficient acquisition module, which is used to acquire a feature variation coefficient of the feature point set based on the feature point set that matches the plurality of road images respectively; and a first slope value calculation module, which is used to determine the first slope value based on the feature variation coefficient.
[0012] Optionally, the above-mentioned first slope determination unit also includes: a reference slope value acquisition module, used to obtain a reference slope value detected by the above-mentioned vehicle; a first slope value updating module, used to update the above-mentioned first slope value according to a weighted sum result of the above-mentioned reference slope value and the above-mentioned first slope value when the difference between the above-mentioned first slope value and the above-mentioned reference slope value is greater than a second threshold.
[0013] Optionally, the reference slope value acquisition module is further used to: determine the lane line vanishing point based on the lane line object included in the road image, and obtain the reference slope value using the image coordinates of the lane line vanishing point and the calibrated vanishing point corresponding to the road image, wherein the lane line vanishing point is the intersection of the lane line object corresponding to the lane of the ego vehicle in the road image, and the calibrated vanishing point is used to calibrate the roll angle of the ego vehicle; obtain the ego vehicle acceleration of the ego vehicle object according to the current vehicle speed of the ego vehicle, and obtain the reference slope value according to the ego vehicle acceleration and longitudinal acceleration; obtain the reference slope value according to the pitch angular velocity of the ego vehicle.
[0014] Optionally, the second slope determination unit comprises: a target longitudinal distance acquisition module, used to acquire P target longitudinal distances respectively according to the P road images in the road image sequence, wherein the P target longitudinal distances correspond to the P road images one by one, the target longitudinal distance is the distance between the self-vehicle and the target vehicle determined according to the focal length of the image acquisition device, the vehicle width length of the target vehicle, and the pixel width corresponding to the target vehicle, and the P is an integer greater than 1; an estimated distance estimation module, used to estimate the speed of the target vehicle in the P time frames using the P target longitudinal distances, and obtain the speed corresponding to the P time frames. The module comprises: a first slope value determining module, a second slope value determining module, and a second slope value determining module, wherein the first slope value is determined according to the qth target longitudinal distance, the qth estimated speed, the qth estimated longitudinal distance and the first slope value, wherein the qth estimated speed corresponds to the P estimated speeds respectively corresponding to the P estimated speeds between the self-vehicle and the target vehicle, and the P estimated longitudinal distances between the self-vehicle and the target vehicle are determined respectively by using the P estimated speeds; a second slope value determining module, wherein the second slope value determining module, is used to calculate the second differences between the P target longitudinal distances and the P estimated longitudinal distances respectively, and when the second difference between the qth target longitudinal distance and the qth estimated longitudinal distance is greater than a third threshold value, the second slope value is determined according to the qth target longitudinal distance, the qth estimated speed, the qth estimated longitudinal distance and the first slope value, wherein the q is an integer greater than or equal to 1 and less than or equal to P.
[0015] Optionally, the second slope value determination module is further used to: obtain a third distance traveled by the target vehicle from the q-1th time frame to the q-th time frame according to the q-1th estimated speed corresponding to the q-1th time frame and the length of the time frame interval between the time frames; obtain a fourth distance traveled by the target vehicle from the q-1th time frame to the q-th time frame according to the vehicle speed corresponding to the q-1th time frame and the length of the time frame interval; obtain a first product between the fourth distance and the cosine value corresponding to the first slope value, and obtain a fifth difference between the q-1th target longitudinal distance and the first product; determine the second slope value according to the ratio of the sixth difference to the third distance, wherein the sixth difference is the difference between the qth target longitudinal distance and the fifth difference.
[0016] Optionally, the above-mentioned vehicle distance determination unit includes: a turning point determination module, used to determine the ramp turning point between the above-mentioned first ramp and the above-mentioned second ramp; a current distance acquisition module, used to obtain the current longitudinal distance between the above-mentioned self-vehicle and the above-mentioned target vehicle based on the current road image captured in the current time frame, wherein the above-mentioned current longitudinal distance is the distance between the above-mentioned self-vehicle and the above-mentioned target vehicle determined according to the focal length of the image acquisition device, the vehicle width length of the above-mentioned target vehicle, and the pixel width corresponding to the above-mentioned target vehicle; a parameter calculation module, used to obtain a first ratio between the fifth distance and the cosine value corresponding to the above-mentioned first slope value, and obtain a seventh difference between the above-mentioned current longitudinal distance and the above-mentioned fifth distance, wherein the above-mentioned fifth distance is the distance between the above-mentioned self-vehicle and the above-mentioned ramp turning point; a target vehicle distance determination module, used to sum the above-mentioned first ratio and the second ratio to obtain the above-mentioned target vehicle distance, wherein the above-mentioned second ratio is the ratio between the above-mentioned seventh difference and the cosine value corresponding to the above-mentioned second slope value.
[0017] Optionally, the turning point determination module is further used to: when the lane line object is included in the road image, obtain a set of feature points indicating the lane line object in the road image; determine the ramp turning point based on the set of feature points respectively matched with the plurality of road images; when the lane line object is not included in the road image, obtain the longitudinal distance between the surrounding vehicle and the self-vehicle in the road image, and calculate the distance change rate corresponding to the longitudinal distance in each time frame; determine the time frame corresponding to which the distance change rate is greater than a preset change threshold as a turning time frame, and determine the position of the surrounding vehicle corresponding to the turning time frame as the ramp turning point.
[0018] Optionally, the surrounding vehicle determination unit further includes: a first ramp detection module, for determining that the ego vehicle is traveling on the first ramp when it is detected that the ego vehicle is in a bumpy state and the bump angles corresponding to the ego vehicle for N consecutive frames meet a first condition; and a second ramp detection module, for determining that the target vehicle is traveling on the second ramp when it is detected that the ego vehicle is in a bumpy state and the error value of the compensation result of ranging compensation performed under the bumpy state meets a second condition.
[0019] According to another aspect of the embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the distance measurement method under the above-mentioned ramp condition when running.
[0020] According to another aspect of the embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer instruction being stored in a computer-readable storage medium. A processor of a computer device reads the computer program / instruction from the computer-readable storage medium, and the processor executes the computer program / instruction, so that the computer device performs the distance measurement method under the above ramp condition.
[0021] According to another aspect of an embodiment of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the distance measurement method under the ramp condition through the computer program.
[0022] In an embodiment of the present application, a road image sequence collected by the vehicle is obtained, wherein the road image sequence includes road images collected by multiple time frames respectively; when the road image does not include a lane line object that meets the image quality condition, a surrounding vehicle that meets the driving condition is determined from multiple vehicles included in the road image, wherein the surrounding vehicle is a vehicle in an adjacent lane and travels to the first ramp before the vehicle; the first slope value of the first ramp is determined according to the change of the first position relationship between the vehicle and the surrounding vehicle; when the vehicle travels to the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, the second slope value of the second ramp is determined according to the first slope value and the change of the second position relationship between the vehicle and the target vehicle; the target vehicle distance between the vehicle and the target vehicle is determined according to the first slope value, the second slope value and the geometric position relationship between the vehicle and the target vehicle. Thus, the accuracy of vehicle distance measurement under ramp conditions is improved.
[0023] The lane line of the road on which the ego vehicle is traveling is judged by the road images collected by the ego vehicle at multiple time frames. When the quality of the lane line does not meet the preset quality conditions, the surrounding vehicles are identified through the road images, and the first slope value of the slope on which the surrounding vehicles and the ego vehicle are traveling is determined by using the change in the positional relationship between the surrounding vehicles and the ego vehicle that travels to the first ramp before. When the ego vehicle is traveling on the ramp and it is desired to identify the target vehicle on the second ramp, the second slope value corresponding to the ramp where the target vehicle is located can be determined by using the first slope value and the change in the positional relationship between the ego vehicle and the target vehicle. Finally, the distance between the two vehicles under the ramp condition is determined by using the first slope value, the second slope value and the positional relationship between the ego vehicle and the target vehicle. The above method solves the technical problem that the visual ranging method provided by the relevant technology has low accuracy in the ramp scene. When the quality of the lane line does not meet the preset quality, the slope value of the ramp where the ego vehicle is located can be estimated based on the surrounding vehicles, which increases the application scenarios of the method. The slope position relationship between the ego vehicle and the target vehicle is used to perform ranging compensation on the two vehicles, thereby improving the accuracy of slope ranging. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0025] Figure 1 is a schematic diagram of a hardware environment of an optional distance measurement method under a ramp condition according to an embodiment of the present application;
[0026] Figure 2 is a flow chart of an optional distance measurement method under a ramp condition according to an embodiment of the present application;
[0027] Figure 3 is a schematic diagram of an optional distance measurement method under a ramp condition according to an embodiment of the present application;
[0028] Figure 4 is a schematic diagram of another optional distance measurement method under a ramp condition according to an embodiment of the present application;
[0029] Figure 5 is a schematic diagram of another optional distance measurement method under a ramp condition according to an embodiment of the present application;
[0030] Figure 6 is a schematic diagram of another optional distance measurement method under a ramp condition according to an embodiment of the present application;
[0031] Figure 7 is a schematic diagram of another optional distance measurement method under a ramp condition according to an embodiment of the present application;
[0032] Figure 8 is a schematic diagram of an optional distance measuring device under a ramp condition according to an embodiment of the present application;
[0033] Fig. 9 is a schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] According to one aspect of an embodiment of the present application, a distance measurement method under a ramp condition is provided. As an optional implementation, the distance measurement method under a ramp condition can be applied to, but is not limited to, Figure 1 The distance measurement system under the ramp condition in the hardware environment shown. Optionally, the distance measurement method under the ramp condition can be applied to a vehicle terminal. Figure 1A side view of a vehicle terminal 101 is shown, and the vehicle terminal 101 is set on a travel surface 113 (e.g., a road surface with a slope) and is capable of traversing the travel surface 113. The vehicle terminal 101 includes an onboard navigation system 103, a computer-readable storage device or medium (memory) 102 including a digitized road map 104, a spatial monitoring system 117, a vehicle controller 109, a GPS (global positioning system) sensor 110, an HMI (human / machine interface) device 111, and also includes an autonomous controller 112 and a telematics controller 114. The vehicle terminal 101 may include, but is not limited to, commercial vehicles, industrial vehicles, agricultural vehicles, passenger vehicles, all-terrain vehicles, personal mobile devices, robots, and similar forms of mobile platforms to achieve the purpose of the present application.
[0037] In one embodiment, the spatial monitoring system 117 includes: one or more spatial sensors and systems arranged to monitor the visible area 105 in front of the vehicle terminal 101; and a spatial monitoring controller 118. The spatial sensors used to monitor the visible area 105 include, for example, a lidar sensor 106, a radar sensor 107, a camera 108, and the like. The placement of the spatial sensors allows the spatial monitoring controller 118 to monitor traffic flow, including approaching vehicles, intersections, lane markings, and other objects around the vehicle terminal 101. The spatial sensors of the spatial monitoring system 117 may include object positioning sensing devices. The lidar sensor 106 uses pulsed and reflected laser beams to measure the range or distance to an object. The radar sensor 107 uses radio waves to determine the range, angle, and / or speed of an object. The camera 108 includes an image sensor, a lens, and a camera controller.
[0038] The camera 108 is advantageously mounted and positioned on the vehicle terminal 101 in a position that allows capturing images of the visible area 105, wherein at least part of the visible area 105 includes a portion of the travel surface 113 in front of the vehicle terminal 101 and including the trajectory of the vehicle terminal 101. The visible area 105 may also include the surrounding environment. Other cameras (not shown) may also be used, for example, including a second camera disposed on the rear portion or side portion of the vehicle terminal 101 to monitor the rear of the vehicle terminal 101 and one of the right or left sides of the vehicle terminal 101. The camera 108 may collect road information to generate a road image sequence during the driving of the vehicle terminal 101.
[0039] The autonomous controller 112 is configured to implement autonomous driving or advanced driver assistance system (ADAS) vehicle functionality. Such functionality may include a vehicle onboard control system capable of providing a certain level of driving automation. Driving automation may include a series of dynamic driving and vehicle operations. Driving automation may include simultaneous automatic control of vehicle driving functions (including steering, acceleration and braking), wherein the driver abandons control of the vehicle for a period of time during the journey. Driving automation may include simultaneous automatic control of vehicle driving functions (including steering, acceleration and braking), wherein the driver abandons control of the vehicle terminal 101 for the entire journey. Driving automation includes hardware and a controller configured to monitor the spatial environment in various driving modes to perform various driving tasks during dynamic vehicle operations. By way of non-limiting example, autonomous vehicle functions include adaptive cruise control (ACC) operations, lane guidance and lane keeping operations, lane change operations, steering assistance operations, object avoidance operations, parking assistance operations, vehicle braking operations, vehicle speed and acceleration operations, vehicle lateral motion operations, for example, as part of lane guidance, lane keeping and lane change operations, etc.
[0040] The autonomous controller can be equipped with an operating system and an automatic driving system. The operating system can be responsible for the management of the hardware resources (including sensors, system buses, networks, etc.) of the vehicle terminal 101 and the scheduling of computing resources. The automatic driving system can implement various algorithms required for automatic driving, including positioning, environmental perception, path planning and control, etc., and can make decisions in situations such as driving on curves, driving in a straight line, driving on complex roads, changing lanes, etc. The autonomous controller can achieve ranging under slope conditions while the vehicle is driving in the following manner:
[0041] S1, obtaining a road image sequence collected by the vehicle, wherein the road image sequence includes road images collected respectively in multiple time frames;
[0042] S2, when the road image does not include a lane line object that meets the image quality condition, determine a surrounding vehicle that meets the driving condition from multiple vehicles included in the road image, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and has traveled to the first ramp before the own vehicle;
[0043] S3, determining a first slope value of a first slope according to a change in a first position relationship between the own vehicle and the surrounding vehicle;
[0044] S4, when the ego vehicle travels on the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, determining a second slope value of the second ramp according to the first slope value and a change in a second positional relationship between the ego vehicle and the target vehicle;
[0045] S5, determining a target vehicle distance between the own vehicle and the target vehicle according to the first slope value, the second slope value and the geometric position relationship between the own vehicle and the target vehicle.
[0046] The vehicle terminal 101 may include a telematics controller 114 including a wireless telematics communication system capable of performing off-vehicle communications, including communications with a communication network 115 having wireless and wired communication capabilities. Alternatively or additionally, the telematics controller 114 directly performs off-vehicle communications by communicating with an off-board server 116 via the communication network 115.
[0047] In an optional embodiment, the vehicle terminal 101 can collect road images in real time using sensors such as cameras 108 through the space monitoring system 117. The road images can contain surrounding road condition data, such as movement information of surrounding vehicles, pedestrians and other traffic participants, and location information of static obstacles such as roadblocks and road fences. The collected road image sequence can be stored in the memory 102. Due to the limited storage space of the memory 102, based on storage efficiency considerations, images with higher priority can be stored in the memory 102, and a large amount of low-priority data can be stored in the non-recording server 116 via the communication network 115 using the telematics controller 114, for example, the road image sequence collected within a preset time or the road image sequence collected under ramp conditions is stored in the memory 102. When the vehicle terminal 101 is under ramp conditions, the distance measurement method under ramp conditions can be executed in the vehicle-mounted server or the non-vehicle server 116, and the server saves the obtained target vehicle distance so that the autonomous control 112 can call it when making subsequent driving decisions or vehicle control, and plan a safer and more accurate navigation path.
[0048] In an embodiment of the present application, a road image sequence collected by the vehicle is obtained, wherein the road image sequence includes road images collected by multiple time frames respectively; when the road image does not include a lane line object that meets the image quality condition, a surrounding vehicle that meets the driving condition is determined from multiple vehicles included in the road image, wherein the surrounding vehicle is a vehicle in an adjacent lane and travels to the first ramp before the vehicle; the first slope value of the first ramp is determined according to the change of the first position relationship between the vehicle and the surrounding vehicle; when the vehicle travels to the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, the second slope value of the second ramp is determined according to the first slope value and the change of the second position relationship between the vehicle and the target vehicle; the target vehicle distance between the vehicle and the target vehicle is determined according to the first slope value, the second slope value and the geometric position relationship between the vehicle and the target vehicle. Thus, the accuracy of vehicle distance measurement under ramp conditions is improved.
[0049] The lane line of the road on which the ego vehicle is traveling is judged by the road images collected by the ego vehicle at multiple time frames. When the quality of the lane line does not meet the preset quality conditions, the surrounding vehicles are identified through the road images, and the first slope value of the slope on which the surrounding vehicles and the ego vehicle are traveling is determined by using the change in the positional relationship between the surrounding vehicles and the ego vehicle that travels to the first ramp before. When the ego vehicle is traveling on the ramp and it is desired to identify the target vehicle on the second ramp, the second slope value corresponding to the ramp where the target vehicle is located can be determined by using the first slope value and the change in the positional relationship between the ego vehicle and the target vehicle. Finally, the distance between the two vehicles under the ramp condition is determined by using the first slope value, the second slope value and the positional relationship between the ego vehicle and the target vehicle. The above method solves the technical problem that the visual ranging method provided by the relevant technology has low accuracy in the ramp scene. When the quality of the lane line does not meet the preset quality, the slope value of the ramp where the ego vehicle is located can be estimated based on the surrounding vehicles, which increases the application scenarios of the method. The slope position relationship between the ego vehicle and the target vehicle is used to perform ranging compensation on the two vehicles, thereby improving the accuracy of slope ranging.
[0050] In an optional embodiment, if Figure 2 As shown, the distance measurement method under the above ramp working condition includes the following steps:
[0051] S202, obtaining a road image sequence collected by the vehicle, wherein the road image sequence includes road images collected respectively in a plurality of time frames;
[0052] It should be noted that during the driving process of the vehicle, the camera sensor can be used to collect road information and collect the road information into a road image. As a visual method, the road image can include a large amount of traffic environment information, such as traffic signal signs, road lane line markings, and obstacles ahead.
[0053] In an optional embodiment, a monocular camera may be used to collect images of the road on which the vehicle is traveling. When the vehicle is traveling, the scene within the collection range may be photographed at a certain collection frequency, and a road image may be generated based on the camera's internal and external parameters. A road image sequence may be a plurality of road images collected by the vehicle in a series of continuous time frames, or may be a road image collected by the vehicle under specific conditions. For example, a road image sequence collected by the vehicle on a ramp may be obtained, and the road images collected in multiple time frames when the vehicle is traveling on the ramp may be used as a road image sequence.
[0054] S204, when the road image does not include a lane line object that meets the image quality condition, determine a surrounding vehicle that meets the driving condition from a plurality of vehicles included in the road image, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and has traveled to the first ramp before the own vehicle;
[0055] It should be noted that the vehicle can travel on structured roads and unstructured roads. There are pre-set lane lines on structured roads, and the lane lines can be used to obtain complete road surface information of the current road. However, when the lane line quality of the vehicle on an unstructured road or structured road does not meet the image quality requirements, the lane lines cannot be used to obtain information about the road the vehicle is currently traveling on.
[0056] In an optional embodiment, the quality of the lane line can be defined by the lane line confidence, and the image quality condition can be greater than a preset confidence threshold. For lane lines that are partially damaged or whose features cannot be identified, the confidence is correspondingly low. The confidence of the lane line can be calculated using different algorithms for calculating the confidence. For example, after acquiring a road image sequence, the lane lines in multiple road images can be extracted to obtain multiple feature point sets of the lane lines, and then the multiple feature point sets can be calculated using a preset confidence algorithm to obtain the confidence. The confidence algorithm can be a deep learning network, Bayesian formula, etc.
[0057] In an optional embodiment, when the road image does not include lane line objects that meet the image quality conditions, surrounding vehicles that meet the driving conditions can be determined from the road image. The driving condition may be a constraint condition on vehicles outside the own vehicle. The driving condition may be located in an adjacent lane to the own vehicle and driving to the first ramp before the own vehicle. The driving condition may also be that the distance from the own vehicle in the lateral direction is less than a preset distance. For example, vehicles within 20 meters on the left and right roads of the own vehicle may be determined as surrounding vehicles. The driving condition may also be vehicles that go from far to near and then become far, which may be surrounding vehicles in an overtaking scenario. By limiting the lateral distance between the own vehicle and the surrounding vehicles, the accuracy of the first slope value estimated by the surrounding vehicles can be improved. By limiting the overtaking scenario, the surrounding vehicles can be selected as vehicles that are close to the own vehicle and have similar driving conditions.
[0058] S206, determining a first slope value of a first slope according to a change in a first position relationship between the own vehicle and the surrounding vehicle;
[0059] It should be noted that the surrounding vehicle drives onto the ramp before the self-vehicle. When the surrounding vehicle and the self-vehicle are driving on a horizontal road at the same time, the distance between the two will change with the speed of the vehicles. When the surrounding vehicle drives onto the ramp, the distance between the two vehicles will suddenly change. By detecting the change in the positional relationship between the self-vehicle and the surrounding vehicle, the time frame in which the distance between the surrounding vehicle and the self-vehicle suddenly changes can be detected, thereby determining the time frame in which the surrounding vehicle drives onto the ramp. Furthermore, the first slope value is determined by the change in the distance between the surrounding vehicle and the self-vehicle. How to use the change in the first positional relationship to determine the first slope value will be described in detail later and will not be repeated here.
[0060] S208, when the ego vehicle travels on the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, determining a second slope value of the second ramp according to the first slope value and a change in a second positional relationship between the ego vehicle and the target vehicle;
[0061] It should be noted that when measuring the distance of the target vehicle, the second slope value can be determined by using the first slope value determined above and the change in the positional relationship between the ego vehicle and the target vehicle. The target vehicle may be going uphill or downhill, similar to the change in the distance between the ego vehicle and the surrounding vehicles mentioned above. When the distance between the ego vehicle and the target vehicle suddenly changes, it can be considered that the target vehicle has driven onto the slope, and the second slope value can be determined by the change in the position of the ego vehicle and the target vehicle. The specific calculation method will be described in detail later and will not be repeated here.
[0062] S210, determining a target vehicle distance between the own vehicle and the target vehicle according to the first slope value, the second slope value, and the geometric position relationship between the own vehicle and the target vehicle.
[0063] In an optional implementation, when the vehicle uses a camera to collect road information to obtain a road image sequence, the distance between the vehicle and the target vehicle can be estimated using the information of the target vehicle in the road image sequence. As mentioned above, when driving on a slope, the camera may change its angle, resulting in inaccurate distance measurement. Therefore, the first slope value and the second slope value obtained above can be used to compensate the distance between the vehicles collected by the vehicle using the camera to obtain the target vehicle distance.
[0064] In an embodiment of the present application, a road image sequence collected by the vehicle is obtained, wherein the road image sequence includes road images collected by multiple time frames respectively; when the road image does not include a lane line object that meets the image quality condition, a surrounding vehicle that meets the driving condition is determined from multiple vehicles included in the road image, wherein the surrounding vehicle is a vehicle in an adjacent lane and travels to the first ramp before the vehicle; the first slope value of the first ramp is determined according to the change of the first position relationship between the vehicle and the surrounding vehicle; when the vehicle travels to the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, the second slope value of the second ramp is determined according to the first slope value and the change of the second position relationship between the vehicle and the target vehicle; the target vehicle distance between the vehicle and the target vehicle is determined according to the first slope value, the second slope value and the geometric position relationship between the vehicle and the target vehicle. Thus, the accuracy of vehicle distance measurement under ramp conditions is improved.
[0065] The lane line of the road on which the ego vehicle is traveling is judged by the road images collected by the ego vehicle at multiple time frames. When the quality of the lane line does not meet the preset quality conditions, the surrounding vehicles are identified through the road images, and the first slope value of the slope on which the surrounding vehicles and the ego vehicle are traveling is determined by using the change in the positional relationship between the surrounding vehicles and the ego vehicle that travels to the first ramp before. When the ego vehicle is traveling on the ramp and it is desired to identify the target vehicle on the second ramp, the second slope value corresponding to the ramp where the target vehicle is located can be determined by using the first slope value and the change in the positional relationship between the ego vehicle and the target vehicle. Finally, the distance between the two vehicles under the ramp condition is determined by using the first slope value, the second slope value and the positional relationship between the ego vehicle and the target vehicle. The above method solves the technical problem that the visual ranging method provided by the relevant technology has low accuracy in the ramp scene. When the quality of the lane line does not meet the preset quality, the slope value of the ramp where the ego vehicle is located can be estimated based on the surrounding vehicles, which increases the application scenarios of the method. The slope position relationship between the ego vehicle and the target vehicle is used to perform ranging compensation on the two vehicles, thereby improving the accuracy of slope ranging.
[0066] In an optional embodiment, the above-mentioned determining the first slope value of the first ramp according to the change of the first position relationship between the own vehicle and the surrounding vehicles includes: obtaining M longitudinal distances respectively according to M road images in the road image sequence, wherein the M longitudinal distances correspond to the M road images one-to-one, the longitudinal distance is the vehicle distance between the surrounding vehicle and the own vehicle along the driving direction, and M is an integer greater than 1; estimating the speed of the surrounding vehicle in M time frames by using the M longitudinal distances to obtain M reference speeds corresponding to the M time frames, and determining M reference longitudinal distances between the own vehicle and the surrounding vehicles by using the M reference speeds; calculating the first difference between the M longitudinal distances and the M reference longitudinal distances respectively, and when the first difference between the i-th longitudinal distance and the i-th reference longitudinal distance is greater than a first threshold, determining the first slope value according to the i-th longitudinal distance, the i-th reference speed and the i-th reference longitudinal distance, wherein i is an integer greater than or equal to 1 and less than or equal to M.
[0067] It should be noted that, as mentioned above, during the driving process of the vehicle, a camera sensor such as a monocular camera can be used to obtain the surrounding road information of multiple time frames to generate a road image sequence, and the points in the real world are converted one by one from the world coordinate system, the camera coordinate system, the image plane coordinate system, and the pixel coordinate system. There is a one-to-one correspondence between the pixel coordinate points in the road image and the points in the world coordinate system. Therefore, the road image can be used to obtain the road and obstacle information around the vehicle.
[0068] In an optional embodiment, when calculating the ramp on which the ego vehicle is located, a road image sequence corresponding to the ego vehicle on a horizontal road may be obtained, including road images when the ego vehicle is driving on the horizontal road, when the ego vehicle is about to drive from the horizontal road to the first ramp, and when the surrounding vehicle drives to the first ramp. The horizontal road may be a road connected to the first ramp. Afterwards, the three-dimensional road information is obtained using the two-dimensional plane information in the acquired road image, and the three-dimensional road information may include the distance between the ego vehicle and the surrounding vehicle.
[0069] In an optional implementation, when calculating the longitudinal distance between the vehicle and the surrounding vehicles using the road image, a geometric relationship model of corresponding points in the three-dimensional scene and the road image can be used. The geometric relationship model can be determined based on the parameters of the camera sensor (equivalent to the image acquisition device). For example, the origin of the image plane coordinate system of the camera, the lateral focal length, the longitudinal focal length, etc. The parameters of the camera sensor can be pre-calibrated or automatically calibrated during driving. This application does not limit the method of obtaining the sensor parameters.
[0070] In an optional embodiment, the above-mentioned obtaining M longitudinal distances respectively according to M road images in the road image sequence includes: obtaining the focal length of the image acquisition device used to acquire the road image sequence; acquiring one road image from the M road images as the current road image; obtaining the vehicle width ratio between the vehicle width length of the surrounding vehicle and the pixel width corresponding to the surrounding vehicle, wherein the pixel width is determined according to the image area matching the surrounding vehicle in the current road image; and determining the current longitudinal distance matching the current road image according to the product of the vehicle width ratio and the focal length.
[0071] In an optional embodiment, the surrounding vehicle may be a vehicle traveling within a preset range on the road to the left and right of the vehicle, and the surrounding vehicle may be farther and farther relative to the vehicle. Compared with the vehicle that is always in front of the vehicle, the vehicle in the overtaking scenario is selected as the surrounding vehicle. The surrounding vehicle may travel to the first ramp before the vehicle, and the road conditions in front of the vehicle can be predicted. When the vehicle in front of the vehicle is selected as the surrounding vehicle, the road conditions between the vehicle and the surrounding vehicle cannot be predicted. Therefore, the vehicle in the overtaking scenario can be selected as the surrounding vehicle to be selected, and the vehicle closest to the vehicle among the vehicles that meet the above conditions is determined as the surrounding vehicle.
[0072] As mentioned above, the vehicle can obtain the surrounding road information through the on-board image acquisition device and generate a road image. The pixel information of the surrounding vehicle in the road image is matched with the three-dimensional information points in the world coordinate system, and the desired three-dimensional information is obtained using the two-dimensional information in the road image.
[0073] In an optional implementation, the M road images in the road image sequence may be used to determine the reference surrounding vehicle, and obtain the vehicle type of the surrounding vehicle, so as to determine the vehicle size information such as the vehicle width and length of the surrounding vehicle according to the type of the surrounding vehicle. To determine the size information of the surrounding vehicle according to the type of the surrounding vehicle, a pre-stored vehicle type table may be used, and the corresponding size information may be determined according to the vehicle type in the vehicle type table.
[0074] Figure 3 is a schematic diagram of an optional distance measurement method under a ramp condition according to an embodiment of the present application; Figure 3 As shown, when the vehicle 302 determines the surrounding vehicle 304 through the road image, the vehicle width 310 of the surrounding vehicle 304 can be determined according to the type of the surrounding vehicle 304. The pixel width 312 corresponding to the surrounding vehicle can also be determined according to the road image. Afterwards, the longitudinal distance 306 between the vehicle and the surrounding vehicle can be determined using the focal length 308 of the image acquisition device, the vehicle width 310, and the pixel width 312.
[0075] As mentioned above, after determining the focal length, vehicle width, and pixel width of the image acquisition device, the longitudinal distance between the vehicle and the surrounding vehicle can be determined using formula (1):
[0076] (1)
[0077] in, represents the longitudinal distance between the vehicle and the surrounding vehicle, W represents the fixed vehicle width of the surrounding vehicle, and w represents the pixel width matching the surrounding vehicle in the road image. Indicates the focal length of the image acquisition device.
[0078] Through the above implementation of the present application, a suitable surrounding vehicle can be selected according to the road image acquired by the self-vehicle, and the road image acquired by the self-vehicle on the horizontal road can be used to determine the vehicle width of the surrounding vehicle, the pixel width of the surrounding vehicle in the road image, and the focal length of the image acquisition device to determine the longitudinal distance between the self-vehicle and the surrounding vehicle. This facilitates the subsequent determination of the first slope value of the first ramp using the longitudinal distance, thereby increasing the accuracy of the subsequent determination of the first slope value.
[0079] In an optional implementation, the longitudinal distance between the vehicle and surrounding vehicles corresponding to a time frame can be determined from a road image corresponding to the time frame, and multiple longitudinal distances corresponding to multiple consecutive time frames can be determined from a sequence of road images corresponding to multiple consecutive time frames.
[0080] In an optional embodiment, after obtaining M longitudinal distances, the M longitudinal distances can be used to estimate the speed of the surrounding vehicle in M time frames to obtain M reference speeds corresponding to the M time frames. The longitudinal distances corresponding to the continuous preset number of frames in the M time frames can be obtained, and the continuous preset number of frames can be set as needed. For example, in the case of taking into account both calculation time and accuracy, 5 consecutive time frames can be selected. The longitudinal distance corresponding to each time frame is derived to obtain the corresponding surrounding vehicle speed, and the surrounding vehicle speed obtained by derivation of the longitudinal distances of multiple consecutive time frames (for example, the mth frame to the m+5th frame, m is an integer greater than or equal to 1 and less than or equal to M) is used to predict the speed of the next continuous time frame (for example, the m+6th frame) to obtain the reference speed of the next continuous time frame. Then, the reference speed obtained by prediction can be used to predict the reference longitudinal distance of the next continuous time frame (the m+6th frame).
[0081] In an optional implementation, the reference speed and reference longitudinal distance of the next continuous time frame are estimated by using the peripheral vehicle speed obtained by derivation of the longitudinal distance of multiple consecutive time frames, which may be an optimal estimation algorithm, such as the least squares method, Kalman filtering, etc. The present application does not limit the specific estimation algorithm, and the estimated value of the next time frame can be predicted based on the known value.
[0082] Through the above implementation of the present application, the corresponding surrounding vehicle speed can be obtained by derivation of the longitudinal distance corresponding to the continuous time frame, and the reference speed corresponding to the next continuous time frame can be predicted by using the obtained surrounding vehicle speed and the longitudinal distance. The speed obtained by predicting the speed continuity and the speed obtained by derivation of the distance between the vehicle and the surrounding vehicle can predict whether the surrounding vehicle has traveled to the ramp. And the first slope value of the first ramp is determined by using the information of the surrounding vehicle.
[0083] In an optional embodiment, the above-mentioned determination of the first slope value based on the i-th longitudinal distance, the i-th reference speed and the i-th reference longitudinal distance includes: obtaining the first distance traveled by the surrounding vehicle from the i-1th time frame to the i-th time frame based on the i-1th reference speed corresponding to the i-1th time frame, and the time frame interval duration between the time frames; obtaining the second distance traveled by the own vehicle from the i-1th time frame to the i-th time frame based on the own vehicle speed corresponding to the i-1 time frame, and the time frame interval duration; obtaining a first difference between the i-th longitudinal distance and the length of the surrounding vehicle, and obtaining a second difference between the i-1th longitudinal distance and the second distance; obtaining a third difference between the first difference and the second difference, and determining the first slope value based on the ratio of the third difference to the fourth difference, wherein the fourth difference is the difference between the first distance and the length of the surrounding vehicle.
[0084] In an optional implementation, after obtaining the reference speed corresponding to each time frame, the reference longitudinal distance corresponding to each time frame can be determined according to the reference speed. When the first difference between the longitudinal distance calculated using the vehicle width and the reference longitudinal distance is greater than the first threshold, it can be considered that the vehicle has entered the first ramp in the corresponding time frame. The first slope value can be determined using the longitudinal distance corresponding to the time frame, the reference longitudinal distance and the reference speed.
[0085] In an optional implementation, assuming that the first threshold is 2%, the reference speed corresponding to the i-th time frame is , then the first distance traveled by the peripheral vehicle from the i-1th time frame to the i-th time frame is It can be determined using Formula 2:
[0086] (2)
[0087] in, represents the i-th time frame, Represents the i-1th time frame.
[0088] In the i-1th time frame to the i-th time frame, the vehicle can Then, the second distance s traveled by the vehicle from the i-1th time frame to the i-th time frame can be determined using Formula 3:
[0089] (3)
[0090] Figure 4 is a schematic diagram of another optional distance measurement method under ramp conditions according to an embodiment of the present application; Figure 4 As shown, is the slope angle of the first ramp. The position corresponding to the surrounding vehicle 406 in the i-1th time frame and the position corresponding to the surrounding vehicle 408 in the i-th time frame can be obtained by using the i-1th reference speed corresponding to the i-1th time frame and the time frame interval between the time frames, and the first distance 414 traveled by the surrounding vehicle in the interval between the two time frames is determined according to the positions of the two time frames; the position corresponding to the self-vehicle 402 in the i-1th time frame and the position corresponding to the self-vehicle 404 in the i-th time frame are obtained according to the self-vehicle speed corresponding to the i-1th time frame and the time frame interval, and the second distance 410 traveled in the interval between the two time frames is determined according to the positions of the two time frames. Then, the first difference between the i-th longitudinal distance 418 and the surrounding vehicle length 412 is obtained, and the second difference between the i-1-th longitudinal distance 416 and the second distance 410 is obtained; the third difference between the first difference and the second difference is obtained, and the first slope value 420 is determined according to the ratio between the third difference and the fourth difference, wherein the fourth difference is the difference between the first distance and the surrounding vehicle length. As shown in Formula 4:
[0091] (4)
[0092] in, Represents the longitudinal distance obtained using the vehicle width in the i-th time frame.
[0093] Figure 5 is a schematic diagram of another optional distance measurement method under a ramp condition according to an embodiment of the present application; Figure 5 As shown, this is a downhill scene. Figure 5 It can be seen and are equal, for the ramp, can be the slope angle of the first ramp, so It can also be the slope angle of the first ramp. For downhill scenes, you can use Determine the first slope value 520. The position corresponding to the surrounding vehicle 506 in the i-1th time frame and the position corresponding to the surrounding vehicle 508 in the i-1th time frame can be obtained by using the i-1th reference speed corresponding to the i-1th time frame and the time frame interval between the time frames, and the first distance 514 traveled by the surrounding vehicle in the interval between the two time frames is determined based on the positions of the two time frames; the position corresponding to the self-vehicle 502 in the i-1th time frame and the position corresponding to the self-vehicle 504 in the i-1th time frame are obtained based on the self-vehicle speed corresponding to the i-1th time frame and the time frame interval, and the second distance 510 traveled in the interval between the two time frames is determined based on the positions of the two time frames. Then obtain the first difference between the i-th longitudinal distance 518 and the surrounding vehicle length 512, and obtain the second difference between the i-1-th longitudinal distance 516 and the second distance 510; obtain the third difference between the first difference and the second difference, and determine the first slope value 520 based on the ratio between the third difference and the fourth difference, wherein the fourth difference is the difference between the first distance and the surrounding vehicle length.
[0094] Through the above implementation of the present application, when there is no lane line object that meets the image quality condition in the road image, the surrounding vehicles that meet the condition can be determined using the road image, and the first slope value of the first ramp can be determined using the information of the surrounding vehicles that enter the first ramp before the own vehicle. The speed and the first slope value of the surrounding vehicles can be calculated using information such as the width of the surrounding vehicles and the positional relationship between the own vehicle and the surrounding vehicles, and the slope value of the first ramp is obtained by combining the information of the surrounding vehicles.
[0095] In an optional embodiment, after obtaining the road image sequence collected by the vehicle, the method further includes: when the road image includes a lane line object that meets the image quality condition, obtaining a set of feature points for indicating the lane line object in the road image; obtaining a feature variation coefficient of the feature point set based on the feature point sets that match the multiple road images respectively; and determining the first slope value based on the feature variation coefficient.
[0096] It should be noted that, as mentioned above, the image quality condition may be greater than a preset confidence threshold. When a road image contains a lane line object that meets the image quality condition, a feature point set of the lane line object may be obtained. Different algorithms may be set as needed for detecting lane line objects.
[0097] In an optional implementation, the lane line object may be detected using an edge detection method, and the edge of the lane may be identified using the color difference between the road and the lane line, thereby detecting the lane line object.
[0098] In an optional implementation, feature extraction may be performed on the road image to obtain an edge image of the lane line object. The image may be scanned from top to bottom and from left to right to find the lane line boundary points in the image. After all the edges are found, the obtained boundary points are identified based on the continuity and other features of the lane line. For example, the aspect ratio of the circumscribed rectangle of the outline composed of the boundary points is calculated. If it is not a long and narrow rectangle, it is not a lane line object.
[0099] In an optional implementation, after obtaining the feature point set of the lane line object, the feature point set in the road image can be used to determine the position coordinate value of each feature point in the world coordinate system. Then, two feature points can be selected from the feature point set corresponding to a road image, and the feature variation coefficient between the feature points can be obtained by using the difference ratio between the longitudinal coordinate value and the vertical coordinate value. As shown in Formula 5:
[0100] (5)
[0101] That is, the characteristic variation coefficient is obtained by dividing the difference between the vertical coordinate values by the difference between the longitudinal coordinate values.
[0102] In an optional implementation, two consecutive feature points in a feature point set of a lane line object corresponding to a road image may be arbitrarily selected to calculate a feature variation coefficient, and the obtained feature variation coefficient may be used as the first slope value.
[0103] In an optional embodiment, the above process can be performed on the feature point set of lane line objects corresponding to multiple road images to obtain the feature variation coefficient corresponding to each road image, and then the multiple feature variation coefficients obtained are weighted averaged to obtain the result as the first slope value.
[0104] Through the above implementation of the present application, when there is a lane line object that meets the road quality condition in the road image, the lane line object can be used to obtain the first slope value of the slope where the vehicle is located. When there is no lane line object that meets the road quality condition, the surrounding vehicle can be used to calculate the first slope value of the slope where the vehicle is located, and the application scenarios are more comprehensive.
[0105] In an optional embodiment, before determining the second slope value of the second slope based on the first slope value and the change in the second position relationship between the own vehicle and the target vehicle, the method further includes: obtaining a reference slope value detected by the own vehicle; and updating the first slope value based on a weighted sum of the reference slope value and the first slope value when the difference between the first slope value and the reference slope value is greater than a second threshold.
[0106] It should be noted that, when the first slope value is calculated based on the lane line object or the surrounding vehicle, the reference slope value may be used to compare with the first slope value to ensure the accuracy of the calculated first slope value.
[0107] In an optional embodiment, after obtaining the first slope value, the difference between the first slope value and the reference slope value can be calculated, and the difference can be the difference between the first slope value and the reference slope value, and the ratio between the first slope value and the reference slope value. When the difference is less than the second threshold, it means that the first slope value calculated using the lane line object or the surrounding vehicle is more accurate, and the first slope value can be used for subsequent calculations. When the difference is greater than the second threshold, it means that the gap between the first slope value calculated using the lane line object or the surrounding vehicle and the reference slope value is large, and one or both of the two slope values are inaccurate. The first slope value and the reference slope value can be weighted summed to update the first slope value. The second threshold can be preset, for example, it can be set to 5%.
[0108] Through the above-mentioned implementation mode of the present application, the reference slope value can be compared with the first slope value to determine the accuracy of the first slope value. In the case of a large gap, the reference slope value can be used to update the first slope value to obtain a more accurate first slope value, thereby improving the accuracy of subsequent slope compensation.
[0109] In an optional implementation manner, the above-mentioned obtaining of the reference slope value detected by the vehicle includes one of the following:
[0110] 1) Determine the lane line vanishing point based on the lane line object included in the road image, and obtain the reference slope value using the image coordinates of the lane line vanishing point and the calibration vanishing point corresponding to the road image, wherein the lane line vanishing point is the intersection of the lane line object corresponding to the lane of the vehicle in the road image, and the calibration vanishing point is used to calibrate the roll angle of the vehicle;
[0111] 2) Obtain the ego vehicle acceleration of the ego vehicle object according to the current vehicle speed, and obtain the reference slope value according to the ego vehicle acceleration and longitudinal acceleration;
[0112] 3) Obtain the reference slope value based on the pitch angular velocity of the vehicle.
[0113] In an optional embodiment, the reference slope value may be determined using the image coordinates of the vanishing point of the lane line object and the calibrated vanishing point. The vanishing point of the lane line object may be the intersection of two parallel lane lines in the real world at infinity in the road image. The vanishing point of the lane line object is obtained by extracting a set of feature points of the lane lines in the road image, and using the feature point set to determine a lane line model corresponding to each lane line. The lane line model may be a function representing the coordinate position of any point on the lane line. The lane line vanishing points of the two lane line objects may be determined using the lane line models corresponding to the two lane lines.
[0114] In an optional embodiment, the lane line calibration vanishing point can be obtained after the vehicle is pre-calibrated. After the vehicle is installed with the image acquisition device, there may be a certain error in the image acquisition device. In order to compensate for the impact of the installation error on the algorithm, the error will be determined after installation and compensated. In this process, the three directional angles (pitch angle, roll angle and roll angle) of the image acquisition device and the installation height of the image acquisition device will be determined. After the calibration is completed, the roll angle of the vehicle when the vehicle is driving on a horizontal road for a period of time can be used to obtain a stable lane line vanishing point using geometric relationships as the calibration vanishing point.
[0115] In an optional implementation, after obtaining the vanishing point and the calibrated vanishing point of the lane line object, the image plane coordinates of the two vanishing points on the road image may be converted into world coordinates, and then the reference slope value may be obtained using Formula 6:
[0116] (6)
[0117] Among them, z w3 Indicates the vertical coordinate value of the lane line vanishing point, z w2 Indicates the vertical coordinate value of the calibrated vanishing point, y w3 Indicates the longitudinal coordinate value of the lane line vanishing point, y w2 Indicates the vertical coordinate value of the calibrated vanishing point.
[0118] In an optional implementation, when there are no lane lines that meet the image quality conditions in the road image, the reference slope value can be calculated using the wheel speed sensor carried by the vehicle. The wheel speed sensor carried by the vehicle can be used to obtain the longitudinal acceleration of the vehicle and the wheel speed of the non-driving wheel of the vehicle, and the wheel speed of the non-driving wheel can be converted to obtain the vehicle speed of the vehicle, and the obtained vehicle speed can be derived to obtain the vehicle acceleration, and the longitudinal acceleration of the vehicle is equal to the sum of the longitudinal vehicle speed change rate and the gravity acceleration along the road surface component. Therefore, the reference slope value is calculated based on the vehicle acceleration and the longitudinal acceleration using Formula 7:
[0119] (7)
[0120] Among them, a v1 represents the vehicle acceleration, a v0 It represents the longitudinal acceleration of the vehicle.
[0121] In an optional implementation, the gyroscope of the inertial measurement unit may be used to obtain the azimuth angular velocity of the vehicle, and the angular velocity of the pitch angle contained therein may be integrated to obtain the pitch angle of the vehicle, and the pitch angle may be used as a reference slope value.
[0122] As mentioned above, when the difference between the first slope value and the reference slope value is greater than the second threshold, the first slope value can be updated using the reference slope value, as shown in Formula 8:
[0123] (8)
[0124] in, represents the reference slope value calculated by the inertial measurement unit, Indicates the first slope value calculated using the lane line object or the surrounding vehicle. Indicates the reference slope value calculated using the lane line vanishing point or vehicle acceleration information.
[0125] In an optional implementation, when it is found through road image sequence detection that there are no surrounding vehicles that meet the conditions and lane line objects that meet the image quality conditions around the vehicle, the first slope value can be calculated using the reference slope value. For example, the reference slope values obtained using different methods can be weighted and summed. When using different reference slope values for weighted summation, because the slope value measured by the inertial measurement unit becomes less accurate as the vehicle travels longer, the weights before the different reference slope values can be determined by the vehicle's travel time.
[0126] As shown in Formula 9:
[0127] (9)
[0128] in, It can represent the driving time of the vehicle.
[0129] Through the above implementation of the present application, a reference slope value can be obtained in a variety of ways to compare with the first slope value to verify the accuracy of the first slope value. In the case where the error between the first slope value and the reference slope value is large, the first slope value can be updated using the reference slope value to obtain a more accurate first slope value. And in the case where there are no conditions for calculating the first slope value, the first slope value is obtained using the reference slope value. The application scenario of calculating the first slope value is improved, and the accuracy of the first slope value is improved, thereby improving the accuracy of the subsequent calculation of the distance between the vehicle and the target vehicle.
[0130] In an optional embodiment, the second slope value of the second slope is determined according to the first slope value and the change of the second positional relationship between the own vehicle and the target vehicle, including: obtaining P target longitudinal distances according to P road images in the road image sequence, wherein the P target longitudinal distances correspond to the P road images one by one, the target longitudinal distance is the distance between the own vehicle and the target vehicle determined according to the focal length of the image acquisition device, the vehicle width length of the target vehicle, and the pixel width corresponding to the target vehicle, and P is an integer greater than 1; using the P target longitudinal distances to calculate the distance between the target vehicle and the target vehicle at P times; The method comprises the steps of estimating the speed of each frame to obtain P estimated speeds corresponding to the P time frames, and using the P estimated speeds to respectively determine P estimated longitudinal distances between the vehicle and the target vehicle; respectively calculating second differences between the P target longitudinal distances and the P estimated longitudinal distances, and when the second difference between the qth target longitudinal distance and the qth estimated longitudinal distance is greater than a third threshold, determining a second slope value according to the qth target longitudinal distance, the qth estimated speed, the qth estimated longitudinal distance and the first slope value, wherein q is an integer greater than or equal to 1 and less than or equal to P.
[0131] As mentioned above, the vehicle can determine the distance between the vehicle and surrounding vehicles by using the width of the surrounding vehicles, the focal length of the image acquisition device of the vehicle, and the pixel width of the surrounding vehicles on the road image.
[0132] Figure 6 is a schematic diagram of another optional distance measurement method under a ramp condition according to an embodiment of the present application; Figure 6 As shown, when the ego vehicle 602 determines the target vehicle 604 through the road image, the vehicle width 610 of the target vehicle 604 can be determined according to the type of the target vehicle 604. The pixel width 612 corresponding to the target vehicle can also be determined according to the road image. Afterwards, the target longitudinal distance 606 between the ego vehicle and the target vehicle can be determined using the focal length 608 of the image acquisition device, the vehicle width 610, and the pixel width 612. It can be determined using Formula 10:
[0133] (10)
[0134] Among them, W c represents the fixed width of the target vehicle, w c Represents the pixel width in the road image that matches the target vehicle.
[0135] In an optional embodiment, after obtaining P target longitudinal distances, the P target longitudinal distances can be used to estimate the speed of the target vehicle in P time frames to obtain P estimated speeds corresponding to the P time frames. The target longitudinal distances corresponding to the continuous preset number of frames in the P time frames can be obtained, and the continuous preset number of frames can be set as needed. For example, in the case of taking into account both calculation time and accuracy, 5 consecutive time frames can be selected. The target longitudinal distance corresponding to each time frame is derived to obtain the corresponding target vehicle speed, and the target vehicle speed obtained by derivation of the target longitudinal distances of multiple consecutive time frames (for example, the pth frame to the p+5th frame, p is an integer greater than or equal to 1 and less than or equal to P) is used to predict the speed of the next continuous time frame (for example, the p+6th frame) to obtain the estimated speed of the next continuous time frame. Then, the estimated speed obtained by prediction can be used to predict the estimated longitudinal distance of the next continuous time frame (the p+6th frame).
[0136] In an optional embodiment, the above-mentioned determination of the second slope value based on the qth target longitudinal distance, the qth estimated speed, the qth estimated longitudinal distance and the first slope value includes: obtaining a third distance traveled by the target vehicle from the q-1th time frame to the qth time frame based on the q-1th estimated speed corresponding to the q-1th time frame, and the time frame interval duration between the time frames; obtaining a fourth distance traveled by the vehicle from the q-1th time frame to the qth time frame based on the vehicle speed corresponding to the q-1th time frame, and the time frame interval duration; obtaining a first product between the fourth distance and the cosine value corresponding to the first slope value, and obtaining a fifth difference between the q-1th target longitudinal distance and the first product; determining the second slope value based on the ratio of the sixth difference to the third distance, wherein the sixth difference is the difference between the qth target longitudinal distance and the fifth difference.
[0137] In an optional implementation, after the estimated speed corresponding to each time frame is obtained, the estimated longitudinal distance corresponding to each time frame can be determined according to the estimated speed. When the second difference between the target longitudinal distance obtained by using the vehicle width and the estimated longitudinal distance is greater than the third threshold, it can be considered that the target vehicle has entered the second ramp in the corresponding time frame. The second slope value can be determined using the target longitudinal distance, the estimated longitudinal distance and the estimated speed corresponding to the time frame.
[0138] In an optional implementation, assuming that the first threshold is 2%, the estimated speed corresponding to the qth time frame is , then the third distance traveled by the target vehicle from the q-1th time frame to the qth time frame is It can be determined using formula 11:
[0139] (11)
[0140] in, represents the qth time frame, represents the q-1th time frame.
[0141] In the q-1th time frame to the qth time frame, the vehicle can Then, the fourth distance s4 traveled by the vehicle from the q-1th time frame to the qth time frame can be determined using formula 12:
[0142] (12)
[0143] Figure 7 is a schematic diagram of another optional distance measurement method under a ramp condition according to an embodiment of the present application; Figure 7 As shown, the ramp angle of the first ramp may be θ, and the ramp angle of the second ramp may be β. The third distance 720 traveled by the target vehicle from the q-1 time frame to the q-1 time frame may be obtained based on the q-1 estimated speed corresponding to the q-1 time frame and the time frame interval between the time frames. The third distance 720 may be the position of the target vehicle corresponding to the q-1 time frame (e.g. Figure 7 The target vehicle 706) and the corresponding position at the qth time frame (e.g. Figure 7 The fourth distance 722 traveled by the vehicle from the q-1 time frame to the q-1 time frame is obtained based on the speed of the vehicle corresponding to the q-1 time frame and the time frame interval. The third distance 722 can be the position of the vehicle corresponding to the q-1 time frame (e.g. Figure 7 The vehicle 702 and the position corresponding to the qth time frame (e.g. Figure 7 A first product between the fourth distance 722 and the cosine value corresponding to the first slope value 710 is obtained, and a fifth difference between the q-1th target longitudinal distance 716 and the first product is obtained; and a second slope value 712 is determined according to a ratio between the sixth difference and the third distance 720, wherein the sixth difference is the difference between the qth target longitudinal distance 718 and the fifth difference. Figure 7 The ramp turning point 714 in is the road turning point between the first ramp and the second ramp. As shown in formula 13:
[0144] (13)
[0145] in, Indicates the second slope value.
[0146] Through the above implementation of the present application, the second slope value of the second slope where the target vehicle is located can be determined using the first slope value of the first slope where the vehicle is located, the speed of the vehicle, and the information of the target vehicle. Using the above-obtained first slope value to calculate the second slope value can obtain a more accurate second slope value, thereby improving the accuracy of the subsequent calculation of the distance between the vehicle and the target vehicle.
[0147] In an optional embodiment, the target vehicle distance between the own vehicle and the target vehicle is determined based on the first slope value, the second slope value and the geometric position relationship between the own vehicle and the target vehicle, including: determining a ramp turning point between the first ramp and the second ramp; obtaining a current longitudinal distance between the own vehicle and the target vehicle based on a current road image captured in a current time frame, wherein the current longitudinal distance is the distance between the own vehicle and the target vehicle determined based on the focal length of an image acquisition device, the vehicle width and length of the target vehicle, and a pixel width corresponding to the target vehicle; obtaining a first ratio between a fifth distance and a cosine value corresponding to the first slope value, and obtaining a seventh difference between the current longitudinal distance and the fifth distance, wherein the fifth distance is the distance between the own vehicle and the ramp turning point; and summing the first ratio and the second ratio to obtain the target vehicle distance, wherein the second ratio is the ratio between the seventh difference and the cosine value corresponding to the second slope value.
[0148] In an optional implementation, after determining the first slope value and the second slope value, the ramp turning point between the first ramp and the second ramp can be determined. Then, using the road image corresponding to the current time frame, the type of the target vehicle can be obtained to determine the vehicle width of the target vehicle, and the pixel width corresponding to the target vehicle is determined according to the road image, and then the target longitudinal distance between the self-vehicle and the target vehicle is determined as the current longitudinal distance according to the pixel width, the vehicle width of the target vehicle and the focal length of the image acquisition device. The specific calculation method can use the above formula 10.
[0149] In an optional embodiment, when the ramp turning point is determined, the fifth distance between the source vehicle and the ramp turning point and the distance between the target vehicle and the ramp turning point (the seventh difference between the current longitudinal distance and the fifth distance) can be determined. The sum of the first ratio between the fifth distance and the cosine value corresponding to the first slope value and the ratio between the seventh difference and the cosine value corresponding to the second slope value can be used as the target vehicle distance.
[0150] like Figure 7As shown, the ratio between the difference between the current position of the self-vehicle 704 and the ramp turning point 714 and the cosine value of the first slope value 710 can be used as the compensation distance of the self-vehicle on the first ramp. The ratio between the difference between the current position of the target vehicle 708 and the ramp turning point 714 and the cosine value of the second slope value 712 is used as the compensation distance of the target vehicle on the second ramp. The target vehicle distance can be obtained by adding the two compensation distances. As shown in Formula 14:
[0151] (14)
[0152] Where Y represents the longitudinal coordinate of the ramp turning point.
[0153] Through the above implementation of the present application, the target vehicle distance between the self-vehicle and the target vehicle can be obtained by using the first slope value of the first ramp, the second slope value of the second ramp, and the distance between the two vehicles and the ramp turning point, so as to obtain a more accurate target vehicle distance, so as to facilitate subsequent decision-making and control of the self-vehicle.
[0154] In an optional embodiment, the above-mentioned determination of the ramp turning point between the first ramp corresponding to the first slope value and the second ramp corresponding to the second slope value includes: when a lane line object is included in the road image, obtaining a set of feature points for indicating the lane line object in the road image; determining the ramp turning point according to the set of feature points that respectively match multiple road images; when a lane line object is not included in the road image, obtaining the longitudinal distance between the surrounding vehicle and the vehicle itself in the road image, and calculating the distance change rate corresponding to the longitudinal distance in each time frame; determining the time frame corresponding to the distance change rate greater than a preset change threshold as a turning time frame, and determining the position of the surrounding vehicle corresponding to the turning time frame as the ramp turning point.
[0155] In an optional embodiment, when a lane line object is included in a road image, the lane line object may satisfy the above-mentioned image quality condition. A lane line model may be obtained using a set of feature points of the lane line object. The lane line model may be a function that represents the relationship between the horizontal and vertical coordinates of feature points in the road image. According to the lane line model, a point where the lane line suddenly changes may be determined, and the point may be used as a ramp turning point. And according to the coordinates of the point in the road image, its coordinates in the world coordinate system are determined, so as to obtain its longitudinal coordinates to calculate the distance between the self-vehicle and the target vehicle.
[0156] In an optional implementation, when there is no lane line that meets the image quality condition, the information of the surrounding vehicle can be obtained, and the ramp turning point can be determined according to the change of the longitudinal distance between the surrounding vehicle and the vehicle. The change rate of the distance between the surrounding vehicle and the vehicle corresponding to each time frame can be calculated, and the time frame corresponding to the distance change rate greater than the preset change threshold is considered to be a change in the slope value of the road on which the surrounding vehicle is traveling, and the time frame is determined as a turning time frame. And the position of the surrounding vehicle corresponding to the turning time frame is determined as the ramp turning point.
[0157] In an optional embodiment, when there are no lane lines that meet the image quality conditions and no surrounding vehicles that meet the requirements, the above formula 14 can be used to calculate whether the current longitudinal distance obtained using the vehicle width of the target vehicle is close or far, and the target vehicle distance can be estimated.
[0158] Through the above implementation of the present application, the ramp turning point can be calculated using lane lines or surrounding vehicles, which increases the application scenarios of ramp turning point calculation. A more accurate ramp turning point can be calculated. And according to the ramp turning point, an accurate target vehicle distance can be obtained, so that the vehicle can better control the driving path of the vehicle under ramp conditions.
[0159] In an optional embodiment, when the road image does not include a lane line object that meets the image quality condition, before determining a surrounding vehicle that meets the driving condition from a plurality of vehicles included in the road image, the method further includes one of the following:
[0160] 1) When it is detected that the ego vehicle is in a bumpy state and the bump angles corresponding to the ego vehicle for N consecutive frames meet the first condition, it is determined that the ego vehicle is traveling on the first slope;
[0161] 2) When it is detected that the ego vehicle is in a bumpy state and the error value of the compensation result of the distance compensation performed in the bumpy state satisfies the second condition, it is determined that the target vehicle is traveling on the second slope.
[0162] In an optional implementation, the vanishing point of the lane line and the calibrated vanishing point of the lane line can be obtained, and the state of the vehicle can be determined based on the two points. The image plane coordinate distance threshold between the lane line vanishing point and the calibrated vanishing point can be set as the ratio of the distance parameter to the currently measured longitudinal distance between the vehicle and the target vehicle, and the distance parameter can be set to 100. The distance parameter can be set as needed, and the middle value of the farthest range detected by the image acquisition device can be selected.
[0163] In an optional implementation, the square of the difference between the horizontal coordinate value of the lane line vanishing point and the horizontal coordinate value of the calibrated vanishing point, the sum of the square of the difference between the vertical coordinate value of the lane line vanishing point and the vertical coordinate value of the calibrated vanishing point, and the square of the above-mentioned distance threshold can be used as a judgment condition. When the above-mentioned sum of squares is greater than the square of the distance threshold, it means that the error between the vanishing point and the calibrated vanishing point is large. It is considered that the vehicle is currently in a bumpy state. When the bump angle corresponding to the vehicle for N consecutive frames is in a bumpy state, it is determined that the vehicle is in a bumpy state. When the bump angle corresponding to the vehicle for N consecutive frames indicates that the vehicle is not in a bumpy state, it is considered that the vehicle is traveling on a stable road surface. And when the plane coordinate difference between the vanishing point and the calibrated vanishing point is not 0, it is considered that the vehicle is traveling on the first ramp.
[0164] In an optional embodiment, the derivative of the target vehicle distance change difference between the first time frame and the second time frame after compensation in a bumpy state can be used as the current speed of the target vehicle. And the longitudinal distance calculated in the second time frame is obtained. The distance traveled by the target vehicle in the third time frame is predicted using the current speed and longitudinal distance of the target vehicle. And the distance traveled by the vehicle from the second time frame to the third time frame is obtained. The predicted distance between the vehicle and the target vehicle is calculated based on the predicted distance obtained above. And the error between the compensated distance and the predicted distance is compared with a preset error parameter. When the error in multiple consecutive time frames is less than or equal to the error parameter, it can be considered that the target vehicle is on a horizontal road. If the error in multiple consecutive time frames is greater than the error parameter, it can be considered that the target vehicle is traveling on the second ramp.
[0165] In the embodiment of the present application, for vehicle ranging under ramp conditions, the first slope value of the first ramp on which the vehicle is traveling can be calculated based on the information of surrounding vehicles or lane lines representing the road conditions, and the calculation scenario for calculating the first slope value of the first ramp on which the vehicle is located has a wider coverage. At the same time, the vehicle width of the target vehicle can be determined by the type of the target vehicle, and the second slope value of the second ramp on which the target is located can be determined by using the vehicle width and the measured longitudinal distance. And based on the first slope value, the second slope value and the ramp turning point, the target vehicle distance between the vehicle and the target vehicle is determined.
[0166] In an optional implementation, a road image sequence can be obtained through a camera sensor, and the road image sequence is preprocessed, and the pitch angle, roll angle, and rotation angle of the camera sensor are obtained. Then, it is determined whether the vehicle is in a bumpy condition. When it is determined that the vehicle is in a bumpy condition, the longitudinal distance of the target vehicle and the current time can be used as the basis for segmented judgment and corresponding distance compensation can be performed. Then, it is determined whether the target vehicle is on a horizontal road based on the change in the distance to the target vehicle. When it is currently determined that the vehicle is not in a bumpy condition and there is a stable slope value or when driving on a horizontal road, or when it is determined that the vehicle is in a bumpy condition but the target vehicle is on a ramp, the estimated slope is used to perform the distance measurement step length to obtain an accurate target vehicle distance.
[0167] In an optional implementation, when determining whether the vehicle is in a bumpy condition, it may be determined whether there is a lane line object that meets the image quality condition in the road image sequence collected by the vehicle. If there is a lane line object that meets the condition, the slope angle may be obtained using the image coordinates of the lane line vanishing point and the calibrated vanishing point corresponding to the road image. The lane line feature points of the lane line object may be extracted, and the mathematical model of the lane line may be calculated using the lane line feature points, so that the image plane coordinates and the corresponding world coordinates of the lane line vanishing point may be calculated using the mathematical model of the lane line, and then the image plane coordinates and the corresponding world coordinates of the calibrated vanishing point may be obtained. The distance threshold may be calculated based on the uncompensated distance, such as using the approximate middle value of the farthest detection distance of the camera sensor (e.g., if the farthest range is 250m, the middle value may be 100m) and the ratio between the uncompensated distance as the preset distance threshold. The distance between the lane line vanishing point and the calibration vanishing point on the image plane is compared with the preset distance. When the distance between the two points in multiple consecutive time frames is less than or equal to the preset distance, it means that the coordinate difference between the lane line vanishing point and the calibration vanishing point is small, and the vehicle is driving stably and is not in a bumpy condition. When the distance between the two points in multiple consecutive time frames is greater than the preset distance, it means that the coordinate difference between the lane line vanishing point and the calibration vanishing point is large, that is, the vehicle is in a bumpy condition. When the coordinate difference between the lane line vanishing point and the calibration vanishing point on the image plane is stable but not 0 in multiple consecutive time frames, that is, the vehicle is driving stably uphill or downhill and is not in a bumpy condition, so the reference slope angle calculated by the lane line vanishing point and the calibration vanishing point can be calculated using Formula 6.
[0168] In an optional implementation, when there is no lane line that meets the image quality condition in the road image, the reference slope value can be calculated using the wheel speed sensor carried by the vehicle. The wheel speed sensor carried by the vehicle can be used to obtain the longitudinal acceleration of the vehicle and the wheel speed of the non-driving wheel of the vehicle, and the wheel speed of the non-driving wheel can be converted to obtain the vehicle speed of the vehicle, and the obtained vehicle speed can be derived to obtain the acceleration of the vehicle, and the longitudinal acceleration of the vehicle is equal to the sum of the longitudinal vehicle speed change rate and the gravity acceleration along the road surface component. The reference slope value is calculated using Formula 7. If the calculated reference slope value fluctuates up and down by more than a certain threshold in multiple consecutive time frames, it is determined that the vehicle is in a bumpy state.
[0169] In an optional implementation, an air suspension may be installed on the vehicle, and the height H of the vehicle body from the ground may be measured using a height sensor of the suspension. If the height value obtained fluctuates up and down by exceeding a certain threshold within multiple consecutive time frames, it is determined that the vehicle is in a bumpy state.
[0170] In an optional implementation, when it is determined that the ego vehicle is in a bumpy state, the distance between the ego vehicle and the target vehicle currently determined by the road image sequence is determined. When the distance between the ego vehicle and the target vehicle is less than or equal to 100m, the distance between the target vehicle and the ego vehicle is relatively close, and the position of the vehicle tail frame obtained by the camera sensor is relatively accurate and reliable, so the vehicle tail frame can be used for distance measurement compensation. At the same time, during the bumpy process of the ego vehicle, the longitudinal distance value of the target vehicle given by the perception algorithm also fluctuates around the true value, so the distance measurement can be compensated by using the average of the uncompensated longitudinal distance values of the target vehicle in the weighted adjacent frames of the vehicle tail frame position. Specifically, the vehicle speed at the current moment can be used , and the slope angle fluctuation time t of the previous time frames can be used to calculate the horizontal position L of the intersection of the slope and the ground plane from the camera, as shown in Formula 15:
[0171] (15)
[0172] Then use the horizontal position L, slope angle θ, camera installation height H c The virtual installation height H of the camera sensor relative to the slope can be obtained c0 , as shown in Formula 16:
[0173] (16)
[0174] Then, the camera sensor field of view angle α, the height H from the bottom of the wheel to the bottom of the car, and the image coordinate system height h are used. i , the focal length of the camera sensor f, and the distance y1 from the bottom edge of the detected vehicle tail frame to the bottom of the image plane can be used to obtain the actual distance D between the self-vehicle and the target vehicle after ranging compensation. a , as shown in Formula 17:
[0175] (17)
[0176] in, , so, we can get formula 18 by rearranging:
[0177] (18)
[0178] Secondly, the longitudinal distance value of the target vehicle given by the adjacent multi-frame perception algorithm is used to obtain the compensated ranging : When the vehicle is bumpy, the target vehicle longitudinal distance D output by the uncompensated perception algorithm is too close or too far, that is, it will fluctuate around the true value for n frames depending on the distance of the target. Therefore, according to Formula 19, we can get:
[0179] (19)
[0180] in, (In order to better adjust the threshold n, the approximate middle value 30 of the longest detection distance of 100m in the distance segment is set as a constant value). The longitudinal distance of the target vehicle output by the perception algorithm corresponding to each frame in the nearby n time frames without compensation. Then the distance is compensated using the vehicle tail frame Weighted distance mean Get the precise distance to the target ahead , as shown in Formula 20:
[0181] (20)
[0182] In an optional embodiment, when the distance between the target vehicle and the own vehicle given by the perception algorithm is greater than 100m and it is currently identified as daytime, the target vehicle is far away from the own vehicle, and the vehicle tail frame output by the perception algorithm is easily misdetected with the background, while the wheel contact point is relatively accurate. Moreover, during the bumpy process of the own vehicle, the longitudinal distance value of the target vehicle given by the perception algorithm also fluctuates around the true value. Therefore, the distance measurement can be compensated by using the uncompensated target vehicle longitudinal distance value average of the adjacent frames weighted by the wheel contact point.
[0183] In an optional embodiment, the wheel contact point is first used to perform compensation distance measurement D w : When the vehicle is bumpy, use the current speed of the vehicle , and the slope angle fluctuation time t of the previous few frames can be used to calculate the horizontal position L of the intersection of the slope and the ground plane from the camera, as shown in Formula 15, and then use the horizontal position L, slope angle θ, and camera installation height H c The virtual installation height H of the camera sensor relative to the slope can be obtained c0 , as shown in Formula 16.
[0184] Then, using the camera sensor field of view angle α and the image coordinate system height h i , the focal length of the camera sensor f, and the distance y2 from the detected wheel contact point to the bottom of the image plane can be used to obtain the actual distance between the self-vehicle and the target vehicle after ranging compensation. , as shown in Formula 21:
[0185] (twenty one)
[0186] in, , and we get formula 22:
[0187] (twenty two)
[0188] As mentioned above, the compensated ranging can be obtained using formula 19 , under this condition, (For a better adjustment of the threshold n, take the middle value of 50 of the closest detection distance of 100m in the distance segment and set it as a constant value). The longitudinal distance of the target vehicle output by the perception algorithm without compensation for each frame in the nearby n time frames. Using the assumed maximum detection distance of monocular vision of 250m as a constant value and the vehicle tail frame compensation distance , weighted distance mean Get the precise distance to the target ahead , as shown in Formula 23:
[0189] (twenty three)
[0190] In an optional implementation, when the distance between the self-vehicle and the target vehicle is greater than 100m and the scene is dark, the target vehicle is far away from the self-vehicle and the light is dim, the wheel contact point detection is inaccurate, and the longitudinal position of the vehicle taillight is relatively clear, which can provide a reference for distance compensation. In addition, during the bumping process of the self-vehicle, the longitudinal distance value of the target vehicle given by the perception algorithm also fluctuates around the true value. Therefore, the distance measurement can be compensated by using the weighted mean of the longitudinal distance value of the target vehicle in the adjacent frames of the vehicle taillight. Specifically, the vehicle taillight is first used to compensate the distance measurement D l : When the vehicle is bumpy, use the current speed of the vehicle , and the slope angle fluctuation time of the previous frames The horizontal position L of the intersection of the slope and the ground plane from the camera can be calculated, as shown in Formula 15, and then the horizontal position L, slope angle θ, and camera installation height H can be used to calculate the horizontal position L, slope angle θ, and camera installation height H. c The virtual installation height H of the camera sensor relative to the slope can be obtained c0 , as shown in Formula 16.
[0191] Then, using the camera's field of view , image coordinate system height , camera focal length f, height of headlight from the ground (This patent is defined according to the type of target vehicle , if the target vehicle in front is a small car, then for Vehicle height. If the target vehicle in front is a large vehicle, then for vehicle height), the longitudinal distance from the detected vehicle taillight to the bottom of the image plane The actual distance between the self-vehicle and the target vehicle after ranging compensation can be obtained , as shown in Formula 24:
[0192] (twenty four)
[0193] in, , and we get formula 25:
[0194] (25)
[0195] As mentioned above, the compensated ranging can be obtained using formula 19 , under this condition, (For a better adjustment of the threshold n, take the middle value of 50 of the closest detection distance of 100m in the distance segment and set it as a constant value). The longitudinal distance of the target vehicle output by the perception algorithm without compensation for each frame in the nearby n time frames. Using the assumed maximum detection distance of monocular vision of 250m as a constant value and the vehicle tail frame compensation distance , weighted distance mean Get the precise distance to the target ahead , as shown in Formula 26:
[0196] (26)
[0197] In an optional implementation, the distance measurement compensation of the ego vehicle in the previous step under the bumpy condition is completed. In order to further improve the accuracy of the distance measurement, it is necessary to determine whether the target vehicle is on a level road when the ego vehicle is in the bumpy condition, that is, to use the change in the distance of the target vehicle to make the judgment. Specifically, the first-order derivative of the difference in the distance change of the target vehicle between the first frame and the second frame after compensation is used as the current speed value of the target vehicle. , and get the second frame using the above method to calculate the distance between the target vehicle and the vehicle , and use this value to predict the distance traveled by the target vehicle in the next frame (i.e. the third frame) (within one frame). When it comes to the next frame (i.e. the third frame), the distance traveled by the vehicle is , then according to Calculate the distance between the vehicle and the target vehicle: ; Using the above method, the distance between the target vehicle and the vehicle is calculated as , and compare the two. If the target vehicle is on a relatively level road, the target vehicle distance value given by the above method is output as the final longitudinal distance. If the distance difference of 5 consecutive frames is greater than 5%, it means that the target vehicle is not on a level road, and the distance calculation will continue.
[0198] In an optional implementation, when it is currently determined that the ego vehicle is in a bumpy condition but the target vehicle is traveling on a slope, the bump angle obtained above can be used as the first slope angle of the ego vehicle, and the distance between the ego vehicle and the target vehicle can be calculated. When the ego vehicle is currently not in a bumpy condition and there is a stable slope value, it means that the ego vehicle is traveling uphill or downhill, and the slope of the target vehicle can be estimated, and the distance compensation can be performed to obtain the target distance.
[0199] In an optional embodiment, when the ego vehicle wishes to measure the distance to the target vehicle, it can first be determined whether there is a lane line object that meets the image quality condition in the road image sequence collected by the ego vehicle. The image quality condition can be that the lane line confidence is greater than a preset parameter, or that a lane line exists. In the case where there is a lane line object that meets the image quality condition, the first slope value of the first slope where the ego vehicle is located can be calculated using the feature point set of the lane line object. The type of the target vehicle can be determined using the road image to determine the width of the target vehicle, and the second slope value of the second slope where the target vehicle is located can be determined using the width of the target vehicle, the position change relationship between the ego vehicle and the target vehicle, and the first slope value. Then, the first slope value and the second slope value are used to perform ranging compensation to obtain the actual target distance between the ego vehicle and the target vehicle.
[0200] In an optional implementation, when there is no lane line object that meets the image quality condition, it can be determined whether there is a surrounding vehicle that meets the driving condition. When there is a surrounding vehicle that meets the driving condition, the first slope value corresponding to the first ramp can be determined using the width of the surrounding vehicle and the change in the positional relationship between the self-vehicle and the surrounding vehicle. The second slope value is calculated using the width of the target vehicle, the change in the positional relationship between the self-vehicle and the target vehicle, and the first slope value. Then, the first slope value and the second slope value are used to perform distance compensation to obtain the actual target distance between the self-vehicle and the target vehicle.
[0201] In an optional implementation, when there are no lane line objects that meet the image quality conditions and surrounding vehicles that meet the driving conditions, the reference slope value can be calculated using the wheel speed sensor, inertial measurement unit, etc. carried by the vehicle, and the reference slope value is used as the first slope value. Then the second slope value of the target vehicle is calculated. The first slope value and the second slope value are used to evaluate the current longitudinal distance to determine whether the current longitudinal distance is close or far.
[0202] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0203] According to another aspect of the embodiments of the present application, a distance measurement device under a ramp condition for implementing the distance measurement method under a ramp condition is also provided. Figure 8 As shown, the device comprises:
[0204] An acquisition unit 802 is used to acquire a road image sequence acquired by the vehicle, wherein the road image sequence includes road images acquired in multiple time frames;
[0205] The surrounding vehicle determining unit 804 is used to determine a surrounding vehicle that meets the driving condition from a plurality of vehicles included in the road image when the road image does not include a lane line object that meets the image quality condition, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and has traveled to the first ramp before the own vehicle;
[0206] A first slope determination unit 806, configured to determine a first slope value of the first ramp according to a change in a first position relationship between the self-vehicle and the surrounding vehicle;
[0207] A second slope determination unit 808 is configured to determine a second slope value of the second slope according to the first slope value and a change in a second positional relationship between the ego vehicle and the target vehicle when the ego vehicle drives onto the first slope and a target vehicle driving on the second slope is detected from the road image sequence;
[0208] The vehicle distance determination unit 810 is used to determine a target vehicle distance between the own vehicle and the target vehicle according to the first slope value, the second slope value and the geometric position relationship between the own vehicle and the target vehicle.
[0209] Optionally, the first slope determination unit 806 includes: a longitudinal distance acquisition module, used to acquire M longitudinal distances according to the M road images in the road image sequence, wherein the M longitudinal distances correspond to the M road images one by one, the longitudinal distance is the distance between the surrounding vehicle and the self-vehicle along the driving direction, and M is an integer greater than 1; a reference distance estimation module, used to estimate the speed of the surrounding vehicle in the M time frames using the M longitudinal distances, obtain M reference speeds corresponding to the M time frames, and use the M reference speeds to respectively determine the M reference longitudinal distances between the self-vehicle and the surrounding vehicle; a first slope value determination module, used to respectively calculate the first difference between the M longitudinal distances and the M reference longitudinal distances, and determine the first slope value according to the i-th longitudinal distance, the i-th reference speed and the i-th reference longitudinal distance when the first difference between the i-th longitudinal distance and the i-th reference longitudinal distance is greater than a first threshold, wherein i is an integer greater than or equal to 1 and less than or equal to M.
[0210] Optionally, the first slope value determination module is further used to: obtain a first distance traveled by the surrounding vehicle from the i-1th time frame to the i-th time frame according to the i-1th reference speed corresponding to the i-1th time frame and the length of the time frame interval between the time frames; obtain a second distance traveled by the self-vehicle from the i-1th time frame to the i-th time frame according to the self-vehicle speed corresponding to the i-1th time frame and the length of the time frame interval; obtain a first difference between the i-th longitudinal distance and the length of the surrounding vehicle, and obtain a second difference between the i-1th longitudinal distance and the second distance; obtain a third difference between the first difference and the second difference, and determine the first slope value according to the ratio of the third difference to the fourth difference, wherein the fourth difference is the difference between the first distance and the length of the surrounding vehicle.
[0211] Optionally, the longitudinal distance acquisition module is further used to: acquire the focal length of the image acquisition device used to acquire the road image sequence; acquire one of the road images as the current road image from the M road images; acquire the vehicle width ratio between the vehicle width length of the surrounding vehicle and the pixel width corresponding to the surrounding vehicle, wherein the pixel width is determined based on the image area matching the surrounding vehicle in the current road image; determine the current longitudinal distance matching the current road image based on the product of the vehicle width ratio and the focal length.
[0212] Optionally, the acquisition unit 802 includes: a feature point set acquisition module, used to acquire a feature point set indicating the lane line object in the road image when the road image includes a lane line object that meets the image quality condition; a variation coefficient acquisition module, used to acquire a feature variation coefficient of the feature point set based on the feature point set that matches the plurality of road images respectively; and a first slope value calculation module, used to determine the first slope value based on the feature variation coefficient.
[0213] Optionally, the first slope determination unit 806 further includes: a reference slope value acquisition module, used to obtain a reference slope value detected by the vehicle; and a first slope value update module, used to update the first slope value according to a weighted sum of the reference slope value and the first slope value when the difference between the first slope value and the reference slope value is greater than a second threshold.
[0214] Optionally, the reference slope value acquisition module is further used to: determine the lane line vanishing point based on the lane line object included in the road image, and obtain the reference slope value using the image coordinates of the lane line vanishing point and the calibrated vanishing point corresponding to the road image, wherein the lane line vanishing point is the intersection of the lane line object corresponding to the lane of the ego vehicle in the road image, and the calibrated vanishing point is used to calibrate the roll angle of the ego vehicle; obtain the ego vehicle acceleration of the ego vehicle object according to the current vehicle speed of the ego vehicle, and obtain the reference slope value according to the ego vehicle acceleration and longitudinal acceleration; obtain the reference slope value according to the pitch angular velocity of the ego vehicle.
[0215] Optionally, the second slope determination unit 808 comprises: a target longitudinal distance acquisition module, used to acquire P target longitudinal distances according to the P road images in the road image sequence, wherein the P target longitudinal distances correspond to the P road images one by one, the target longitudinal distance is the distance between the self-vehicle and the target vehicle determined according to the focal length of the image acquisition device, the vehicle width length of the target vehicle, and the pixel width corresponding to the target vehicle, and the P is an integer greater than 1; an estimated distance estimation module, used to estimate the speed of the target vehicle in the P time frames using the P target longitudinal distances, and obtain the speed of the target vehicle in the P time frames. a second slope value determination module, for respectively calculating second differences between the P target longitudinal distances and the P estimated longitudinal distances, and determining the second slope value according to the qth target longitudinal distance, the qth estimated speed, the qth estimated longitudinal distance and the first slope value when the second difference between the qth target longitudinal distance and the qth estimated longitudinal distance is greater than a third threshold, wherein q is an integer greater than or equal to 1 and less than or equal to P.
[0216] Optionally, the second slope value determination module is further used to: obtain a third distance traveled by the target vehicle from the q-1th time frame to the q-th time frame according to the q-1th estimated speed corresponding to the q-1th time frame and the length of the time frame interval between the time frames; obtain a fourth distance traveled by the target vehicle from the q-1th time frame to the q-th time frame according to the vehicle speed corresponding to the q-1th time frame and the length of the time frame interval; obtain a first product between the fourth distance and the cosine value corresponding to the first slope value, and obtain a fifth difference between the q-1th target longitudinal distance and the first product; determine the second slope value according to the ratio of the sixth difference to the third distance, wherein the sixth difference is the difference between the qth target longitudinal distance and the fifth difference.
[0217] Optionally, the above-mentioned vehicle distance determination unit 810 includes: a turning point determination module, used to determine the ramp turning point between the above-mentioned first ramp and the above-mentioned second ramp; a current distance acquisition module, used to obtain the current longitudinal distance between the above-mentioned vehicle and the above-mentioned target vehicle based on the current road image captured in the current time frame, wherein the above-mentioned current longitudinal distance is the distance between the above-mentioned vehicle and the above-mentioned target vehicle determined according to the focal length of the image acquisition device, the vehicle width length of the above-mentioned target vehicle, and the pixel width corresponding to the above-mentioned target vehicle; a parameter calculation module, used to obtain a first ratio between the fifth distance and the cosine value corresponding to the above-mentioned first slope value, and obtain a seventh difference between the above-mentioned current longitudinal distance and the above-mentioned fifth distance, wherein the above-mentioned fifth distance is the distance between the above-mentioned vehicle and the above-mentioned ramp turning point; a target vehicle distance determination module, used to sum the above-mentioned first ratio and the second ratio to obtain the above-mentioned target vehicle distance, wherein the above-mentioned second ratio is the ratio between the above-mentioned seventh difference and the cosine value corresponding to the above-mentioned second slope value.
[0218] Optionally, the turning point determination module is further used to: when the lane line object is included in the road image, obtain a set of feature points indicating the lane line object in the road image; determine the ramp turning point based on the set of feature points respectively matched with the plurality of road images; when the lane line object is not included in the road image, obtain the longitudinal distance between the surrounding vehicle and the self-vehicle in the road image, and calculate the distance change rate corresponding to the longitudinal distance in each time frame; determine the time frame corresponding to which the distance change rate is greater than a preset change threshold as a turning time frame, and determine the position of the surrounding vehicle corresponding to the turning time frame as the ramp turning point.
[0219] Optionally, the surrounding vehicle determination unit 804 further includes: a first ramp detection module, for determining that the ego vehicle is traveling on the first ramp when it is detected that the ego vehicle is in a bumpy state and the bump angles corresponding to the ego vehicle for N consecutive frames meet a first condition; and a second ramp detection module, for determining that the target vehicle is traveling on the second ramp when it is detected that the ego vehicle is in a bumpy state and the error value of the compensation result of ranging compensation performed under the bumpy state meets a second condition.
[0220] Optionally, in this embodiment, the embodiments to be implemented by the above-mentioned various unit modules can refer to the above-mentioned various method embodiments, which will not be repeated here.
[0221] According to another aspect of the embodiment of the present application, an electronic device for implementing the distance measurement method under the above-mentioned ramp working condition is also provided. The electronic device can be Fig. 9 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig. 9As shown, the electronic device includes a memory 902 and a processor 904. The memory 902 stores a computer program, and the processor 904 is configured to execute the steps in any of the above method embodiments through the computer program.
[0222] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0223] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0224] S1, obtaining a road image sequence collected by the vehicle, wherein the road image sequence includes road images collected respectively in multiple time frames;
[0225] S2, when the road image does not include a lane line object that meets the image quality condition, determine a surrounding vehicle that meets the driving condition from multiple vehicles included in the road image, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and has traveled to the first ramp before the own vehicle;
[0226] S3, determining a first slope value of the first ramp according to a change in a first position relationship between the own vehicle and the surrounding vehicle;
[0227] S4, when the ego vehicle travels on the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, determining a second slope value of the second ramp according to the first slope value and a change in a second positional relationship between the ego vehicle and the target vehicle;
[0228] S5, determining a target vehicle distance between the own vehicle and the target vehicle according to the first slope value, the second slope value and the geometric position relationship between the own vehicle and the target vehicle.
[0229] Alternatively, a person skilled in the art may understand that: Fig. 9 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig. 9 The electronic device and the electronic equipment described above are not limited in structure. Fig. 9 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig. 9 Different configurations shown.
[0230] Among them, the memory 902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the distance measurement method and device under the ramp condition in the embodiment of the present application. The processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, realizing the distance measurement method under the ramp condition mentioned above. The memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 902 may further include a memory remotely arranged relative to the processor 904, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 902 can be specifically, but not limited to, used to store information such as road images. As an example, such as Fig. 9 As shown, the memory 902 may include, but is not limited to, the acquisition unit 802, the surrounding vehicle determination unit 804, the first slope determination unit 806, the second slope determination unit 808, and the vehicle distance determination unit 810 in the distance measurement device under the slope working condition. In addition, other module units in the distance measurement device under the slope working condition may also be included but are not limited to, which will not be repeated in this example.
[0231] Optionally, the transmission device 906 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 906 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0232] In addition, the electronic device further includes: a display 908 for displaying a virtual scene in an interface; and a connection bus 910 for connecting various module components in the electronic device.
[0233] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0234] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0235] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0236] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the distance measurement method under the above-mentioned ramp working condition.
[0237] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0238] S1, obtaining a road image sequence collected by the vehicle, wherein the road image sequence includes road images collected respectively in multiple time frames;
[0239] S2, when the road image does not include a lane line object that meets the image quality condition, determine a surrounding vehicle that meets the driving condition from multiple vehicles included in the road image, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and has traveled to the first ramp before the own vehicle;
[0240] S3, determining a first slope value of a first slope according to a change in a first position relationship between the own vehicle and the surrounding vehicle;
[0241] S4, when the ego vehicle travels on the first ramp and a target vehicle traveling on the second ramp is detected from the road image sequence, determining a second slope value of the second ramp according to the first slope value and a change in a second positional relationship between the ego vehicle and the target vehicle;
[0242] S5, determining a target vehicle distance between the own vehicle and the target vehicle according to the first slope value, the second slope value and the geometric position relationship between the own vehicle and the target vehicle.
[0243] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0244] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers or network devices, etc.) to execute all or part of the steps of the above methods in each embodiment of the present application.
[0245] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0246] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0247] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0249] The above are only preferred implementations of the present application. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A distance measurement method under ramp conditions, characterized in that: include: Acquire a road image sequence collected by the vehicle, wherein the road image sequence includes road images collected respectively in a plurality of time frames; In a case where the road image does not include a lane line object that meets the image quality condition, determining a surrounding vehicle that meets the driving condition from a plurality of vehicles included in the road image, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and has traveled to the first ramp before the own vehicle; determining a first slope value of the first ramp according to a longitudinal distance between the self-vehicle and the surrounding vehicle, a reference longitudinal distance, and a reference speed of the surrounding vehicle, wherein the longitudinal distance is a distance between the surrounding vehicle and the self-vehicle determined according to the road image, the reference speed is an estimated speed of the surrounding vehicle, and the reference longitudinal distance is a distance between the surrounding vehicle and the self-vehicle determined according to the reference speed; When the ego vehicle travels to the first ramp and a target vehicle traveling on a second ramp is detected from the road image sequence, a second slope value of the second ramp is determined according to the first slope value and a target longitudinal distance, an estimated longitudinal distance and an estimated speed of the target vehicle between the ego vehicle and the target vehicle, wherein the target longitudinal distance is the distance between the ego vehicle and the target vehicle determined according to the road image, the estimated speed is the estimated speed of the target vehicle, and the estimated longitudinal distance is the distance between the target vehicle and the ego vehicle determined according to the estimated speed; A target vehicle distance between the own vehicle and the target vehicle is determined according to the first slope value, the second slope value, and a geometric position relationship between the own vehicle and the target vehicle.
2. The method according to claim 1, characterized in that The determining of the first slope value of the first ramp according to the longitudinal distance between the own vehicle and the surrounding vehicle, the reference longitudinal distance and the reference speed of the surrounding vehicle comprises: According to the M road images in the road image sequence, M longitudinal distances are respectively acquired, wherein the M longitudinal distances correspond to the M road images one by one, the longitudinal distance is the distance between the surrounding vehicle and the own vehicle along the driving direction, and M is an integer greater than 1; Using the M longitudinal distances, the speed of the surrounding vehicle in the M time frames is estimated to obtain M reference speeds corresponding to the M time frames, and using the M reference speeds to respectively determine M reference longitudinal distances between the self-vehicle and the surrounding vehicle; The first differences between the M longitudinal distances and the M reference longitudinal distances are calculated respectively, and when the first difference between the i-th longitudinal distance and the i-th reference longitudinal distance is greater than a first threshold, the first slope value is determined according to the i-th longitudinal distance, the i-th reference speed and the i-th reference longitudinal distance, wherein i is an integer greater than or equal to 1 and less than or equal to M.
3. The method according to claim 2, characterized in that The determining the first slope value according to the i-th longitudinal distance, the i-th reference speed and the i-th reference longitudinal distance comprises: According to the i-1th reference speed corresponding to the i-1th time frame and the time frame interval between the time frames, obtaining a first distance traveled by the peripheral vehicle from the i-1th time frame to the i-th time frame; Obtaining a second distance traveled by the vehicle from the i-1th time frame to the i-th time frame according to the vehicle speed corresponding to the i-1th time frame and the time frame interval; Obtain a first difference between the i-th longitudinal distance and the surrounding vehicle length, and obtain a second difference between the i-1-th longitudinal distance and the second distance; A third difference between the first difference and the second difference is obtained, and the first slope value is determined according to a ratio between the third difference and a fourth difference, wherein the fourth difference is a difference between the first distance and the circumferential vehicle length.
4. The method according to claim 2, characterized in that: The acquiring M longitudinal distances respectively according to the M road images in the road image sequence comprises: Acquire the focal length of an image acquisition device used to acquire the road image sequence; Acquire one of the road images as a current road image from the M road images; Acquire a vehicle width ratio between a vehicle width length of the surrounding vehicle and a pixel width corresponding to the surrounding vehicle, wherein the pixel width is determined according to an image area matching the surrounding vehicle in the current road image; A current longitudinal distance matching the current road image is determined according to a product of the vehicle width ratio and the focal length.
5. The method according to claim 2, characterized in that: After obtaining the road image sequence collected by the vehicle, the method further includes: In a case where the road image includes a lane line object that satisfies the image quality condition, acquiring a set of feature points indicating the lane line object in the road image; Acquire a characteristic variation coefficient of the characteristic point set according to the characteristic point set respectively matched with the plurality of road images; The first slope value is determined according to the characteristic variation coefficient.
6. The method according to claim 1, characterized in that Before determining the second slope value of the second slope according to the first slope value and the target longitudinal distance between the self-vehicle and the target vehicle, the estimated longitudinal distance and the estimated speed of the target vehicle, the method further includes: Acquiring a reference slope value detected by the vehicle; When the difference between the first slope value and the reference slope value is greater than a second threshold, the first slope value is updated according to a weighted sum of the reference slope value and the first slope value.
7. The method according to claim 6, characterized in that The obtaining of the reference slope value detected by the vehicle includes one of the following: Determine a lane line vanishing point based on the lane line object included in the road image, and obtain the reference slope value using the image coordinates of the lane line vanishing point and a calibration vanishing point corresponding to the road image, wherein the lane line vanishing point is an intersection of the lane line object corresponding to the lane of the vehicle in the road image, and the calibration vanishing point is used to calibrate the roll angle of the vehicle; Acquire the vehicle acceleration of the vehicle according to the current vehicle speed of the vehicle, and acquire the reference slope value according to the vehicle acceleration and the longitudinal acceleration; The reference slope value is obtained according to the pitch angular velocity of the vehicle.
8. The method according to claim 1, characterized in that: Determining a second slope value of the second ramp according to the first slope value, a target longitudinal distance between the vehicle and the target vehicle, an estimated longitudinal distance, and an estimated speed of the target vehicle includes: According to the P road images in the road image sequence, P target longitudinal distances are respectively obtained, wherein the P target longitudinal distances correspond to the P road images one by one, the target longitudinal distance is the distance between the self-vehicle and the target vehicle determined according to the focal length of the image acquisition device, the vehicle width length of the target vehicle, and the pixel width corresponding to the target vehicle, and P is an integer greater than 1; Using the P target longitudinal distances to estimate the speed of the target vehicle in the P time frames, obtaining P estimated speeds corresponding to the P time frames, and using the P estimated speeds to respectively determine P estimated longitudinal distances between the self-vehicle and the target vehicle; The second differences between the P target longitudinal distances and the P estimated longitudinal distances are calculated respectively, and when the second difference between the qth target longitudinal distance and the qth estimated longitudinal distance is greater than a third threshold, the second slope value is determined according to the qth target longitudinal distance, the qth estimated speed, the qth estimated longitudinal distance and the first slope value, wherein q is an integer greater than or equal to 1 and less than or equal to P.
9. The method according to claim 8, characterized in that Determining the second slope value according to the qth target longitudinal distance, the qth estimated speed, the qth estimated longitudinal distance and the first slope value comprises: Obtaining a third distance traveled by the target vehicle from the q-1th time frame to the qth time frame according to the q-1th estimated speed corresponding to the q-1th time frame and the time frame interval between the time frames; Obtaining a fourth distance traveled by the vehicle from the q-1th time frame to the qth time frame according to the speed of the vehicle corresponding to the q-1th time frame and the time frame interval; Obtaining a first product between the fourth distance and the cosine value corresponding to the first slope value, and obtaining a fifth difference between the q-1th target longitudinal distance and the first product; The second slope value is determined according to a ratio between a sixth difference value and the third distance, wherein the sixth difference value is a difference between the qth target longitudinal distance and the fifth difference value.
10. The method according to claim 1, characterized in that The step of determining a target vehicle distance between the vehicle and the target vehicle according to the first slope value, the second slope value, and a geometric position relationship between the vehicle and the target vehicle includes: determining a ramp turning point between the first ramp and the second ramp; According to the current road image acquired in the current time frame, the current longitudinal distance between the self-vehicle and the target vehicle is acquired, wherein the current longitudinal distance is the distance between the self-vehicle and the target vehicle determined according to the focal length of the image acquisition device, the vehicle width length of the target vehicle, and the pixel width corresponding to the target vehicle; Obtaining a first ratio between a fifth distance and a cosine value corresponding to the first slope value, and obtaining a seventh difference between the current longitudinal distance and the fifth distance, wherein the fifth distance is the distance between the vehicle and the ramp turning point; The target vehicle distance is obtained by summing the first ratio and the second ratio, wherein the second ratio is the ratio between the seventh difference and the cosine value corresponding to the second slope value.
11. The method according to claim 10, characterized in that The step of determining a ramp turning point between a first ramp corresponding to the first slope value and a second ramp corresponding to the second slope value comprises: In the case where the lane line object is included in the road image, obtaining a feature point set indicating the lane line object in the road image; determining the ramp turning point according to the feature point set respectively matched with a plurality of the road images; When the lane line object is not included in the road image, the longitudinal distance between the surrounding vehicle and the vehicle itself in the road image is obtained, and the distance change rate corresponding to the longitudinal distance in each time frame is calculated; the time frame corresponding to the distance change rate being greater than a preset change threshold is determined as a turning time frame, and the position of the surrounding vehicle corresponding to the turning time frame is determined as the ramp turning point.
12. The method according to claim 1, characterized in that In the case that the road image does not include a lane line object that meets the image quality condition, before determining a surrounding vehicle that meets the driving condition from a plurality of vehicles included in the road image, the method further includes one of the following: When it is detected that the vehicle is in a bumpy state and the bump angles corresponding to the vehicle for N consecutive frames satisfy a first condition, determining that the vehicle is traveling on the first ramp; When it is detected that the vehicle is in a bumpy state and an error value of a compensation result of distance compensation performed in the bumpy state satisfies a second condition, it is determined that the target vehicle is traveling on the second slope.
13. A distance measuring device under ramp conditions, characterized in that: include: An acquisition unit, used to acquire a road image sequence acquired by the vehicle, wherein the road image sequence includes road images acquired respectively in a plurality of time frames; a surrounding vehicle determining unit, configured to determine a surrounding vehicle that meets a driving condition from a plurality of vehicles included in the road image when no lane line object that meets an image quality condition is included in the road image, wherein the surrounding vehicle is a vehicle that is in an adjacent lane and that travels to the first ramp before the own vehicle; a first slope determination unit, configured to determine a first slope value of the first ramp according to a longitudinal distance between the ego vehicle and the surrounding vehicle, a reference longitudinal distance, and a reference speed of the surrounding vehicle, wherein the longitudinal distance is a distance between the surrounding vehicle and the ego vehicle determined according to the road image, the reference speed is an estimated speed of the surrounding vehicle, and the reference longitudinal distance is a distance between the surrounding vehicle and the ego vehicle determined according to the reference speed; a second slope determination unit, configured to determine a second slope value of the second slope according to the first slope value and a target longitudinal distance, an estimated longitudinal distance and an estimated speed of the target vehicle between the self-vehicle and the target vehicle, when the self-vehicle travels to the first slope and a target vehicle traveling on the second slope is detected from the road image sequence, wherein the target longitudinal distance is the distance between the self-vehicle and the target vehicle determined according to the road image, the estimated speed is the estimated speed of the target vehicle, and the estimated longitudinal distance is the distance between the target vehicle and the self-vehicle determined according to the estimated speed; The vehicle distance determination unit is used to determine a target vehicle distance between the own vehicle and the target vehicle according to the first slope value, the second slope value and the geometric position relationship between the own vehicle and the target vehicle.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 12 when executed.
15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.
16. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 12 through the computer program.
