A vehicle target ranging method, device, medium and vehicle

By aligning image lane lines to normalized coordinates and using camera height to calculate real-world lane widths, the method addresses inaccuracies in vehicle target distance measurements, enhancing accuracy and stability.

CN115507814BActive Publication Date: 2025-07-15FOSS (HANGZHOU) INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211085543.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2025-07-15
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

The existing image-based vehicle target ranging method is inaccurate at lanes with ups and downs or turns, and is susceptible to vehicle type detection results, resulting in unstable ranging results.

Method used

By obtaining the image to be tested collected by the acquisition equipment of the bicycle, the target lane line is determined and converted to a normalized coordinate system for linear fitting. Combined with the installation height of the acquisition equipment, the world lane width is predicted, and the target distance is calculated using the ratio of the image target lane width to the world lane width.

Benefits of technology

The accuracy of the target distance measurement is improved, the distance measurement results are avoided from being affected by the vehicle type detection results, and the stability of the distance measurement is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115507814B_ABST
    Figure CN115507814B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing technology, and particularly relates to a method, device, medium and vehicle for measuring the distance of a vehicle target. The method includes: acquiring a to-be-measured image collected by a collection device based on the host vehicle; determining two target lane lines based on the to-be-measured image, and determining target trajectory points corresponding to preset parts of the two target lane lines and the position information of a target obstacle in the to-be-measured image; respectively converting the target trajectory points and the position information into a normalized coordinate system to obtain corresponding normalized trajectory point coordinates and normalized target coordinates, and performing linear fitting to obtain a normalized virtual lane line; predicting the world lane width based on the normalized virtual lane line and the installation height of the collection device; determining the image target lane width corresponding to the target obstacle based on the normalized target coordinates; and determining the target distance between the host vehicle and the target obstacle based on the ratio of the world lane width to the image target lane width. The accuracy and stability of target distance measurement can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and particularly relates to a method, device, medium and vehicle for vehicle target ranging. Background Art

[0002] With the progress of technology and the development of science and technology, sensing devices are becoming more and more intelligent, and ranging is an important technical support for sensing devices. For example, autonomous driving has become a research hotspot in the field of transportation tools at the present stage. Autonomous driving includes many sensing systems. For example, a visual sensing system based on computer image processing is widely used in the field of autonomous driving and can be used for the recognition and ranging of vehicle obstacles.

[0003] Due to the low cost of monocular cameras, in the field of autonomous driving, monocular cameras are often used to obtain image data and the target is ranged based on the image data.

[0004] Currently, the commonly used methods for ranging a target based on an image in the industry (taking autonomous driving as an example) include: the vanishing point method based on the pixel position of the midpoint of the bottom edge of the target vehicle (target obstacle), that is, the distance of the target vehicle is measured using the similar triangle method according to the vanishing point and the lower edge of the target vehicle; the similar triangle method based on the estimation of vehicle width and height, that is, the image height and actual height of the target vehicle are used to measure the distance of the target vehicle using the similar triangle method. However, the vanishing point method is based on the assumption that the lane line is a plane, and the ranging result of the target at the lane with uphill, downhill or turning is inaccurate. The estimation of vehicle width and height is affected by the vehicle type detection result. Due to the diverse shapes of vehicles, under the influence of conditions such as distance, the error rate of the vehicle type detection result is relatively high, which in turn causes the inaccurate ranging result of the target.

[0005] In view of the problems of inaccurate target ranging and being easily affected by the vehicle type detection result, a method, device, medium and vehicle for vehicle target ranging are provided. Summary of the Invention

[0006] The embodiments of the present application provide a method, device, medium and vehicle for vehicle target ranging, which can improve the accuracy of target ranging, avoid the ranging result of the target being affected by the vehicle type detection result, and improve the stability of the ranging result of the target.

[0007] In a first aspect, the embodiments of the present application provide a method for vehicle target ranging, the method comprising:

[0008] Obtaining a to-be-measured image collected by a collection device based on a host vehicle; the to-be-measured image includes a target obstacle related to the host vehicle;

[0009] Based on the two target lane lines in the to-be-detected image, determine the target trajectory points corresponding to the preset parts of the two target lane lines in the to-be-detected image and determine the position information of the target obstacle in the to-be-detected image;

[0010] Convert the target trajectory points and the position information to the normalized coordinate system respectively to obtain the corresponding normalized trajectory point coordinates and normalized target coordinates, and perform linear fitting on the normalized trajectory point coordinates to obtain a normalized virtual lane line;

[0011] Based on the normalized virtual lane line and the installation height of the acquisition device, predict the world lane width in the world coordinate system;

[0012] Based on the normalized target coordinates, determine the image target lane width corresponding to the target obstacle;

[0013] Based on the ratio of the world lane width to the image target lane width, determine the target distance between the host vehicle and the target obstacle in the world coordinate system.

[0014] The image target lane width in this embodiment refers to the width between the two target lane lines at the normalized target coordinates.

[0015] In some optional embodiments, based on the normalized virtual lane line and the installation height of the acquisition device, predicting the world lane width in the world coordinate system includes:

[0016] Based on the normalized virtual lane line and the installation height of the acquisition device, predict the world virtual lane line in the world coordinate system; the world virtual lane line shows a horizontal trend;

[0017] Based on the world virtual lane line, determine the world lane width.

[0018] In some optional embodiments, based on the to-be-detected image, determining the two target lane lines includes:

[0019] Based on the longitudinal center line in the to-be-detected image along the lane extension direction, determine the two longest target virtual lane lines on the left and right sides of the longitudinal center line in the to-be-detected image;

[0020] Determine the two target virtual lane lines as the two target lane lines.

[0021] In some optional embodiments, the preset part includes the first 1 / 4 part in front of the starting ends of the two target lane lines in the to-be-detected image.

[0022] In some optional embodiments, the linear fitting is performed based on the least squares method.

[0023] In some alternative embodiments, the position information of the target obstacle in the to-be-detected image includes the target pixel coordinates corresponding to the target obstacle in the to-be-detected image;

[0024] Determining the target trajectory points corresponding to the preset parts of the two target lane lines in the to-be-detected image includes:

[0025] Determining the target trajectory point pixel coordinates of the target trajectory points corresponding to the preset parts of the two target lane lines in the to-be-detected image.

[0026] In a second aspect, an embodiment of the present application provides a vehicle target distance measuring device, where the target distance measuring device includes:

[0027] An acquisition module, configured to acquire a to-be-detected image collected by an acquisition device based on the host vehicle; the to-be-detected image includes a target obstacle related to the host vehicle;

[0028] A first determination module, configured to determine two target lane lines based on the to-be-detected image, determine the target trajectory points corresponding to the preset parts of the two target lane lines in the to-be-detected image, and determine the position information of the target obstacle in the to-be-detected image;

[0029] A data processing module, configured to convert the target trajectory points and the position information into a normalized coordinate system respectively to obtain corresponding normalized trajectory point coordinates and normalized target coordinates, and perform a straight line fitting on the normalized trajectory point coordinates to obtain a normalized virtual lane line;

[0030] A prediction module, configured to predict the world lane width in the world coordinate system based on the normalized virtual lane line and the installation height of the acquisition device;

[0031] A second determination module, configured to determine the image target lane width corresponding to the target obstacle in the to-be-detected image based on the normalized target coordinates;

[0032] A third determination module, configured to determine the target distance between the host vehicle and the target obstacle in the world coordinate system based on the ratio of the world lane width to the image target lane width.

[0033] In some alternative embodiments, the prediction module includes:

[0034] A first prediction sub-module, configured to map the normalized virtual lane line to the world coordinate system based on the installation height of the acquisition device to obtain a world virtual lane line; the world virtual lane line shows a horizontal trend;

[0035] A second prediction sub-module, configured to determine the world lane width based on the world virtual lane line.

[0036] In some alternative embodiments, the above first determination module is further configured to determine, based on a longitudinal centerline extending along a lane in the to-be-detected image, two longest target virtual lane lines on the left and right sides of the longitudinal centerline in the to-be-detected image; and determine the two target lane lines from the two target virtual lane lines.

[0037] In some alternative embodiments, the position information of the target obstacle in the to-be-detected image includes target pixel coordinates corresponding to the target obstacle in the to-be-detected image.

[0038] The above first determination module is further configured to determine target trajectory point pixel coordinates of target trajectory points corresponding to the preset portions of the two target lane lines in the to-be-detected image.

[0039] In a third aspect, an embodiment of the present application provides a vehicle, which includes an electronic device. The electronic device includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to perform the above vehicle target ranging method.

[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can perform the above vehicle target ranging method.

[0041] The present application obtains a to-be-detected image collected by a collection device based on a host vehicle; the to-be-detected image includes a target obstacle related to the host vehicle; determines two target lane lines based on the to-be-detected image, determines target trajectory points corresponding to preset portions of the two target lane lines in the to-be-detected image, and determines position information of the target obstacle in the to-be-detected image; converts the target trajectory points and the position information into a normalized coordinate system respectively to obtain corresponding normalized trajectory point coordinates and normalized target coordinates, and performs linear fitting on the normalized trajectory point coordinates to obtain a normalized virtual lane line; predicts a world lane width in a world coordinate system based on the normalized virtual lane line and an installation height of the collection device; determines an image target lane width corresponding to the target obstacle based on the normalized target coordinates; and determines a target distance between the host vehicle and the target obstacle in the world coordinate system based on a ratio of the world lane width to the image target lane width. It can improve the accuracy of target ranging, avoid the influence of the vehicle type detection result on the target ranging result, and improve the stability of the target ranging result. Description of the Drawings

[0042] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0043] Figure 1 is a schematic diagram of a scenario for target ranging based on the vanishing point method provided by an embodiment of the present application;

[0044] Figure 2 is a schematic flowchart of a vehicle target ranging method provided by an embodiment of the present application;

[0045] Figure 3 is a schematic diagram of the principle of a vehicle target ranging method provided by an embodiment of the present application;

[0046] Figure 4 is Figure 3 the right view of the schematic diagram of the principle in

[0047] Figure 5 is Figure 3 the top view of the schematic diagram of the principle in

[0048] Figure 6 is a schematic diagram of a to-be-measured image provided by an embodiment of the present application;

[0049] Figure 7 is a schematic diagram of a normalized image provided by an embodiment of the present application;

[0050] Figure 8 is a schematic diagram of a vehicle target ranging device provided by an embodiment of the implementation manner of the present application;

[0051] Figure 9 is a block diagram of an electronic device for implementing a vehicle target ranging method shown according to an exemplary embodiment. Detailed implementation manners

[0052] To enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0053] "One embodiment" or "embodiment" referred to herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present invention. In the description of the present invention, it should be understood that the terms "first", "second", "third" and "fourth" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units that are inherent to these processes, methods, products or devices.

[0054] Before introducing the vehicle target ranging method according to the embodiment of the present application, the scenario of target ranging based on the vanishing point method in the prior art is first introduced.

[0055] See also Figure 1 , Figure 1 It is a schematic diagram of a scenario for target ranging based on a vanishing point method provided in an embodiment of the present application.

[0056] like Figure 1 As shown, the target obstacle 20 is captured in the picture in front of the acquisition device 10, for example, the acquisition device 10 is set on the top of the vehicle. The vehicle predicts the distance between the vehicle and the target obstacle 20 based on the image to be measured acquired by the acquisition device 10. For example, the acquisition device 10 includes a vehicle-mounted front-view camera device and a vehicle-mounted rear-view camera device based on a monocular camera. There are two types of distance measurement methods between the vehicle and the target obstacle 20 based on the acquisition device 10, namely, a distance measurement method based on a vanishing point and a distance measurement method based on an obstacle type.

[0057] In the first distance measurement method based on vanishing points, it is assumed that the lane is on a plane, that is, there is no uphill or downhill slope. Figure 1 The lane line vanishing point v of the lane on the normalized plane G (i.e., the normalized image in the normalized plane G) and the grounding point b of the target vehicle are used to calculate the target distance between the target vehicle and the above-mentioned acquisition device 10, i.e., the distance between the target vehicle and the vehicle itself, using the similar triangle method. Specifically, Figure 1 The similar triangle shown is the triangle formed by the acquisition device 10, the lane line vanishing point v on the normalized plane and the grounding point b of the target vehicle, and the acquisition device 10, the vertical point of the acquisition device 10 on the ground and the target vehicle (i.e. Figure 1 The target distance d is calculated as follows:

[0058]

[0059] Among them, H c is the installation height of the acquisition device 10; y b is the ordinate of the ground contact point b of the target vehicle in the normalization plane G ( Figure 1 in which the ordinate extends along the lane direction); y v is the ordinate of the vanishing point v of the lane line of the lane in the normalization plane G. The coordinates in the normalization plane G and the coordinates of the image to be measured are in one-to-one correspondence.

[0060] In some embodiments, based on the method of double vanishing points, the near vanishing point is used for near targets and the far vanishing point is used for far targets, which can improve the accuracy of ranging based on the vanishing point to a certain extent. However, in the first ranging method based on the vanishing point, there are situations where the vanishing point is inaccurate and the ranging of far targets is inaccurate due to the fact that the real lane is a curved surface (including uphill, downhill, and turning). Therefore, currently, the second method is usually used for ranging far targets.

[0061] For the second ranging method based on the obstacle type, first, the type of the target obstacle 20 is identified, that is, the vehicle type of the target vehicle is identified. For example, if the target vehicle is an SUV (sport utility vehicle), based on the general width and height of the SUV, and the pixel width and pixel height of the target vehicle in the image to be measured, the target distance between the host vehicle and the target obstacle 20 is calculated. The target distance is affected by the vehicle type recognition result.

[0062] As mentioned above, for the ranging method based on the vanishing point, the ranging result of the target at the lane with uphill, downhill, or turning is inaccurate; in the ranging method based on the obstacle type, the estimation of the vehicle width and height is easily affected by the vehicle type detection result.

[0063] To solve the above problems, the present application provides a method for measuring the distance to a vehicle target. Specifically, a to-be-measured image collected by a collection device based on the host vehicle is obtained; the to-be-measured image includes a target obstacle related to the host vehicle; two target lane lines are determined based on the to-be-measured image, and target trajectory points corresponding to preset parts of the two target lane lines in the to-be-measured image are determined, and position information of the target obstacle in the to-be-measured image is determined; by respectively converting the target trajectory points and the position information into a normalized coordinate system, corresponding normalized trajectory point coordinates and normalized target coordinates are obtained, and the normalized trajectory point coordinates are linearly fitted to obtain a normalized virtual lane line; based on the normalized virtual lane line and the installation height of the collection device, the world lane width in the world coordinate system is predicted; based on the normalized target coordinates, the image target lane width corresponding to the target obstacle is determined; based on the ratio of the world lane width to the image target lane width, the target distance between the host vehicle and the target obstacle in the world coordinate system is determined. It can improve the accuracy of target distance measurement, avoid the influence of the vehicle type detection result on the target distance measurement result, and improve the stability of the target distance measurement result.

[0064] The following introduces specific embodiments of a method for measuring the distance to a vehicle target in the present application. Figure 2 It is a schematic flowchart of a method for measuring the distance to a vehicle target provided by an embodiment of the present application. This specification provides method operation steps such as in the embodiment or flowchart, but based on routine or non-creative labor, there may be more or fewer operation steps. The step order listed in the embodiment is only one way among the execution orders of numerous steps and does not represent the only execution order. When actually executed by a system or server product, it can be executed in the order shown in the embodiment or the drawing (for example, in a parallel processor or multi-threaded processing environment). Figures 3 - 5 It is a schematic diagram of the principle of the method for measuring the distance to a vehicle target. Figure 3 It is a schematic diagram of the principle of a method for measuring the distance to a vehicle target provided by an embodiment of the present application. Figure 4 It is Figure 3 The right view of the schematic diagram of the principle in Figure 5 It is Figure 3 The top view of the schematic diagram of the principle in Figures 3 - 5 Below in conjunction with Figure 2 The method shown is introduced in detail. Specifically, as Figure 2 shown, the method may include:

[0065] S201: Obtain a to-be-measured image collected by a collection device based on the host vehicle; the to-be-measured image includes a target obstacle related to the host vehicle.

[0066] For example, as Figure 3As shown in the figure, the acquisition device 10 is arranged on the top of the vehicle 11, and the acquisition device 10 acquires an image of the target obstacle 20 in front of the vehicle 11 as the image to be measured.

[0067] S203: Determine two target lane lines based on the image to be measured, and determine the target trajectory points corresponding to the preset parts of the two target lane lines in the image to be measured and the position information of the target obstacle in the image to be measured.

[0068] Specifically, a pre-trained neural network model can be used to identify the lane lines in the above-mentioned image to be measured, and determine the two target lane lines and the target obstacle in the image to be measured; and identify the target trajectory points corresponding to the preset parts of the two target lane lines in the image to be measured and the position information of the target obstacle. For example, the position information includes the longitudinal coordinate value of the grounding point of the target obstacle in the image.

[0069] In some optional embodiments, determining two target lane lines based on the image to be measured includes:

[0070] Based on the longitudinal center line in the image to be measured extending along the lane direction, determine the two longest target virtual lane lines on the left and right sides of the longitudinal center line in the image to be measured;

[0071] Determine the two target lane lines from the two target virtual lane lines.

[0072] Figure 6 is a schematic diagram of an image to be measured provided by an embodiment of the present application. As Figure 6 shown, the image to be measured includes multiple lane lines. Determine the two longest lane lines on the left and right sides of the longitudinal center line M of the image to be measured as two target virtual lane lines, namely the first target virtual lane line X1 and the second target virtual lane line X2. Among them, according to the position of the lowest point of the lane line relative to the longitudinal center line M, it is determined which side of the longitudinal center line M the lane line is on. The length of the lane line refers to the longitudinal distance between the starting point (the lowest point) and the highest point of the lane line. For example, the length L2 of the second target virtual lane line X2 refers to the longitudinal distance between the starting point and the highest point of the second target virtual lane line X2.

[0073] In some optional embodiments, the preset part includes the first 1 / 4 part in front of the starting ends of the two target lane lines in the image to be measured.

[0074] For example, the first 1 / 4 part in front of the starting ends of the two target lane lines is Figure 6 the part below the 1 / 4 demarcation line N in

[0075] In some optional embodiments, the position information of the target obstacle in the image to be measured includes the target pixel coordinates corresponding to the target obstacle in the image to be measured;

[0076] Determining the target trajectory points corresponding to the preset parts of the two target lane lines in the to-be-tested image includes:

[0077] Determining the target trajectory point pixel coordinates of the target trajectory points corresponding to the preset parts of the two target lane lines in the to-be-tested image.

[0078] S205: Convert the target trajectory points and the position information to the normalized coordinate system respectively to obtain the corresponding normalized trajectory point coordinates and normalized target coordinates, and perform linear fitting on the normalized trajectory point coordinates to obtain a normalized virtual lane line.

[0079] For example, convert the longitudinal coordinate value of the grounding point of the target obstacle in the to-be-tested image above to the normalized coordinate system of the normalized plane to obtain the normalized target coordinate.

[0080] When the ordinate of the grounding point pixel coordinate is ob, the ordinate y obj ' in its normalized coordinate system can be expressed as:

[0081]

[0082] where K is the internal parameter of the acquisition device and x' can be ignored.

[0083] As Figure 3 shown, in the world coordinate system, including mutually perpendicular coordinate axes X, coordinate axis Y, and coordinate axis Z, the coordinate axis X is along the horizontal direction, the coordinate axis Y is vertically directed to the ground, and the coordinate axis Z is directed to the acquisition direction of the acquisition device 10. In the world coordinate system, the two target lane lines correspond to Figure 3 the first world lane line J1 and the second world lane line J2 shown. The first world lane line J1 and the second world lane line J2 respectively correspond to Figure 6 the first target virtual lane line X1 and the second target virtual lane line X2 in

[0084] Intercept the pixel points of the first target virtual lane line X1 and the second target virtual lane line X2 located in the lower 1 / 4 part of the to-be-tested image. For example, take the pixel points corresponding to n target trajectory points on X1 and X2 respectively, and convert the n pixel points to the normalized coordinate system to obtain 2n normalized target coordinates. Specifically, the conversion method is as follows:

[0085] Undistort the first target virtual lane line X1 and the second target virtual lane line X2 to obtain pixel points with pixel coordinates (u 1i , v 1i ), and the coordinates (x1' i , y 1i ') in its normalized coordinate system can be determined by the following formula:

[0086]

[0087] Among them, K is the internal parameter matrix of the acquisition device 10.

[0088] In some alternative embodiments, the straight line fitting is performed based on the least squares method.

[0089] For example, the least squares method is used to perform straight line fitting on the above 2n normalized target coordinates, and in the normalized coordinate system, the first normalized virtual lane line G1 and the second normalized virtual lane line G2 corresponding to the first target virtual lane line X1 and the second target virtual lane line X2 are obtained. For example, the straight line equations of G1 and G2 are y = p1x + q1 and y = p2x + q2 respectively.

[0090] Among them, p2 and q2 are determined in the same way.

[0091] S207: Predict the world lane width in the world coordinate system based on the normalized virtual lane line and the installation height of the acquisition device.

[0092] In some alternative embodiments, predicting the world lane width in the world coordinate system based on the normalized virtual lane line and the installation height of the acquisition device includes:

[0093] Mapping the normalized virtual lane line to the world coordinate system based on the installation height of the acquisition device to obtain a world virtual lane line; the world virtual lane line shows a horizontal trend;

[0094] Determine the world lane width based on the world virtual lane line.

[0095] Figure 3 As shown, mapping the first normalized virtual lane line G1 and the second normalized virtual lane line G2 to the world coordinate system to obtain a first world virtual lane line S1 and a second world virtual lane line S2. Determine the world lane width based on the first world virtual lane line S1 and the second world virtual lane line S2; and predict a first world lane line J1 and a second world lane line J2. The specific process of predicting the first world lane line J1 and the second world lane line J2 is as follows:

[0096] Since there is a one-to-one correspondence between the normalized coordinates in the normalized coordinate system and the pixel coordinates of the image to be measured, and since using the pixel coordinate derivation formula will introduce many additional parameters, which is not conducive to understanding, therefore, the normalized coordinates in the normalized coordinate system are used for derivation here.

[0097] Refer to Figure 4In the yz coordinate system, the first world virtual lane line S1 and the second world virtual lane line S2 can be described as y=h+az, where z is the independent variable, h is the result of dividing the installation height of the acquisition device 10 by the cosine value of the installation pitch angle of the acquisition device 10, which is a known quantity. The change of this value caused by the bumping of the vehicle 11 is negligible. a can be considered as an unknown quantity, which is related to the installation and bumping of the acquisition device 10. y is the dependent variable. The actual first world lane line J1 and the second world lane line J2 are upward uphill, and the slope conforms to the equation h(z). The form of this equation is unknown, so it can be considered that the real first world lane line J1 and the second world lane line J2 conform to: y=h+az-h(z).

[0098] See also Figure 5 , in the xz coordinate system, the first world virtual lane line S1 is a straight line, which can be described as x=kz+b1, where z is the independent variable. The second world virtual lane line S2 is a straight line, which can be described as x=kz+b2, where z is the independent variable. Similarly, the actual world lane line turns in one direction, and the degree of turning conforms to the equation f(z). The form of this equation is unknown. It can be considered that the real first world lane line J1 and the second world lane line J2 conform to: x=kz+b1+f(z) / x=kz+b2+f(z). The f(z) on the real first world lane line J1 and the second world lane line J2 is inconsistent, but this error has little effect on the final distance measurement when the curve is not large, and can be ignored, and they are considered consistent.

[0099] In summary, taking the first world lane line J1 as an example, the equation of the first world lane line J1 is:

[0100]

[0101] Map the first world lane line J1 to the normalized coordinate system, that is, obtain formula (5) from formula (4):

[0102]

[0103] Therefore, in the normalized coordinate system, the first normalized virtual lane line G1 corresponding to the first world lane line J1 satisfies formula (6):

[0104]

[0105] Formula (7) and (8) are obtained from formula (6):

[0106]

[0107]

[0108] Substituting formula (8) into (7) yields formula (9):

[0109]

[0110] Equation (9) is the equation of the first normalized virtual lane line G1 in the normalized plane.

[0111] By the same reasoning as in the derivation of Equation (4), it can be obtained that in the normalized plane, the first normalized virtual lane line G1 conforms to Equation (10):

[0112]

[0113] Simplifying Equation (10) gives:

[0114]

[0115] In the lower 1 / 4 part of the image, it can be considered that the first world virtual lane line S1 and the first world lane line J1 basically coincide. Therefore, the linear equation y = p1x + q1 of the first world virtual lane line S1 can be solved using the least squares method and approximated as the linear equation of Equation (11), and the following can be solved:

[0116]

[0117] Similarly, the equation of the second world lane line J2 can be calculated as the following Equation (13):

[0118]

[0119]

[0120] In summary, based on the normalized virtual lane line, the world lane lines in the world coordinate system are predicted, that is, the above-mentioned first world lane line J1 and second world lane line J2 can include curves and slopes.

[0121] S209: Determine the image target lane width corresponding to the target obstacle based on the normalized target coordinates.

[0122] For example, subtracting the above-mentioned Equations (9) and (13) gives the lane width d in the normalized coordinate system:

[0123]

[0124] where y′ is the ordinate y in the normalized coordinate system of the longitudinal coordinate value of the grounding point of the above-mentioned target obstacle 20, the height h is known, and the image target lane width d corresponding to the ordinate y obj ′ can be obtained. obj ′ Figure 7 is a schematic diagram of a normalized image provided by an embodiment of the present application, as Figure 7As shown, the target obstacle 20 corresponds to the width d of the target lane in the image.

[0125] It can be solved from formulas (12), (14), and (15) that:

[0126]

[0127] S211: Based on the ratio of the world lane width to the target lane width in the image, determine the target distance between the host vehicle and the target obstacle in the world coordinate system.

[0128] For example, substituting formula (16) into formula (8) gives the longitudinal coordinate Z (i.e., the target distance) of the target obstacle in the world coordinate system:

[0129]

[0130] In some embodiments, by using the lane width near the above-mentioned acquisition device 10 and the target ranging result as a reference, the lane width and the target ranging result in the distance are calculated, but this method is affected by the ranging error near. This lane width depends on the lane line detection result and is not suitable for curved road scenarios.

[0131] In the above embodiments, based on the fact that the two target lane lines are on a curved surface, the equations of the first world lane line J1 and the second world lane line J2 of the two target lane lines in the world coordinate system are established. Among them, the above-mentioned target lane width in the image is obtained by mapping the real lane width into the normalized coordinate system, so the image lane width is not affected by the curve and the curved surface. In this way, the target distance calculated based on the world lane width and the target lane width in the image can ignore the calculation of the lane line curve and the curved surface, greatly improving the accuracy of the target distance.

[0132] The embodiment of the present application provides a vehicle target ranging device. Figure 8 It is a schematic diagram of a vehicle target ranging device provided by the embodiment of the present application, as Figure 8 shown. The vehicle target ranging device includes:

[0133] An acquisition module, configured to acquire a to-be-detected image collected by an acquisition device of the host vehicle; the to-be-detected image includes a target obstacle related to the host vehicle;

[0134] A first determination module, configured to determine two target lane lines based on the to-be-detected image, determine the target trajectory points corresponding to the preset parts of the two target lane lines in the to-be-detected image, and determine the position information of the target obstacle in the to-be-detected image;

[0135] A data processing module, configured to convert the target trajectory points and position information into a normalized coordinate system respectively, obtain corresponding normalized trajectory point coordinates and normalized target coordinates, and perform linear fitting on the normalized trajectory point coordinates to obtain a normalized virtual lane line;

[0136] A prediction module, configured to predict a world lane width in a world coordinate system based on the normalized virtual lane line and the installation height of the acquisition device;

[0137] A second determination module, configured to determine an image target lane width corresponding to the target obstacle in the to-be-detected image based on the normalized target coordinates;

[0138] A third determination module, configured to determine a target distance between the host vehicle and the target obstacle in the world coordinate system based on a ratio of the world lane width to the image target lane width.

[0139] In some optional embodiments, the prediction module includes:

[0140] A first prediction sub-module, configured to map the normalized virtual lane line to the world coordinate system based on the installation height of the acquisition device to obtain a world virtual lane line; the world virtual lane line shows a horizontal trend;

[0141] A second prediction sub-module, configured to determine the world lane width based on the world virtual lane line.

[0142] In some optional embodiments, the above-mentioned first determination module is further configured to determine two longest target virtual lane lines on the left and right sides of the longitudinal center line in the to-be-detected image based on the longitudinal center line extending along the lane direction in the to-be-detected image; and determine the two target virtual lane lines as the two target lane lines.

[0143] In some optional embodiments, the position information of the target obstacle in the to-be-detected image includes target pixel coordinates corresponding to the target obstacle in the to-be-detected image;

[0144] The above-mentioned first determination module is further configured to determine target trajectory point pixel coordinates of target trajectory points corresponding to a preset part of the two target lane lines in the to-be-detected image.

[0145] The device and method embodiments in this application are based on the same application concept.

[0146] Figure 9 It is a block diagram of an electronic device for implementing a vehicle target ranging method shown according to an exemplary embodiment.

[0147] The electronic device may be a server or a terminal device, and its internal structure diagram may be as shown in Figure 9 . The electronic device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a vehicle target ranging method.

[0148] Those skilled in the art can understand that Figure 9 the structure shown in is only a block diagram of some structures related to the solution of the present disclosure, and does not constitute a limitation on the electronic device to which the solution of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0149] An embodiment of the present application provides a vehicle, the vehicle includes an electronic device, the electronic device includes a processor and a memory, and at least one instruction or at least one program segment is stored in the memory. The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the vehicle target ranging method in the first aspect above.

[0150] An embodiment of the present application provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute the vehicle target ranging method in the first aspect above.

[0151] Optionally, in this embodiment, the above storage medium may be located in at least one of multiple network servers in a computer network. Optionally, in this embodiment, the above storage medium may include, but is not limited to, various media that can store program codes such as a USB flash drive, a read-only memory (ROM), a mobile hard disk, a magnetic disk, or an optical disc.

[0152] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program. The computer program is stored in a readable storage medium. At least one processor of the computer device reads and executes the computer program, so that the computer device executes the vehicle target ranging method of the embodiment of the present disclosure.

[0153] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0154] As described above, the above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0155] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and technologies have not been shown in detail so as not to obscure the understanding of this specification.

[0156] Similarly, it should be understood that, in order to streamline the present application and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting the intention that the claimed present application requires more features than are expressly recited in each claim. Rather, as the claims reflect, the inventive aspects lie in less than all of the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present application.

[0157] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be adopted to combine all the features disclosed in this specification (including the accompanying claims, abstract and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise explicitly stated, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.

[0158] In addition, those skilled in the art can understand that although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of this application and forms different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.

Claims

1. A vehicle target ranging method, characterized in that, The method includes: Obtaining a to-be-detected image collected by a collection device based on the host vehicle; the to-be-detected image includes a target obstacle related to the host vehicle; Determining two target lane lines based on the to-be-detected image, determining target trajectory points corresponding to a preset part of the two target lane lines in the to-be-detected image, and determining position information of the target obstacle in the to-be-detected image; Converting the target trajectory points and the position information into a normalized coordinate system respectively to obtain corresponding normalized trajectory point coordinates and normalized target coordinates, and performing linear fitting on the normalized trajectory point coordinates to obtain a normalized virtual lane line; Predicting a world lane width in a world coordinate system based on the normalized virtual lane line and the installation height of the collection device, specifically including: Mapping the normalized virtual lane line into the world coordinate system based on the installation height of the collection device to obtain a world virtual lane line; the world virtual lane line shows a horizontal trend; Determining the world lane width based on the world virtual lane line; Determining an image target lane width corresponding to the target obstacle based on the normalized target coordinates; Determining a target distance between the host vehicle and the target obstacle in the world coordinate system based on a ratio of the world lane width to the image target lane width.

2. The method according to claim 1, wherein Determining two target lane lines based on the to-be-detected image includes: Determining two longest target virtual lane lines on the left and right sides of a longitudinal center line in the to-be-detected image based on the longitudinal center line extending along the lane direction in the to-be-detected image; Determining the two target virtual lane lines as the two target lane lines.

3. The method according to claim 1, wherein The preset part includes the first 1 / 4 part in front of the starting ends of the two target lane lines in the to-be-detected image.

4. The method according to claim 1, characterized in that, The linear fitting is performed based on the least squares method.

5. The method according to claim 1, characterized in that The position information of the target obstacle in the to-be-detected image includes target pixel coordinates corresponding to the target obstacle in the to-be-detected image; Determining the target trajectory points corresponding to the preset part of the two target lane lines in the to-be-detected image includes: Determining target trajectory point pixel coordinates of the target trajectory points corresponding to the preset part of the two target lane lines in the to-be-detected image.

6. A vehicle target ranging device, characterized in that, The device includes: An obtaining module, configured to obtain a to-be-detected image collected by a collection device based on the host vehicle; the to-be-detected image includes a target obstacle related to the host vehicle; A first determination module, configured to determine two target lane lines based on the to-be-detected image, determine target trajectory points corresponding to a preset part of the two target lane lines in the to-be-detected image, and determine position information of the target obstacle in the to-be-detected image; A data processing module, configured to convert the target trajectory points and the position information into a normalized coordinate system respectively to obtain corresponding normalized trajectory point coordinates and normalized target coordinates, and perform linear fitting on the normalized trajectory point coordinates to obtain a normalized virtual lane line; A prediction module, configured to predict a world lane width in a world coordinate system based on the normalized virtual lane line and the installation height of the collection device, specifically including: Map the normalized virtual lane line in the world coordinate system based on the installation height of the acquisition device to obtain a world virtual lane line; the world virtual lane line shows a horizontal trend; Determine the world lane width based on the world virtual lane line; A second determination module, configured to determine an image target lane width corresponding to the target obstacle in the to-be-detected image based on the normalized target coordinates; A third determination module, configured to determine a target distance between the host vehicle and the target obstacle in the world coordinate system based on a ratio of the world lane width to the image target lane width.

7. The target ranging device according to claim 6, wherein The prediction module includes: A first prediction sub-module, configured to map the normalized virtual lane line in the world coordinate system based on the installation height of the acquisition device to obtain a world virtual lane line; the world virtual lane line shows a horizontal trend; A second prediction sub-module, which determines the world lane width based on the world virtual lane line.

8. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the vehicle target ranging method according to any one of claims 1-5.

9. A vehicle, characterized in that, The vehicle includes an electronic device, the electronic device includes a processor and a memory, at least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to execute the vehicle target ranging method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Monocular distance measurement method and device, equipment and storage medium

    CN114049394A

  • Front vehicle distance detection method and device based on convex lens imaging principle

    CN114659489A