Vehicle distance determination method and device, equipment and storage medium

By performing straight-side fitting of the side of the vehicle cut off by the image edge line, the problem of large vehicle distance measurement error in autonomous driving is solved, accurate measurement of the cut off vehicle distance is achieved, and the reliability of the automatic driving system is improved.

CN119832080APending Publication Date: 2025-04-15CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510050748.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the existing autonomous driving technology, for vehicles cut off by the edge line of the image, distance measurement often produces large errors, resulting in misbraking and missing brakes.

Method used

By inputting the captured image into the preset detection model, image information is acquired, and the target vehicle truncated by the edge line of the image is determined. Then, based on the segmentation information in the entire frame of the target vehicle, the side frame is determined, and the data fit is performed through the wheel grounding point, the center point of the bottom frame of the wheel frame and the set of grounded free travel points to obtain the side line. This lateral straight line is used to characterize the junction line between the target vehicle and the ground, and thereby determine the distance between the target vehicle and the main vehicle.

Benefits of technology

By fitting the side line, the effective observation point of the cut-off vehicle is accurately determined, thereby improving the accuracy of measuring the cut-off vehicle and the vehicle's distance, reducing the occurrence of erroneous brakes and missing brakes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832080A_ABST
    Figure CN119832080A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle distance determination method and device, equipment and a storage medium, and the method comprises the steps: inputting a collected image into a preset detection model, and obtaining the image information of the image; according to the image information, determining a target vehicle cut off by an image edge line; determining a side frame of the target vehicle according to the segmentation information in the whole vehicle frame of the target vehicle; performing data fitting according to the wheel grounding point in the side frame, the center point of the bottom frame of the wheel frame and the grounding free running point set to obtain a side edge straight line; the side straight line is used for representing a boundary line between the target vehicle and the ground; determining a pixel coordinate of the first observation point according to the side straight line and the whole vehicle frame; and determining the distance between the target vehicle and the vehicle according to the pixel coordinates of the first observation point. According to the embodiment of the invention, the vehicle distance can be accurately measured for the cut-off vehicle collected by the vehicle camera, and powerful reference data is provided for automatic driving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of autonomous driving vehicles, and mainly to a method, device, equipment and storage medium for determining vehicle distance. Background Art

[0002] With the continuous advancement of autonomous driving technology, the accuracy of speed and distance measurement of vehicle targets in autonomous driving is increasing. For the front-view camera, the distance and speed measurement of vehicle targets close to the blind spot on the side is a difficult and important issue. This type of target is close to the vehicle and has a high risk factor. In related technologies, the Internet of Vehicles is used to obtain target features and the external parameter position of the camera to determine the position relationship between the front and rear vehicles. For some targets at the edge of the visual field, this solution is cut off by the edge of the image, and the visible part of the target vehicle is small. The distance measurement of this working condition often produces large errors, which leads to misjudgment of the autonomous driving system, false braking, missed braking and other phenomena.

[0003] Therefore, how to accurately measure the distance of a cut-off vehicle is a difficult problem that needs to be solved at present. Summary of the invention

[0004] One of the purposes of the present application is to provide a method for determining vehicle distance to solve or at least partially solve the problems in the related art. The second purpose of the present application is to provide a device for determining vehicle distance. The third purpose of the present application is to provide an electronic device. The fourth purpose of the present application is to provide a medium.

[0005] In order to achieve the above purpose, the technical solution of this application is as follows: A method for determining vehicle distance, the method comprising: Inputting the collected image into a preset detection model to obtain image information of the image; Determining a target vehicle cut off by an image edge line according to the image information; Determining a side frame of the target vehicle according to segmentation information within the full vehicle frame of the target vehicle; Data fitting is performed based on the wheel grounding point, the wheel frame bottom frame center point and the grounding free travel point set in the side frame to obtain a side straight line; the side straight line is used to represent the boundary line between the target vehicle and the ground; Determining pixel coordinates of a first observation point according to the side straight line and the full vehicle frame; The distance between the target vehicle and the host vehicle is determined according to the pixel coordinates of the first observation point.

[0006] Optionally, performing data fitting according to the wheel contact point, the wheel frame bottom frame center point and the contact free running point set in the side frame to obtain the side straight line includes: Extracting pixel coordinates of the wheel contact point and the center point of the wheel frame bottom frame of the target vehicle from the image information; Traversing the free travel points within the side frame to obtain a ground contact free travel point set where the target vehicle is grounded; Fitting the equation of the straight line according to the pixel coordinates of the wheel contact point, the center point of the wheel frame bottom frame and the contact free running point set; When the straight line equation satisfies a preset condition, a side straight line of the vehicle is determined.

[0007] Optionally, determining the distance between the target vehicle and the host vehicle according to the pixel coordinates of the first observation point includes: Determine the pixel coordinates of the target observation point according to the length, width, height, heading angle of the target vehicle and the pixel coordinates of the first observation point; According to the camera parameters, the pixel coordinates of the target observation point are converted into the physical coordinates of the target observation point in the vehicle coordinate system; The distance between the target vehicle and the host vehicle is determined according to the physical coordinates.

[0008] Optionally, the method further includes: inputting the distance into a Kalman filter; The distance is adjusted by the Kalman filter.

[0009] Optionally, the method further includes: Detecting whether there is lane line information in the image information; In the case where the lane line information exists in the image information, the distance is corrected according to the lane line information of the lane where the target vehicle is located.

[0010] Optionally, determining the pixel coordinates of the first observation point according to the side straight line and the full vehicle frame includes: Determine the intersection point of the side straight line and the full vehicle frame; Determine the intersection point with the largest distance from the side edge line of the image as the first observation point; Obtain pixel coordinates of the first observation point.

[0011] Optionally, determining the side frame of the target vehicle according to the segmentation information within the full vehicle frame of the target vehicle includes: Determine the corner points of the full vehicle frame and the rear frame or the front frame of the target vehicle according to the segmentation information; The side frame where the side edge of the target vehicle is located is determined according to the corner point.

[0012] A vehicle distance determination device, the device comprising: An acquisition module, used to input the collected image into a preset detection model to acquire image information of the image; A first determination module is used to determine the target vehicle cut off by the image edge line according to the image information; A second determination module is used to determine the side frame of the target vehicle according to the segmentation information within the full vehicle frame of the target vehicle; A data fitting module is used to perform data fitting based on the wheel grounding point, the wheel frame bottom frame center point and the grounding free travel point set in the side frame to obtain a side straight line; the side straight line is used to represent the boundary line between the target vehicle and the ground; A third determination module is used to determine the pixel coordinates of the first observation point according to the side straight line and the full vehicle frame; The fourth determination module is used to determine the distance between the target vehicle and the host vehicle according to the pixel coordinates of the first observation point.

[0013] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned vehicle distance determination method when executing the computer program.

[0014] A non-volatile storage medium stores a computer program, which implements the above-mentioned vehicle distance determination method when executed by a processor.

[0015] Beneficial effects of this application: In the present application, the image information of the image is obtained by inputting the collected image into a preset detection model; according to the image information, the target vehicle cut off by the edge line of the image is determined; according to the segmentation information in the full vehicle frame of the target vehicle, the side frame of the target vehicle is determined; according to the wheel grounding point, the center point of the wheel frame bottom frame and the grounding free driving point set in the side frame, data fitting is performed to obtain a side straight line; the side straight line is used to characterize the boundary line between the target vehicle and the ground; according to the side straight line and the full vehicle frame, the pixel coordinates of the first observation point are determined; according to the pixel coordinates of the first observation point, the distance between the target vehicle and the vehicle is determined. In this way, for the target vehicle cut off by the edge line of the image, the side straight line is fitted using the available pixel points in the side frame of the vehicle to conveniently determine the effective observation points in the target vehicle, so that the distance between the cut-off vehicle and the vehicle can be accurately determined based on the observation points, providing powerful reference data for vehicle automatic driving. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 is a flow chart of a method for determining vehicle distance in one embodiment of the present application; Figure 2 is a schematic diagram of a cut-off vehicle in one embodiment of the present application; Figure 3 is a schematic diagram of a vehicle frame in a vehicle distance determination method described in an embodiment of the present application; Figure 4 is a side straight line schematic diagram of a vehicle distance determination method described in an embodiment of the present application; Figure 5 is a partial logic diagram of a method for determining vehicle distance in one embodiment of the present application; Figure 6 It is a schematic diagram of the framework of the vehicle distance determination device described in one embodiment of the present application.

[0018] Among them, 600 is a vehicle distance determination device, 601 is an acquisition module, 602 is a first determination module, 603 is a second determination module, 604 is a data fitting module, 605 is a third determination module, and 606 is a fourth determination module. DETAILED DESCRIPTION

[0019] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.

[0020] Reference Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for determining vehicle distance in an embodiment of the present application. Figure 1 As shown, in one embodiment of the present application, the vehicle distance determination method can be specifically performed according to the following steps: Step S101: input the collected image into a preset detection model to obtain image information of the image.

[0021] Specifically, the front camera of the vehicle captures an image and inputs the image into a preset detection model. The preset detection model is a pre-trained image processing neural network model, which is used to parse the input image and identify the information of each vehicle, pedestrian, lane line, road sign, etc. included in the image. When parsing the vehicle in the image, the vehicle's full frame, wheel frame, midpoint of the wheel frame bottom frame, wheel grounding point, and rear frame (or front frame) can be segmented, and key points on the vehicle (such as license plate, vehicle outer contour endpoint, headlight, etc.) are marked. Therefore, the image captured by the camera of the vehicle is input into the preset detection model, and the preset detection model parses the image to obtain the above information included in the image, so as to determine whether the truncated vehicle targeted by the technical solution of the present application exists in the image, that is, step S102 is executed.

[0022] Step S102: determining the target vehicle cut off by the image edge line according to the image information.

[0023] Specifically, after acquiring the image information, it is possible to determine whether there is a vehicle cut off by the edge line of the image in the image according to the full frame state of the vehicle identified in the image. Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a cut-off vehicle in a method for determining vehicle distance in an embodiment of the present application. Figure 2 As shown, the vehicle in the image is the cut-off vehicle. It can be understood that if the full frame of the vehicle is cut off by the left or right edge line of the image and is at the edge of the visual angle, it can be determined that there is a cut-off vehicle in the image, and the vehicle is the target vehicle.

[0024] Step S103, determining the side frame of the target vehicle according to the segmentation information within the full vehicle frame of the target vehicle.

[0025] Specifically, the side frame of the target vehicle can be understood as the rectangular frame where the side of the vehicle on the window side is exposed in the visual field in the image. The segmentation information within the full vehicle frame of the target vehicle includes but is not limited to the wheel frame, the rear frame, the front frame, and the marking points of each component in the vehicle. In practical applications, the segmentation information that can be identified by the target vehicle may be different due to the different display parts in the image. It may be that only part of the rear of the vehicle is photographed, or the rear of the vehicle is not photographed; it may also be that part of the front of the vehicle is not photographed, or the front of the vehicle is not photographed at all. Therefore, the segmentation information of the target vehicle may only have the full vehicle frame and the rear frame, or only the full vehicle frame and the front frame, or only the identified full vehicle frame, without the rear frame or the front frame.

[0026] In a feasible implementation manner, the above step S103, determining the side frame of the target vehicle according to the segmentation information within the full vehicle frame of the target vehicle, may specifically include: Determine the corner points of the full vehicle frame and the rear frame or the front frame of the target vehicle according to the segmentation information; The side frame where the side edge of the target vehicle is located is determined according to the corner point.

[0027] Specifically, if the segmentation information in the full vehicle frame includes the rear frame or the front frame, the side frame of the vehicle can be determined according to the corner points of the full vehicle frame and the rear frame or the front frame of the target vehicle. Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a vehicle frame in a vehicle distance determination method described in an embodiment of the present application. Figure 3 As shown, taking the determination of the side frame according to the corner points of the full vehicle frame and the rear frame of the target vehicle (such as taking the upper left corner point and the lower right corner point) as an example: the coordinate vertex of the full vehicle frame in the figure is AB, the coordinate vertex of the rear frame is CD, and the coordinate vertex of the side frame is AE, that is, the part of the full vehicle frame except the rear frame is the side frame.

[0028] In addition, in other scenarios, the entire vehicle frame of the target vehicle may also be determined as the side frame.

[0029] In this embodiment, an example is given of how to determine the side frame of the window side of the target vehicle, so that it is easy to determine the position where the side of the vehicle contacts the ground, thereby increasing the speed of determining the ground contact free driving point set and improving the efficiency of data processing.

[0030] Step S104, performing data fitting according to the wheel ground contact point, the wheel frame bottom frame center point and the ground contact free running point set in the side frame to obtain a side straight line.

[0031] Specifically, the side straight line is used to characterize the boundary line between the target vehicle and the ground. After determining the side frame of the target vehicle, the wheel grounding point and the center point of the wheel frame bottom frame in the side frame can be determined according to the information recognized by the preset detection model. In the side frame, the blank area on the ground is a drivable area, which has many free driving points. According to the label of each pixel point in the image, these free driving points (freespace points) are traversed, and a set of free driving points at the junction of the target vehicle and the ground can be obtained, and the ground free driving point set in the side frame can be obtained. According to the pixel coordinates of the wheel grounding point, the center point of the wheel frame bottom frame and the ground free driving point set, data fitting is performed to obtain the side straight line representing the boundary line between the target vehicle and the ground.

[0032] In some scenarios, if there are multiple wheel rims in the side frame, the two farthest from the vehicle are selected as the wheel rims to be used to reduce the amount of data processing. At the same time, the position of the wheel rims farther away from the vehicle is clearer, which is conducive to improving the accuracy of the vehicle distance.

[0033] It should be noted that if the wheel contact point and the center point of the wheel frame bottom frame are not within the side frame, the data of the target vehicle is unavailable and all processes will be terminated directly. Therefore, before fitting the side straight line, the data of the target vehicle can be checked to determine whether the vehicle wheel contact point is within the vehicle frame and whether the wheel frame is within the vehicle frame. If not, the data of the target vehicle is unavailable and the subsequent vehicle distance determination step will not be continued.

[0034] Step S105: determining the pixel coordinates of the first observation point according to the side straight line and the full vehicle frame.

[0035] Specifically, refer to Figure 4 , Figure 4 Schematic diagram of the side straight line of the method for determining the vehicle distance in one embodiment of the present application. Figure 4 As shown in the figure, the position of the black arrow is the fitted side straight line. By extending the side straight line, the intersection of the straight line and the vehicle frame can be obtained. The intersection of the straight line and the vehicle frame after extending the straight line to the inside of the image is the first observation point. Figure 4 It can be understood as a front vertex of the target vehicle (a projection point of the front part of the vehicle on the ground). At this time, the pixel coordinates of the first observation point in the image can be determined.

[0036] Step S106, determining the distance between the target vehicle and the host vehicle according to the pixel coordinates of the first observation point.

[0037] Specifically, after determining the pixel coordinates of the first observation point, the principle of extrinsic distance measurement is used to substitute the pixel coordinates into the distance measurement equation, and the pixel coordinates of the first observation point are converted into physical coordinates in the vehicle coordinate system established according to the position of the vehicle, so as to determine the distance between the target vehicle and the vehicle.

[0038] In this embodiment, the image information of the image is obtained by inputting the collected image into a preset detection model; according to the image information, the target vehicle cut off by the edge line of the image is determined; according to the segmentation information in the full vehicle frame of the target vehicle, the side frame of the target vehicle is determined; according to the wheel grounding point, the wheel frame bottom frame center point and the grounding free driving point set in the side frame, data fitting is performed to obtain a side straight line; the side straight line is used to characterize the boundary line between the target vehicle and the ground; according to the side straight line and the full vehicle frame, the pixel coordinates of the first observation point are determined; according to the pixel coordinates of the first observation point, the distance between the target vehicle and the vehicle is determined. In this way, for the target vehicle cut off by the edge line of the image, the side straight line is fitted using the available pixel points in the side frame of the vehicle to conveniently determine the effective observation point in the target vehicle, so that the distance between the cut-off vehicle and the vehicle can be accurately determined based on the observation point, providing powerful reference data for the vehicle's automatic driving.

[0039] In actual applications, when calculating the distance between two vehicles, the midpoint of the bottom of the rear frame of the front vehicle is used as the standard observation point. Therefore, in order to improve the versatility of the technical solution, in a feasible implementation, step S106, determining the distance between the target vehicle and the vehicle according to the pixel coordinates of the first observation point, may specifically include: Determine the pixel coordinates of the target observation point according to the length, width, height, heading angle of the target vehicle and the pixel coordinates of the first observation point; According to the camera parameters, the pixel coordinates of the target observation point are converted into the physical coordinates of the target observation point in the vehicle coordinate system; The distance between the target vehicle and the host vehicle is determined according to the physical coordinates.

[0040] Specifically, after determining the position of the first observation point on the image, the pixel coordinates of the first observation point can be obtained. The length, width and height information of the target vehicle can be calculated through the vehicle type, full vehicle frame and related segmentation points (such as lights, wheels, corner points of window edges, rearview mirrors, vehicle body contour endpoints, license plates, etc.) of the target vehicle. According to the heading angle of the target vehicle and the pixel coordinates of the first observation point and the above-mentioned length, width and height information, the position of the target observation point relative to the first observation point can be determined, so as to convert the first observation point to the target observation point (such as the standard observation point of the midpoint of the bottom frame of the rear frame) and determine the physical coordinates of the target observation point in the vehicle coordinate system. The vehicle coordinate system is a coordinate system established with a certain point in the vehicle as the center. For example, the center of the rear axle of the vehicle is the origin, the direction of the front of the vehicle is x, and the vertical left of the direction of the front of the vehicle is the positive direction of the y axis. In this way, according to the camera parameters, the external parameter ranging algorithm is used to convert a certain pixel coordinate into a physical coordinate in the vehicle coordinate system, so that the physical coordinate of the target observation point in the vehicle coordinate system can be determined. The horizontal and vertical coordinates of the physical coordinates are the horizontal and vertical distances between the target vehicle cut off by the edge of the image and the host vehicle.

[0041] In this embodiment, the first observation point is converted to the target observation point, and the vehicle distance is determined by the coordinates of the target observation point. This facilitates docking with other engineering standards and improves the versatility of the solution.

[0042] In a feasible implementation manner, the above step S104, performing data fitting according to the wheel contact point in the side frame, the center point of the wheel frame bottom frame and the contact free running point set to obtain the side straight line, may specifically include: The pixel coordinates of the wheel contact point and the center point of the wheel frame bottom frame of the target vehicle are extracted from the image information; the free driving points in the side frame are traversed to obtain the ground contact free driving point set of the target vehicle; the straight line equation is fitted according to the pixel coordinates of the wheel contact point, the center point of the wheel frame bottom frame and the ground contact free driving point set; when the straight line equation meets the preset conditions, the side straight line of the vehicle is determined.

[0043] Specifically, when the preset detection model identifies information in the image, it can mark the key points in each vehicle and add labels to the pixels included in the identified different objects, so that each pixel is associated with the identifier of the object to which it belongs. When fitting the side straight line, the wheel grounding point and the center point of the wheel frame bottom frame of the target vehicle can be directly obtained through the image information output by the preset detection model; then the free driving points in the side frame are traversed according to the labels of the pixel points, for example, the pixel points are traversed in the form of columns. If the previous pixel point in a column belongs to the target vehicle and the next pixel point belongs to the ground, then the pixel point is a grounding free driving point, so as to obtain the grounding free driving point set of the target vehicle. According to the pixel coordinates of the wheel grounding point, the center point of the wheel frame bottom frame and the grounding free driving point set, data fitting is performed to fit a straight line equation. In order to further accurately determine the first observation point, the quality of the linear equation can be tested: the distances between the points used in data fitting and the linear equation are calculated, and then the variances of these distances are calculated. The variances are compared with the preset empirical values. If the variances exceed the empirical values, it is determined that the linear equation meets the preset conditions and meets the quality requirements. The side straight line is then determined based on the linear equation.

[0044] In this embodiment, by fitting the side straight line and performing quality detection on the side straight line, the accuracy of the first observation point is improved, thereby further improving the accuracy of the subsequent measured vehicle distance.

[0045] In a feasible implementation manner, step S105, determining the pixel coordinates of the first observation point according to the side straight line and the full vehicle frame, may specifically include: Determine the intersection point of the side straight line and the full vehicle frame; Determine the intersection point with the largest distance from the side edge line of the image as the first observation point; Obtain pixel coordinates of the first observation point.

[0046] Specifically, after the side straight line is extended, the intersection of the side straight line and the frame of the whole vehicle frame is obtained. Usually, there are two intersections between the side straight line and the frame of the whole vehicle frame. It can be understood that since the target vehicle is a truncated vehicle, its whole vehicle frame is truncated by the edge of the image. Therefore, the intersection close to the side edge line of the image has a lower reference significance than the intersection inside the image. In this embodiment, the intersection with the largest distance from the side edge line of the image is taken as the first observation point. After the first observation point is determined, the pixel coordinates of the first observation point can be obtained.

[0047] In this embodiment, the intersection point with the largest distance from the side edge line of the image is determined as the first observation point, which can more clearly and conveniently identify the observation point, so as to improve the accuracy of the subsequent vehicle distance measurement.

[0048] In one embodiment of the present application, due to complex road conditions, the target vehicle and the vehicle are traveling on a bumpy road, resulting in errors in the measured data. Therefore, the above-mentioned vehicle distance determination method further includes: The distance is input into a Kalman filter; and the distance is adjusted by the Kalman filter.

[0049] Specifically, Kalman filtering is an algorithm that uses the linear system state equation to optimally estimate the system state through the system input and output observation data. Since the observation data includes the influence of noise and interference in the system, the optimal estimate can also be regarded as a filtering process. In order to avoid the error between the vehicle distance and the actual vehicle distance caused by interference factors such as road conditions during vehicle driving, the measured vehicle distance is input into the Kalman filter as an observation value to smooth the measured vehicle distance.

[0050] In this embodiment, the measured distance between two vehicles is input into a Kalman filter to perform smoothing on the measured distance between the two vehicles, thereby eliminating the influence of noise in the data, which is beneficial to improving the accuracy of the data.

[0051] In a feasible implementation manner, the above vehicle distance determination method further includes: Detecting whether there is lane line information in the image information; In the case where the lane line information exists in the image information, the distance is corrected according to the lane line information of the lane where the target vehicle is located.

[0052] Specifically, it is determined whether there is lane line information in the image information output by the preset detection model. For example, the preset detection model identifies the lane line in the image, and fits the lane line segmentation result to obtain the lane line cubic equation coefficients C0 (lane line position), C1 (lane line slope), C2 (lane line curvature), and C3 (lane line curvature change rate). By determining whether the lane line has the four lane line coefficients C0, C1, C2, and C3, it is determined whether the lane line exists and whether it is valid.

[0053] If there is available lane line information, the lane line pixel point on the lane to which the target vehicle belongs with the same physical ordinate as the wheel contact point (or the midpoint of the wheel frame bottom frame, the free travel point, etc.) of the target vehicle can be determined first, and the physical lateral distance between the lane line pixel point and the wheel contact point of the target vehicle can be further calculated. If the lateral distance between the lane line pixel point and the wheel contact point of the target vehicle exceeds the preset lateral distance threshold of the lane line, it indicates that the error of the lateral distance in the measured vehicle distance is large. At this time, the lateral distance of the target vehicle can be corrected based on the lane line information. For example, the lateral distance A1 of the lane line pixel point relative to the vehicle and the lateral distance A2 in the measured vehicle distance are determined, and the average of A1 and A2 is taken as the target lateral distance output in the end.

[0054] Alternatively, determine the longitudinal distance between the target key point of the target vehicle and the vehicle; the target key point includes the wheel grounding point or the center point of the wheel frame bottom frame or the grounding free driving point; determine the lane line pixel points with the same longitudinal distance; the lane line pixel point is located in the lane line of the lane where the target vehicle is located; determine the first lateral distance (the distance on the physical coordinates) between the target key point and the vehicle, and determine the second lateral distance (the distance on the physical coordinates) between the lane line pixel point and the vehicle; when the difference between the first lateral distance and the second lateral distance (which can be regarded as the lateral distance between the target key point and the lane line pixel point) is greater than a preset lateral distance threshold, the measured lateral distance of the target vehicle is corrected according to the difference. It can be understood that the greater the difference exceeds the preset lateral distance threshold range, the greater the correction amplitude of the lateral distance of the target vehicle.

[0055] In this embodiment, the measured vehicle distance can be verified according to the lane line information. If it is determined that the measured distance has a large error, the measured lateral distance is corrected according to the lane line information, thereby further improving the accuracy of the data.

[0056] In one embodiment of the present application, referring to Figure 5 , Figure 5 FIG. 1 is a partial logic diagram of the method for determining vehicle distance in one embodiment of the present application. Figure 5 As shown, Through the preset detection model, the full vehicle frame, wheel contact point, free driving point, wheel frame, etc. of each vehicle in the image are obtained; the internal parameter distance measurement is performed based on the pixel height and physical height of the target to be measured, and it is determined whether the target to be measured is a truncated vehicle. If not, it ends directly. If the target to be measured is a truncated vehicle, the side frame of the truncated vehicle is obtained, and a straight line is fitted to the side of the vehicle in the side frame. If the fitted straight line meets the preset conditions, the intersection of the vehicle edge line and the full vehicle frame is calculated to obtain an observation point, and the observation point is measured by external parameter distance measurement, and the measured distance is used as the observation value of the filter for smoothing; then detect whether there is a lane line in the image, if not, it ends; if so, the lateral distance between the lane line and the wheel contact point, free driving point, wheel frame pixel point, etc. of the truncated vehicle is used to further correct the lateral distance between the truncated vehicle and the vehicle.

[0057] In this embodiment, in combination with related technologies, when measuring the distance of the detected object, the distance between the object and the vehicle is first determined by using the internal reference distance measurement method. If the target to be measured is a cut-off vehicle, the side straight line of the cut-off vehicle can be further fitted, and the side straight line can be detected to see if it meets the quality requirements. If it does, the intersection of the side straight line and the full vehicle frame is used as the observation point for external reference distance measurement, and a filter is introduced to smooth the measured distance. In addition, if there is lane line information, the measured vehicle distance is verified and adjusted based on the lane line information. In this way, a more accurate vehicle distance can be obtained for the cut-off vehicle, providing strong data support for autonomous driving technology.

[0058] Reference Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a vehicle distance determination device in one embodiment of the present application. In one embodiment of the present application, based on the same or similar technical concept as the above embodiment, a vehicle distance determination device is provided, such as Figure 6 As shown, the vehicle distance determination device 600 includes: An acquisition module 601 is used to input the collected image into a preset detection model to acquire image information of the image; A first determination module 602 is used to determine the target vehicle cut off by the image edge line according to the image information; A second determination module 603 is used to determine the side frame of the target vehicle according to the segmentation information within the full vehicle frame of the target vehicle; The data fitting module 604 is used to perform data fitting based on the wheel contact point, the wheel frame bottom frame center point and the contact free travel point set in the side frame to obtain a side straight line; the side straight line is used to represent the boundary line between the target vehicle and the ground; A third determination module 605 is used to determine the pixel coordinates of the first observation point according to the side straight line and the full vehicle frame; The fourth determination module 606 is used to determine the distance between the target vehicle and the host vehicle according to the pixel coordinates of the first observation point.

[0059] In this embodiment, the image information of the image is obtained by inputting the collected image into a preset detection model; according to the image information, the target vehicle cut off by the edge line of the image is determined; according to the segmentation information in the full vehicle frame of the target vehicle, the side frame of the target vehicle is determined; according to the wheel grounding point, the wheel frame bottom frame center point and the grounding free driving point set in the side frame, data fitting is performed to obtain a side straight line; the side straight line is used to characterize the boundary line between the target vehicle and the ground; according to the side straight line and the full vehicle frame, the pixel coordinates of the first observation point are determined; according to the pixel coordinates of the first observation point, the distance between the target vehicle and the vehicle is determined. In this way, for the target vehicle cut off by the edge line of the image, the side straight line is fitted using the available pixel points in the side frame of the vehicle to conveniently determine the effective observation point in the target vehicle, so that the distance between the cut-off vehicle and the vehicle can be accurately determined based on the observation point, providing powerful reference data for the vehicle's automatic driving.

[0060] In a feasible implementation manner, the data fitting module 604 includes: An extraction module, used to extract the pixel coordinates of the wheel contact point and the center point of the wheel frame bottom frame of the target vehicle from the image information; A traversal module, used for traversing the free driving points in the side frame to obtain a ground contact free driving point set where the target vehicle is grounded; A straight line fitting module is used to fit the straight line equation according to the pixel coordinates of the wheel contact point, the wheel frame bottom frame center point and the contact free running point set; The straight line determination module is used to determine the side straight line of the vehicle when the straight line equation meets a preset condition.

[0061] In a feasible implementation manner, the fourth determining module 606 includes: The fourth determining first submodule is used to determine the pixel coordinates of the target observation point according to the length, width, height, heading angle of the target vehicle and the pixel coordinates of the first observation point; Fourthly, determining a second submodule, which is used to convert the pixel coordinates of the target observation point into the physical coordinates of the target observation point in the vehicle coordinate system according to the camera parameters; The fourth determines a third submodule, which is used to determine the distance between the target vehicle and the host vehicle according to the physical coordinates.

[0062] In a feasible implementation manner, the vehicle distance determination device 600 further includes: The adjustment module is used to input the distance into a Kalman filter; and adjust the distance through the Kalman filter.

[0063] In a feasible implementation manner, the vehicle distance determination device 600 further includes: The correction module is used to detect whether there is lane line information in the image information; when the lane line information exists in the image information, the distance is corrected according to the lane line information of the lane where the target vehicle is located.

[0064] In a feasible implementation manner, the third determining module 605 includes: The third determining first submodule is used to determine the intersection point of the side straight line and the full vehicle frame; The third determining second submodule is used to determine the intersection point with the largest distance from the image side edge line as the first observation point; Thirdly, a third submodule is determined, which is used to obtain the pixel coordinates of the first observation point.

[0065] In the present application, the description of the device embodiment is relatively short, and specific details can be referred to the above method embodiment, which will not be repeated here.

[0066] In one embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned vehicle distance determination method when executing the computer program.

[0067] In one embodiment of the present application, a non-volatile storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the vehicle distance determination method as described in the above embodiment is implemented.

[0068] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0069] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0070] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0071] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0073] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0074] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0075] The above is a detailed introduction to a method, device, electronic device and medium for determining vehicle distance. Specific examples are used in this article to illustrate the principles and embodiments of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for a person skilled in the art, according to the idea of ​​the present application, there will be changes in the specific embodiments and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for determining vehicle distance, characterized in that: The method comprises: Inputting the collected image into a preset detection model to obtain image information of the image; Determining a target vehicle cut off by an image edge line according to the image information; Determining a side frame of the target vehicle according to segmentation information within the full vehicle frame of the target vehicle; Data fitting is performed based on the wheel grounding point, the wheel frame bottom frame center point and the grounding free travel point set in the side frame to obtain a side straight line; the side straight line is used to represent the boundary line between the target vehicle and the ground; Determining pixel coordinates of a first observation point according to the side straight line and the full vehicle frame; The distance between the target vehicle and the host vehicle is determined according to the pixel coordinates of the first observation point.

2. The method according to claim 1, characterized in that The step of performing data fitting based on the wheel contact point, the wheel frame bottom frame center point and the contact free running point set in the side frame to obtain the side straight line includes: Extracting pixel coordinates of the wheel contact point and the center point of the wheel frame bottom frame of the target vehicle from the image information; Traversing the free travel points within the side frame to obtain a ground contact free travel point set where the target vehicle is grounded; Fitting the equation of the straight line according to the pixel coordinates of the wheel contact point, the center point of the wheel frame bottom frame and the contact free running point set; When the straight line equation satisfies a preset condition, a side straight line of the vehicle is determined.

3. The method according to claim 1, characterized in that Determining the distance between the target vehicle and the host vehicle according to the pixel coordinates of the first observation point includes: Determine the pixel coordinates of the target observation point according to the length, width, height, heading angle of the target vehicle and the pixel coordinates of the first observation point; According to the camera parameters, the pixel coordinates of the target observation point are converted into the physical coordinates of the target observation point in the vehicle coordinate system; The distance between the target vehicle and the host vehicle is determined according to the physical coordinates.

4. The method according to claim 1, characterized in that The method further comprises: inputting the distance into a Kalman filter; The distance is adjusted by the Kalman filter.

5. The method according to claim 1, characterized in that The method further comprises: Detecting whether there is lane line information in the image information; In the case where the lane line information exists in the image information, the distance is corrected according to the lane line information of the lane where the target vehicle is located.

6. The method according to claim 1, characterized in that The step of determining the pixel coordinates of the first observation point according to the side straight line and the full vehicle frame includes: Determine the intersection point of the side straight line and the full vehicle frame; Determine the intersection point with the largest distance from the side edge line of the image as the first observation point; Obtain pixel coordinates of the first observation point.

7. The method according to claim 1, characterized in that The step of determining the side frame of the target vehicle according to the segmentation information within the full vehicle frame of the target vehicle comprises: Determine the corner points of the full vehicle frame and the rear frame or the front frame of the target vehicle according to the segmentation information; The side frame where the side edge of the target vehicle is located is determined according to the corner point.

8. A vehicle distance determination device, characterized in that: The device comprises: An acquisition module, used to input the collected image into a preset detection model to obtain image information of the image; A first determination module is used to determine the target vehicle cut off by the image edge line according to the image information; A second determination module is used to determine the side frame of the target vehicle according to the segmentation information within the full vehicle frame of the target vehicle; A data fitting module is used to perform data fitting based on the wheel grounding point, the wheel frame bottom frame center point and the grounding free travel point set in the side frame to obtain a side straight line; the side straight line is used to represent the boundary line between the target vehicle and the ground; A third determination module is used to determine the pixel coordinates of the first observation point according to the side straight line and the full vehicle frame; The fourth determination module is used to determine the distance between the target vehicle and the host vehicle according to the pixel coordinates of the first observation point.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the vehicle distance determination method as described in any one of claims 1-7 is implemented.

10. A non-volatile storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, a vehicle distance determination method as described in any one of claims 1 to 7 is implemented.