A method and apparatus for target ranging and a vehicle
By projecting and correcting lane lines onto a bird's eye view using lane width and installation parameters, the method enhances the accuracy and stability of target distance measurements in autonomous vehicles, addressing inaccuracies from road slope and obstacle detection.
Patent Information
- Application Number
- CN202211086089.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
The target distance measurement method based on image processing is difficult to determine the lane conditions and target obstacle information, resulting in inaccurate distance measurement.
By acquiring the images collected by the bicycle's acquisition equipment, projecting them into a plane bird's eye view, correcting the plane lane lines on both sides, obtaining three-dimensional lane lines, combining the installation parameters and the coordinates of the target obstacles, the target distance is determined.
The accuracy and stability of the target distance measurement are improved, and the distance measurement results are avoided from being affected by obstacle detection results.
Smart Images

Figure CN115507815B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image processing, and particularly relates to a method and device for target ranging and a vehicle. Background Art
[0002] With the progress of technology and the development of science and technology, intelligent perception devices are becoming more and more common. Among them, the performance of intelligent perception devices depends on image processing technology. For example, in the field of autonomous driving, image processing technology is widely used in target ranging of autonomous driving vehicles (ego vehicles), that is, for predicting the distance between the ego vehicle and a target obstacle.
[0003] Since it is difficult to determine the lane conditions (such as slope) and target obstacle information (such as the actual vehicle width of the target vehicle) based on images, the target ranging based on image processing is inaccurate. For example, target ranging based on the vanishing point of the lane line in the image and the grounding point of the target vehicle, and target ranging based on the vehicle width in the image and the actual vehicle width of the target vehicle, the target ranging results are all inaccurate.
[0004] In view of the above problem of inaccurate target ranging, a method and device for target ranging and a vehicle are provided. Summary of the Invention
[0005] Embodiments of the present application provide a method and device for target ranging and a vehicle, which can improve the accuracy of target ranging and the stability of target ranging results.
[0006] In a first aspect, an embodiment of the present application provides a method for target ranging, the method includes:
[0007] Obtain a to-be-measured image collected by a collection device based on an ego vehicle; the to-be-measured image includes two target lane lines and a target obstacle;
[0008] Based on the installation parameters of the collection device relative to the ego vehicle, project the two target lane lines onto a planar bird's-eye view to obtain two side planar lane lines;
[0009] Based on the target lane width and the installation parameters, correct the two side planar lane lines to obtain three-dimensional lane lines; the target lane width is determined based on the two target lane lines;
[0010] Based on the three-dimensional lane lines, the installation parameters, and the target coordinates of the target obstacle in the to-be-measured image, determine the target distance between the target obstacle and the ego vehicle.
[0011] In this embodiment, at least one lane is included between the two target lane lines.
[0012] In some alternative embodiments, based on the target lane width and the installation parameters, the two side planar lane lines are corrected to obtain a three-dimensional lane line, including:
[0013] Based on multiple pairs of trajectory points on the two side planar lane lines, determine the planar lane width corresponding to each pair of trajectory points to obtain multiple planar lane widths;
[0014] For each pair of trajectory points, based on the pair of trajectory points and the installation parameters, determine the scaling triangle corresponding to the pair of trajectory points;
[0015] Based on the target lane width and the scaling triangle, correct the coordinates of the pair of trajectory points to adjust the planar lane width corresponding to the pair of trajectory points to the target lane width, obtaining the corrected pair of trajectory points;
[0016] Based on multiple corrected pairs of trajectory points, obtain the three-dimensional lane line.
[0017] In some alternative embodiments, before determining the planar lane width corresponding to each pair of trajectory points based on the multiple pairs of trajectory points on the two side planar lane lines, the method further includes:
[0018] On any one of the two side planar lane lines, determine multiple first target trajectory points; the distance between adjacent first target trajectory points is a preset distance;
[0019] Based on the angle between the first connection line and the two side planar lane lines, on the other side planar lane line, determine multiple second target trajectory points corresponding one-to-one to the multiple first target trajectory points; the first connection line refers to the connection line between the first target trajectory point and the trajectory point on the other side planar lane line.
[0020] In some alternative embodiments, the installation parameters include installation coordinates, and the installation coordinates are determined based on the installation position of the acquisition device on the host vehicle.
[0021] In some alternative embodiments, based on the installation parameters of the acquisition device relative to the host vehicle, project the two target lane lines onto a planar bird's-eye view to obtain two side planar lane lines, including:
[0022] Based on the installation parameters, project multiple image trajectory points on the two target lane lines onto the planar bird's-eye view to obtain multiple planar trajectory points;
[0023] Perform curve fitting on the multiple planar trajectory points in the planar bird's-eye view to obtain the two side planar lane lines.
[0024] In some alternative embodiments, based on the installation parameters, projecting multiple image trajectory points on the two target lane lines onto the planar bird's-eye view to obtain multiple planar trajectory points, including:
[0025] Based on the internal imaging parameters of the acquisition device, projecting the multiple image trajectory points on the two target lane lines onto the normalized plane corresponding to the acquisition device to obtain normalized trajectory points;
[0026] Based on the installation parameters, projecting the normalized trajectory points onto the planar bird's-eye view to obtain the multiple planar trajectory points.
[0027] In some alternative embodiments, the curve fitting is performed based on the least squares method.
[0028] In some alternative embodiments, before correcting the two side planar lane lines based on the target lane width and the installation parameters, the method further includes:
[0029] Determining the lane width corresponding to the target positions of the two side planar lane lines as the target lane width; the target positions of the two side planar lane lines correspond to the large-mouth ends of the two target lane lines.
[0030] In some alternative embodiments, the method further includes:
[0031] Selecting the longest lane lines on both sides of the longitudinal center line in the to-be-tested image, and determining the two longest lane lines as the two target lane lines; the longitudinal center line includes the center line along the extending direction of the lane line.
[0032] In a second aspect, an embodiment of the present application provides a target distance measuring device, where the target distance measuring device includes:
[0033] An acquisition module, configured to acquire a to-be-tested image acquired by an acquisition device of the vehicle itself; the to-be-tested image includes two target lane lines and a target obstacle;
[0034] A projection module, configured to project the two target lane lines onto a planar bird's-eye view based on the installation parameters of the acquisition device relative to the vehicle itself to obtain two side planar lane lines; the target lane width is determined based on the two target lane lines;
[0035] A lane line determination module, configured to correct the two side planar lane lines based on the target lane width and the installation parameters to obtain three-dimensional lane lines; the target lane width is determined based on the two target lane lines;
[0036] A distance determination module, configured to determine a target distance between the target obstacle and the host vehicle based on the three-dimensional lane line, the installation parameters, and the target coordinates of the target obstacle in the to-be-detected image.
[0037] In some alternative embodiments, the lane line determination module is further configured to:
[0038] Based on multiple pairs of trajectory points on the two side planar lane lines, determine the planar lane width corresponding to each pair of trajectory points, and obtain multiple planar lane widths;
[0039] For each pair of trajectory points, based on the pair of trajectory points and the installation parameters, determine the scaled triangle corresponding to the pair of trajectory points;
[0040] Based on the target lane width and the scaled triangle, correct the coordinates of the pair of trajectory points to adjust the planar lane width corresponding to the pair of trajectory points to the target lane width, and obtain the corrected pair of trajectory points;
[0041] Based on multiple corrected pairs of trajectory points, obtain the three-dimensional lane line.
[0042] In some alternative embodiments, the apparatus further includes:
[0043] A first target determination module, configured to determine multiple first target trajectory points on any one of the two side planar lane lines; the distance between adjacent first target trajectory points is a preset distance;
[0044] A second target determination module, configured to determine multiple second target trajectory points corresponding one-to-one to the multiple first target trajectory points on the other side planar lane line based on the angle between the first connection line and the two side planar lane lines; the first connection line refers to the connection line between the first target trajectory point and the trajectory point on the other side planar lane line.
[0045] In some alternative embodiments, the above projection module includes:
[0046] A first projection sub-module, configured to project multiple image trajectory points on the two target lane lines onto the planar bird's-eye view based on the installation parameters, and obtain multiple planar trajectory points;
[0047] A second projection sub-module, configured to perform curve fitting on the multiple planar trajectory points in the planar bird's-eye view to obtain the two side planar lane lines.
[0048] In some alternative embodiments, the first projection sub-module is further configured to:
[0049] Based on the internal imaging parameters of the acquisition device, project the multiple image trajectory points on the two target lane lines onto the corresponding normalized plane of the acquisition device to obtain normalized trajectory points;
[0050] Based on the installation parameters, project the normalized trajectory points onto the planar bird's-eye view to obtain the multiple planar trajectory points.
[0051] In some alternative embodiments, the apparatus further includes:
[0052] A lane width determination module, configured to determine the lane width corresponding to the target positions of the two side planar lane lines as the target lane width; the target positions of the two side planar lane lines correspond to the large-mouth ends of the two target lane lines.
[0053] In some alternative embodiments, the apparatus further includes:
[0054] A lane determination module, configured to respectively select the longest lane lines on both sides of the longitudinal center line in the to-be-tested image, and determine the two longest lane lines as the two target lane lines; the longitudinal center line includes the center line along the extending direction of the lane line.
[0055] In a third aspect, an embodiment of the present application provides a vehicle, characterized in that the vehicle includes an electronic device, the electronic device includes a processor and a memory, and at least one instruction or at least one segment of program is stored in the memory, and the at least one instruction or the at least one segment of program is loaded and executed by the processor to perform the above-mentioned target ranging method.
[0056] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enabling the electronic device to perform the target ranging method in the first aspect above.
[0057] This application obtains a to-be-detected image collected by a collection device based on a vehicle itself; the to-be-detected image includes two target lane lines and a target obstacle; based on the installation parameters of the collection device relative to the vehicle itself, projects the two target lane lines into a planar bird's-eye view to obtain two side planar lane lines; based on a target lane width and the installation parameters, corrects the two side planar lane lines to obtain three-dimensional lane lines; the target lane width is determined based on the two target lane lines; based on the three-dimensional lane lines, the installation parameters, and the target coordinates of the target obstacle in the to-be-detected image, determines a target distance between the target obstacle and the vehicle itself. In this way, by using the target lane width to correct the two side planar lane lines to obtain three-dimensional lane lines close to the actual lane line width and curvature, the accuracy of lane line prediction is improved, and further the accuracy of target distance measurement based on the three-dimensional lane lines can be improved, the stability of the target distance measurement result is improved, and the influence of the target distance measurement result by the detection result of the target obstacle in the image is avoided. Description of the Drawings
[0058] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0059] Figure 1 It is a schematic diagram of the principle of target distance measurement based on the vanishing point method in the prior art;
[0060] Figure 2 It is a schematic flowchart of a target distance measurement method provided by an embodiment of the present application;
[0061] Figure 3 It is a schematic flowchart of projecting two target lane lines into a planar bird's-eye view in a target distance measurement method provided by the present application;
[0062] Figure 4 It is a schematic flowchart of correcting two side planar lane lines in a target distance measurement method provided by an embodiment of the present application;
[0063] Figure 5 It is a schematic flowchart of determining a pair of trajectory points in a target distance measurement method provided by an embodiment of the present application;
[0064] Figure 6 It is a schematic diagram of a to-be-detected image in a target distance measurement method provided by an embodiment of the present application;
[0065] Figure 7 It is a planar bird's-eye view provided by the present application;
[0066] Figure 8 It is a schematic diagram of the principle for determining a three-dimensional lane line provided by this application;
[0067] Figure 9 is Figure 8 a top view of the schematic diagram of the principle in
[0068] Figure 10 is Figure 9 a differential schematic diagram of the W area in
[0069] Figure 11 It is a schematic diagram of the principle for determining a target distance based on a three-dimensional lane line provided by this application;
[0070] Figure 12 It is a schematic diagram of the structure of a target ranging device provided by an embodiment of this application;
[0071] Figure 13 It is a block diagram of an electronic device for implementing a target ranging method shown according to an exemplary embodiment. Detailed implementation manners
[0072] To enable those skilled in the art to better understand the solution of this invention, the technical solutions in the embodiments of this invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this invention. Apparently, the described embodiments are only a part rather than all of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this invention.
[0073] As used herein, the term "one embodiment" or "embodiment" refers to a specific feature, structure, or characteristic that may be included in at least one implementation manner of this invention. In the description of this invention, it should be understood that the terms "first", "second", "third", and "fourth" etc. in the specification and claims of this invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. 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 further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0074] Before introducing the target ranging method of the embodiments of this application, the target ranging methods in the prior art will be introduced first.
[0075] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the principle for target ranging based on the vanishing point method in the prior art.
[0076] like Figure 1 As shown, the target obstacle 20 is captured in the image 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.
[0077] The distance measurement between the vehicle of the acquisition device 10 and the target obstacle 20 generally adopts two target distance measurement methods, namely, target distance measurement based on the vanishing point method and target distance measurement based on the obstacle type.
[0078] For the first target distance measurement method, that is, target distance measurement based on vanishing points, it is assumed that the lane where the vehicle is located is a plane, that is, there is no uphill or downhill slope. Based on the normalized image corresponding to the image to be measured ( Figure 1 The target distance between the target vehicle and the acquisition device 10, that is, the distance between the target vehicle and the self-vehicle, is calculated by using the similar triangle method. Specifically, similar triangles refer to Figure 1 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 is similar to the triangle formed by the acquisition device 10, the vertical point of the acquisition device 10 on the ground and the target vehicle (i.e., the target obstacle 20). The calculation formula of the target distance d is as follows:
[0079]
[0080] Among them, H c y is the installation height of the acquisition device 10; b is the ordinate of the target vehicle touchdown point b in the normalized plane G ( Figure 1 The middle vertical coordinate is along the direction of the lane extension); y v is the ordinate of the lane line vanishing point v in the normalized plane G. The coordinates in the normalized plane G correspond one-to-one to the coordinates of the image to be measured.
[0081] In some embodiments, the target distance measurement is performed using a double vanishing point method, that is, the near vanishing point is used for the near target and the far vanishing point is used for the far target, which can improve the accuracy of the target distance measurement to a certain extent. However, the vanishing point determined based on the image and the actual lane conditions (such as lane uphill and downhill) are inaccurate, resulting in inaccurate distance measurement for distant targets. Therefore, the second method described below is generally used for target distance measurement for distant targets.
[0082] For the second target ranging method, that is, target ranging based on the type of obstacle. First, identify the type of the target obstacle 20, that is, identify the vehicle type of the target vehicle. For example, the target vehicle is a sport utility vehicle (SUV). According to the general width and height of the SUV, as well as the pixel width and pixel height of the target vehicle in the image to be measured, calculate the target distance between the host vehicle and the target obstacle 20. The target distance is affected by the vehicle type recognition result.
[0083] As described above, since it is difficult to determine the lane conditions (such as slope) and target obstacle information (such as the actual vehicle width of the target vehicle) based on the image, the target ranging is inaccurate.
[0084] To solve the above problems, the present application provides a target ranging method, which includes: acquiring an image to be measured collected by an acquisition device based on the host vehicle; the image to be measured includes two target lane lines and a target obstacle; based on the installation parameters of the acquisition device relative to the host vehicle, project the two target lane lines onto a planar bird's-eye view to obtain two side planar lane lines; based on the target lane width and the installation parameters, correct the two side planar lane lines to obtain a three-dimensional lane line; the target lane width is determined based on the two target lane lines; based on the three-dimensional lane line, the installation parameters, and the target coordinates of the target obstacle in the image to be measured, determine the target distance between the target obstacle and the host vehicle. By predicting the three-dimensional lane line, improving the accuracy of lane line prediction can improve the accuracy of target ranging based on the target, improve the stability of the target ranging result, and avoid the target ranging result being affected by the detection result of the target obstacle in the image.
[0085] The following introduces a specific embodiment of a target ranging method of the present application. Figure 2 It is a schematic flowchart of a target ranging method 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 the actual system or server product executes, it can be executed in the order shown in the embodiment or the drawing, or executed in parallel (for example, in an environment of parallel processors or multi-threaded processing). Figures 6 - 11 It is a schematic principle diagram of a target ranging method provided by an embodiment of the present application. The following combines Figures 6 - 11 For Figure 2 The method shown is introduced in detail. Specifically, as Figure 2 shown, the method may include:
[0086] S201: Obtain a to-be-measured image collected by a collection device based on the host vehicle; the to-be-measured image includes two target lane lines and a target obstacle.
[0087] When the lane lines of multiple lanes are included in the to-be-measured image, it is necessary to determine two target lane lines.
[0088] In some optional embodiments, the target ranging method further includes:
[0089] Select the longest lane lines on both sides of the longitudinal center line in the to-be-measured image, and determine the two longest lane lines as the two target lane lines; the longitudinal center line includes the center line along the extending direction of the lane line.
[0090] For example, Figure 6 is a schematic diagram of a to-be-measured image provided by an embodiment of the present application. As Figure 6 shown, the to-be-measured image includes multiple lane lines. Determine the longest lane lines on the left and right sides of the longitudinal center line M of the to-be-measured image as the two target lane lines, that is, the first target lane line X1 and the second target 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 on which side of the longitudinal center line M the lane line is located. 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 C2 of the second target lane line X2 refers to the longitudinal distance between the starting point and the highest point of the second target lane line X2.
[0091] Specifically, use a pre-trained neural network model to identify the above two target lane lines to obtain the midpoints of the two target lane lines.
[0092] For example, there are n pixel points (the above midpoints) on the above first target lane line X1 denoted as p 1i (0 < i < n + 1), and the coordinate values corresponding to each pixel point on the first target lane line X1 are: (u 1i , v 1i ). There are m pixel points on the second target lane line X2 denoted as p 2i (0 < i < m + 1), and the coordinate values corresponding to each pixel point on the second target lane line X2 are: (u 2i , v 2i ).
[0093] Determine the above lowest point and highest point based on the coordinate values corresponding to the pixel points. Based on the longitudinal distance between the highest point and the lowest point, select the above two longest lane lines therefrom.
[0094] In this embodiment, according to the length of the lane lines in the image to be measured, lane lines that are unobstructed and relatively close to the host vehicle can be quickly determined. In this way, a three-dimensional lane line that is complete and close to the true lane line change trend can be obtained, improving the accuracy of the target distance based on the three-dimensional lane line.
[0095] S203: Based on the installation parameters of the acquisition device relative to the host vehicle, project the two target lane lines onto a planar bird's-eye view to obtain two side planar lane lines.
[0096] In this embodiment, the two side planar lane lines in the planar bird's-eye view can represent the lane line trajectories obtained after ignoring the slope of the road where the lanes between the two side planar lane lines are located.
[0097] Figure 3 FIG. is a schematic flowchart of a process for projecting two target lane lines onto a planar bird's-eye view. In some alternative embodiments, in step S203 above, based on the installation parameters of the acquisition device relative to the host vehicle, projecting the two target lane lines onto the planar bird's-eye view to obtain two side planar lane lines includes Figure 3 the following steps shown:
[0098] S2031: Based on the installation parameters, project a plurality of image trajectory points on the two target lane lines onto the planar bird's-eye view to obtain a plurality of planar trajectory points.
[0099] In some alternative embodiments, in step S2031, based on the installation parameters, projecting a plurality of image trajectory points on the two target lane lines onto the planar bird's-eye view to obtain a plurality of planar trajectory points includes:
[0100] Based on the internal imaging parameters of the acquisition device, project the plurality of image trajectory points on the two target lane lines onto the corresponding normalized plane of the acquisition device to obtain a plurality of normalized trajectory points;
[0101] Based on the installation parameters, project the plurality of normalized trajectory points onto the planar bird's-eye view to obtain the plurality of planar trajectory points.
[0102] In this embodiment, assuming that the road plane where the two target lane lines are located is a plane without slope, using the internal and external parameters (internal imaging parameters and installation parameters) of the acquisition device, project a plurality of image trajectory points (i.e., pixel points) on the two target lane lines onto the planar bird's-eye view in the world coordinate system to obtain a plurality of planar trajectory points, making the coordinates of the plurality of planar trajectory points more accurate. For example, the following formulas (2) and (3) are used to determine the planar trajectory points:
[0103]
[0104]
[0105] Among them, (x1, h, z1) and (x2, h, z2) are the coordinates of the plane trajectory points corresponding to the first target lane line and the second target lane line respectively; (x′1, y′1, 1) and (x′2, y′2, 1) are the coordinates of the image trajectory points; s is a coefficient used to change the coordinates of the image trajectory points so that the second row in Formula (2) and Formula (3) is equal to the installation height h of the acquisition device; Rx, Ry, and Rz respectively represent the rotation matrices of the angles formed by three mutually perpendicular coordinate axes (i.e., the x-axis, y-axis, and z-axis) in the three-dimensional coordinate system of the acquisition device and three mutually perpendicular coordinate axes in the three-dimensional coordinate system of the vehicle (which belong to the installation parameters of the above acquisition device).
[0106] S2033: Perform curve fitting on the multiple plane trajectory points in the plane bird's-eye view to obtain the two side plane lane lines.
[0107] In some optional embodiments, the curve fitting is performed based on the least squares method.
[0108] In this embodiment, the least squares method is used to perform cubic curve fitting on the above plane trajectory points in the plane bird's-eye view to obtain the two side plane lane lines, that is, the first plane lane line and the second plane lane line. For example, Figure 7 is a plane bird's-eye view provided by the present application, where the plane bird's-eye view is in the z-x plane; as Figure 7 shown, the first plane lane line P1 and the second plane lane line P2 are included in the plane bird's-eye view, and the cubic curves of the first plane lane line P1 and the second plane lane line P2 are respectively represented by the following Formulas (4) and (5):
[0109] x = a1z 3 + b1z 2 + c1z + d1 (4)
[0110] x = a2Z 3 + b2z 2 + c2z + d2 (5)
[0111] Among them, a1, a2, b1, b2, c1, c2, d1, and d2 are all coefficients obtained by fitting.
[0112] S205: Based on the target lane width and the installation parameters, correct the two side plane lane lines to obtain three-dimensional lane lines; the target lane width is determined based on the two target lane lines.
[0113] Figure 4It is a schematic flowchart of a process for correcting two-sided planar lane lines provided by an embodiment of the present application. In some optional embodiments, in the above step S205, based on the target lane width and the installation parameters, the two-sided planar lane lines are corrected to obtain three-dimensional lane lines, which specifically include Figure 4 The following steps shown:[
[0114] S2051: Based on multiple pairs of trajectory points on the two-sided planar lane lines, determine the planar lane width corresponding to each pair of trajectory points to obtain multiple planar lane widths.[
[0115] For example, as Figure 7 shown, between the two endpoints of 20 trajectory points uniformly selected on the first planar lane line P1, that is, between z = 0 and the farthest point in the Z direction, 20 points are uniformly taken and denoted as q 1i (0 < i < 21) (the following first target trajectory points). Then, use a preset mathematical model to calculate the lane width corresponding to each trajectory point. Specifically, the principle example of this preset mathematical model is as follows:
[0116] The coordinate of the i-th trajectory point q 1i on the first planar lane line P1 is (z 1i , x 1i ). Take the derivative of the first planar lane line P1 at the trajectory point q 1i , and denote the derivative as x′ 1i .
[0117] Uniformly and densely select 10,000 intermediate trajectory points on the second planar lane line P2, denoted as q 2j (0 < j < 10001) (the following second target trajectory points), the coordinate value of q 2j is (z 2j , x 2j ), and the derivative of q 2j is x′ 2j .
[0118] Calculate Figure 7 the two angles α1 and α2 shown. Among them, the angle α1 is the angle between the connection line between the i-th trajectory point q 1i and the intermediate trajectory point q 2j and the tangent line of the first planar lane line P1 (such as the tangent line at the trajectory point q 1i ); the angle α2 is the angle between the connection line between the i-th trajectory point q 1i and the intermediate trajectory point q 2j and the tangent line of the second planar lane line P2 (such as the tangent line at the trajectory point q 2j ). The calculation formulas for the two angles α1 and α2 are as follows:
[0119]
[0120]
[0121] For the trajectory point q on the first planar lane line P1 1i , search for the trajectory point q on the second planar lane line P2 by traversal 2j such that the two angles α1 and α2 form the following relationship:
[0122]
[0123] wherein, the absolute values of d1 and d2 in formula (8) are respectively equal to the distances from the acquisition device to the two lane lines on both sides, that is, determined by the above formulas (4) and (5).
[0124] q that satisfies the angular relationship shown in formula (8) 1i and the point q 2j are a pair of trajectory points, and the planar lane width corresponding to this pair of trajectory points is denoted as d 1i .
[0125] The determination of the above formula (8) will be explained in detail below. Figure 8 is a schematic diagram of the principle for determining the three-dimensional lane line provided by this application Figure 9 is Figure 8 the top view of the schematic diagram of the principle in Figure 10 is Figure 9 the differential schematic diagram of the W area in Figures 8 - 10 The principle of the above step formula (8) will be explained below in combination with
[0126] First, assume that the vehicle has been driving along the lane where the vehicle is located, and the driving trajectory of the vehicle (abbreviated as the driving trajectory) is parallel to the two target lane lines. It can be understood that when the acquisition device 10 is on the driving trajectory and the driving trajectory and the two target lane lines are projected onto the planar bird's-eye view, the distance from any point on the driving trajectory to the two target lane lines is magnified by a certain multiple. For example, as Figure 8 shown, based on the installation coordinates of the acquisition device 10, the normalized trajectory points of the normalized plane G are projected into the planar bird's-eye view, and the planar bird's-eye view is in the plane K shown in Figure 8 . Figure 8 and Figure 9 shown, the distance from the driving trajectory point A1 to the first planar lane line P1 is Sd1 (shown in Figure 9 ) and the distance to the second planar lane line P2 is Sd2 (shown in Figure 9 ); the first ratio between Sd1 and the distance d1 from the acquisition device 10 to the first planar lane line P1 is equal to the second ratio between Sd2 and the distance d2 from the acquisition device 10 to the second planar lane line P2. Among them, through the above pair of trajectory points (such as the q shown in Figure 8 )1i and q 2j ) The intersection point of the connection line and the travel trajectory determines the travel trajectory point, such as the travel trajectory point A1.
[0127] Reference Figure 10 Explain that the above first ratio and second ratio are equal. For example Figure 10 As shown, W is the differential region between the first plane lane line P1 and the second plane lane line P2. The distances from the travel trajectory point B1 in the differential region W to the two side plane lane lines (that is, the trajectory point pairs q corresponding to the travel trajectory point B1 on the two side plane lane lines 12 and q 22 ) are S1d1 and S1d2 respectively (in the direction perpendicular to the travel trajectory, q 12 and q 22 The absolute values corresponding to the positions relative to the travel trajectory point B1); the distances from the travel trajectory point B2 to the two side plane lane lines (that is, the trajectory point pairs q corresponding to the travel trajectory point B1 on the two side plane lane lines 13 and q 23 ) are S2d1 and S2d2 respectively (in the direction perpendicular to the travel trajectory, q 13 and q 23 The absolute values corresponding to the positions relative to the travel trajectory point B2). Connect the line between q 12 and q 13 and the line between q 22 and q 23 ) intersect at a point. Therefore, Figure 8 All the trajectory points on the two side plane lane lines shown in
[0128] S2d1×tan(∠1) = S2d2×tan(∠2) (9)
[0129] When the above q 1i and q 2j correspond to q 13 and q 23 respectively, ∠1 and ∠2 in formula (9) are the supplementary angles of the angle α1 and angle α2 shown in Figure 9 respectively, and formula (9) can be transformed into the above formula (8).
[0130] It should be noted that the above trajectory point pairs can also be determined by methods such as the bisection method and optimization.
[0131] S2053: For each trajectory point pair, based on the trajectory point pair and the installation parameters, determine the scaled triangle corresponding to the trajectory point pair.
[0132] Specifically, there are multiple scaled triangles corresponding to multiple trajectory point pairs. For example, the scaled triangle can be Figure 9The acquisition device 10 and the first target trajectory point q shown 1i and the second target trajectory point q 2j form a triangle, where the first target trajectory point q 1i and the second target trajectory point q 2j are a pair of trajectory points. Similarly, the scaled triangles corresponding to other pairs of trajectory points can be obtained.
[0133] In some alternative embodiments, the installation parameters include installation coordinates, and the installation coordinates are determined based on the installation position of the acquisition device on the host vehicle.
[0134] S2055: Based on the target lane width and the scaled triangle, correct the coordinates of the pair of trajectory points to adjust the plane lane width corresponding to the pair of trajectory points to the target lane width, and obtain the corrected pair of trajectory points.
[0135] Specifically, Figure 8 a pair of trajectory points shown, that is, the first target trajectory point q 1i and the second target trajectory point q 2j , and the plane lane width corresponding to it is the distance between two target trajectory points (i.e., q 1i and q 2j ). For example, in step S2055, correcting the coordinates of the pair of trajectory points specifically includes: Figure 8 the first target trajectory point q shown 1i and the second target trajectory point q 2j respectively move along both sides (i.e., the side between the acquisition device 10 and q 1i , and the side between the acquisition device 10 and q 2j ) in equal proportion until the distance between the two target trajectory points (q 1i and q 2j ) reaches the target lane width, then determine the coordinates of the two target trajectory points when the target lane width is reached as the coordinates of a corrected pair of trajectory points ( Figure 9 the corrected first target trajectory point L shown 1i and the corrected second target trajectory point L 2j ). That is, the connection line between the above-mentioned corrected target trajectory points L 1i and L 2j is parallel to the connection line between the above-mentioned trajectory points q before correction 1i and q 2j , and the distance between L 1i and L 2j is equal to the above-mentioned target lane width.
[0136] For example, the above-mentioned preset mathematical model includes the following formula (10) for determining the corrected pair of trajectory points:
[0137]
[0138] Among them, (x 1i , h, z 1i ) are the coordinates of 20 first target trajectory points q on the first plane lane line P1 1i . (x ti , y ti , z ti ) are the coordinates of the trajectory point q obtained after correcting the first target trajectory point q 1i . h is the height of the acquisition device, |d2 - d1| is the target lane width, and d1 and d2 are determined based on the above formulas (4) and (5) respectively; d ti is the plane lane width corresponding to the trajectory point pair including the first target trajectory point q 1i . 1i
[0139] In this embodiment, the plane lane width is corrected along the plane of the scaling triangle, and the coordinates of the trajectory point pair are corrected at the same time. The lane width corresponding to the corrected trajectory point pair is the target lane width, and the coordinates of the corrected trajectory point pair are close to the coordinates of the trajectory points on the actual lane line corresponding to the two target lane lines.
[0140] S2057: Obtain the three-dimensional lane line based on multiple corrected trajectory point pairs.
[0141] Specifically, the corrected trajectory point pair composed of the above first target trajectory point L 1i and the corrected second target trajectory point L 2j . The three-dimensional lane line includes Figure 8 and Figure 9 the first three-dimensional lane line L1 (including the corrected first target trajectory point L 1i ) shown in, the second three-dimensional lane line L2 (including the corrected second target trajectory point L 2j ), and the road plane T determined by the two three-dimensional lane lines.
[0142] In this embodiment, during the formation of the image to be measured, on the paths between the acquisition device and each pair of trajectory points (i.e., the projection paths of each pair of trajectory points), according to a ratio (i.e., according to the scaled triangles corresponding to each pair of trajectory points), the coordinates of each pair of trajectory points are corrected so that the plane lane width corresponding to each pair of trajectory points is corrected to the target lane width, and the corrected pair of trajectory points is obtained. In this way, the three-dimensional lane line obtained based on the corrected multiple pairs of trajectory points is closer to the actual lane line of the lane corresponding to the two target lane lines (such as the case where the actual lane line is a curve), that is, the trajectory point coordinates and lane width on the three-dimensional lane line are close to the actual trajectory point coordinates and actual lane width of the lane corresponding to the two target lane lines.
[0143] In some alternative embodiments, before the above step S205, that is, before correcting the two side plane lane lines based on the target lane width and the installation parameters, the method further includes:
[0144] Determine the lane width corresponding to the target positions of the two side plane lane lines as the target lane width; the target positions of the two side plane lane lines correspond to the large-mouth ends of the two target lane lines.
[0145] Figure 5 It is a schematic flowchart of a process for determining a pair of trajectory points provided by an embodiment of the present application. In some alternative embodiments, before determining the plane lane width corresponding to each pair of trajectory points in the above step S2051, a plurality of pairs of trajectory points need to be determined first. Specifically, before determining the plane lane width corresponding to each pair of trajectory points based on the plurality of pairs of trajectory points on the two side plane lane lines, the method further includes Figure 5 The following steps shown:
[0146] S501: On any one of the two side plane lane lines, determine a plurality of first target trajectory points; the distance between adjacent first target trajectory points is a preset distance.
[0147] S503: Based on the angle between the first connection line and the two side plane lane lines, on the other side plane lane line, determine a plurality of second target trajectory points corresponding one by one to the plurality of first target trajectory points; the first connection line refers to the connection line between the first target trajectory point and the trajectory point on the other side plane lane line.
[0148] In this embodiment, a plurality of pairs of trajectory points with equal intervals are determined, so that the three-dimensional lane line obtained by fitting based on the corrected pairs of trajectory points is closer to the actual lane line, thereby making the target ranging more accurate.
[0149] After determining the three-dimensional lane lines in the above step S205, step S207 is entered to determine the target distance between the target obstacle and the host vehicle based on the three-dimensional lane lines.
[0150] S207: Based on the three-dimensional lane lines, the installation parameters, and the target coordinates of the target obstacle in the to-be-detected image, determine the target distance between the target obstacle and the host vehicle.
[0151] Figure 11 is a schematic diagram of the principle for determining the target distance based on the three-dimensional lane lines provided by this application. The above target coordinates may be the pixel coordinates of the grounding point of the target obstacle in the to-be-detected image. For example, the grounding point is projected onto the normalized image as Figure 11 the normalized grounding point M1 shown, based on Figure 11 the coordinates of the acquisition device 10 shown (the above installation parameters), project the coordinates of the normalized grounding point M1 onto the road plane T (including the first three-dimensional lane line L1 and the second three-dimensional lane line L2) determined by the three-dimensional lane lines to obtain Figure 11 the target point M10 shown (that is, the straight line connecting the optical center of the acquisition device 10 and the normalized grounding point M1 and the plane T formed by the three-dimensional lane lines will intersect at the target point M10), and determine the coordinates of the target point M10 as the coordinates of the target obstacle 20. For example, Figure 11 the coordinate value of the z-axis direction (along the driving direction of the host vehicle) of the target point M10 shown is the longitudinal distance Z0 between the target obstacle 20 and the acquisition device 10. Similarly, based on the projection of the center of the rectangular frame of the target obstacle in the to-be-detected image, determine the actual center coordinates of the target obstacle on the road plane T, and use the similar triangle method to obtain the lateral distance of the target obstacle.
[0152] In the embodiments of this application, by predicting the three-dimensional lane lines, the accuracy of lane line prediction can be improved, the accuracy of target distance measurement can be improved, the stability of the target distance measurement result can be improved, and the target distance measurement result can be prevented from being affected by the detection result of the target obstacle in the image.
[0153] An embodiment of this application provides a target distance measurement device. Figure 12 is a schematic structural diagram of a target distance measurement device provided by an embodiment of this application. As Figure 12 shown, the target distance measurement device includes:
[0154] 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 two target lane lines and a target obstacle;
[0155] A projection module, configured to project the two target lane lines onto a planar bird's-eye view based on the installation parameters of the acquisition device relative to the host vehicle to obtain two side planar lane lines;
[0156] A lane line determination module, configured to correct the two-side planar lane lines based on the target lane width and the installation parameters to obtain three-dimensional lane lines;
[0157] A distance determination module, configured to determine a target distance between the target obstacle and the host vehicle based on the three-dimensional lane lines, the installation parameters, and the target coordinates of the target obstacle in the to-be-detected image.
[0158] In some optional embodiments, the lane line determination module is further configured to:
[0159] Determine the planar lane width corresponding to each trajectory point pair based on multiple trajectory point pairs on the two-side planar lane lines to obtain multiple planar lane widths;
[0160] For each trajectory point pair, determine a scaled triangle corresponding to the trajectory point pair based on the trajectory point pair and the installation parameters;
[0161] Correct the coordinates of the trajectory point pair based on the target lane width and the scaled triangle to adjust the planar lane width corresponding to the trajectory point pair to the target lane width, so as to obtain the corrected trajectory point pair;
[0162] Obtain the three-dimensional lane lines based on multiple corrected trajectory point pairs.
[0163] In some optional embodiments, the device further includes:
[0164] A first target determination module, configured to determine multiple first target trajectory points on any one of the two-side planar lane lines; the distance between adjacent first target trajectory points is a preset distance;
[0165] A second target determination module, configured to determine multiple second target trajectory points corresponding one-to-one to the multiple first target trajectory points on the other side planar lane line based on the included angle between the first connection line and the two-side planar lane lines; the first connection line refers to the connection line between the first target trajectory point and the trajectory point on the other side planar lane line.
[0166] In some optional embodiments, the above projection module includes:
[0167] A first projection sub-module, configured to project multiple image trajectory points on the two target lane lines onto the planar bird's-eye view based on the installation parameters to obtain multiple planar trajectory points;
[0168] A second projection sub-module, configured to perform curve fitting on the multiple planar trajectory points in the planar bird's-eye view to obtain the two-side planar lane lines.
[0169] In some alternative embodiments, the first projection sub-module is further configured to:
[0170] Based on the internal imaging parameters of the acquisition device, project the multiple image trajectory points on the two target lane lines onto the corresponding normalized plane of the acquisition device to obtain normalized trajectory points;
[0171] Based on the installation parameters, project the normalized trajectory points onto the planar bird's-eye view to obtain the multiple planar trajectory points.
[0172] In some alternative embodiments, the device further includes:
[0173] A lane width determination module, configured to determine the lane width corresponding to the target positions of the two side planar lane lines as the target lane width; the target positions of the two side planar lane lines correspond to the large-mouth ends of the two target lane lines.
[0174] In some alternative embodiments, the device further includes:
[0175] A lane determination module, configured to respectively select the longest lane lines on both sides of the longitudinal center line in the to-be-tested image, and determine the two longest lane lines as the two target lane lines; the longitudinal center line includes the center line along the extending direction of the lane line.
[0176] The device in the embodiments of the present application and the method embodiments are based on the same application concept.
[0177] Figure 13 It is a block diagram of an electronic device for implementing a target ranging method shown according to an exemplary embodiment.
[0178] The electronic device may be a server or a terminal device, and its internal structure diagram may be as Figure 13 shown. 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, a target ranging method is implemented.
[0179] Those skilled in the art can understand, Figure 13The structure shown is only a block diagram of some structures related to the present disclosure solution, and does not constitute a limitation on the electronic device to which the present disclosure solution is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component arrangement.
[0180] 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, and the at least one instruction or the at least one program segment is loaded and executed by the processor to perform the above-mentioned target ranging method.
[0181] An embodiment of the present application provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can perform the above-mentioned target ranging method.
[0182] 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 USB flash drives, read-only memories (ROMs), mobile hard disks, magnetic disks, or optical discs.
[0183] In an exemplary embodiment, there is also provided a computer program product. The computer program product includes a computer program. The computer program is stored in a readable storage medium, and at least one processor of a computer device reads and executes the computer program, so that the computer device performs the target ranging method of the embodiment of the present disclosure.
[0184] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The 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 various 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 (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0185] In summary, the present application obtains a to-be-detected image collected by a collection device based on the host vehicle; the to-be-detected image includes two target lane lines and a target obstacle; projects the two target lane lines into a planar bird's-eye view based on the installation parameters of the collection device relative to the host vehicle to obtain two side planar lane lines; corrects the two side planar lane lines based on the target lane width and the installation parameters to obtain three-dimensional lane lines; determines a target distance between the target obstacle and the host vehicle based on the three-dimensional lane lines, the installation parameters, and the target coordinates of the target obstacle in the to-be-detected image. By predicting the three-dimensional lane lines, the accuracy of lane line prediction can be improved, the accuracy of target distance measurement can be improved, the stability of the target distance measurement result can be improved, and the influence of the target obstacle detection result in the image on the target distance measurement result can be avoided.
[0186] 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 by the present application can easily think of changes or substitutions, which should all be covered within 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.
[0187] In the specification provided herein, a large number of specific details are set forth. However, it will be understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0188] 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 foregoing description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together in a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed present application requires more features than are expressly recited in each claim. Rather, as reflected by the claims, the inventive aspects lie in less than all 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.
[0189] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed 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 used 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 expressly 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.
[0190] In addition, those skilled in the art will be able to understand that, although some of the embodiments described herein include certain features included in other embodiments but not other features, the combination of the features of different embodiments means that it is within the scope of the present 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 target ranging method, characterized in that, The method includes: Obtaining a to-be-detected image collected by a collection device based on a host vehicle; the to-be-detected image includes two target lane lines and a target obstacle; Projecting the two target lane lines onto a planar bird's-eye view based on installation parameters of the collection device relative to the host vehicle to obtain two side planar lane lines; Correcting the two side planar lane lines based on a target lane width and the installation parameters to obtain three-dimensional lane lines; the target lane width is determined based on the two target lane lines; Determining a target distance between the target obstacle and the host vehicle based on the three-dimensional lane lines, the installation parameters, and target coordinates of the target obstacle in the to-be-detected image; Wherein, correcting the two side planar lane lines based on the target lane width and the installation parameters to obtain three-dimensional lane lines includes: determining a planar lane width corresponding to each pair of trajectory points based on multiple pairs of trajectory points on the two side planar lane lines to obtain a plurality of planar lane widths; for each pair of trajectory points, determining a scaled triangle corresponding to the pair of trajectory points based on the pair of trajectory points and the installation parameters; correcting coordinates of the pair of trajectory points based on the target lane width and the scaled triangle to adjust the planar lane width corresponding to the pair of trajectory points to the target lane width to obtain the corrected pair of trajectory points; obtaining the three-dimensional lane lines based on multiple corrected pairs of trajectory points.
2. The method according to claim 1, wherein Before determining the planar lane width corresponding to each pair of trajectory points based on multiple pairs of trajectory points on the two side planar lane lines, the method further includes: Determining a plurality of first target trajectory points on any one of the two side planar lane lines; a preset spacing exists between adjacent first target trajectory points; Determining a plurality of second target trajectory points corresponding one-to-one to the plurality of first target trajectory points on the other side planar lane line based on an angle between a first connection line and the two side planar lane lines; the first connection line refers to a connection line between the first target trajectory point and a trajectory point on the other side planar lane line.
3. The method according to claim 1, characterized in that, The installation parameters include installation coordinates, and the installation coordinates are determined based on an installation position of the collection device on the host vehicle.
4. The method according to any one of claims 1 to 3, characterized in that, Projecting the two target lane lines onto a planar bird's-eye view based on installation parameters of the collection device relative to the host vehicle to obtain the two side planar lane lines includes: Projecting a plurality of image trajectory points on the two target lane lines onto the planar bird's-eye view based on the installation parameters to obtain a plurality of planar trajectory points; Performing curve fitting on the plurality of planar trajectory points in the planar bird's-eye view to obtain the two side planar lane lines.
5. The method according to claim 4, characterized in that Projecting a plurality of image trajectory points on the two target lane lines onto the planar bird's-eye view based on the installation parameters to obtain a plurality of planar trajectory points includes: Projecting the plurality of image trajectory points on the two target lane lines onto a normalized plane corresponding to the collection device based on internal imaging parameters of the collection device to obtain normalized trajectory points; Based on the installation parameters, project the normalized trajectory points onto the planar bird's-eye view to obtain the multiple planar trajectory points.
6. The method according to claim 4, wherein The curve fitting is performed based on the least squares method.
7. The method according to any one of claims 1 to 3, characterized in that, Before correcting the two-side planar lane lines based on the target lane width and the installation parameters, the method further includes: Determine the lane width corresponding to the target positions of the two-side planar lane lines as the target lane width; the target positions of the two-side planar lane lines correspond to the large-mouth ends of the two target lane lines.
8. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Select the longest lane lines on both sides of the longitudinal center line in the to-be-detected image, and determine the two longest lane lines as the two target lane lines; the longitudinal center line includes the center line along the extending direction of the lane line.
9. A target ranging device, characterized in that, The device includes: An acquisition module, configured to acquire a to-be-detected image acquired by an acquisition device based on a vehicle; the to-be-detected image includes two target lane lines and a target obstacle; A projection module, configured to project the two target lane lines into a planar bird's-eye view based on the installation parameters of the acquisition device relative to the vehicle to obtain two-side planar lane lines; A lane line determination module, configured to correct the two-side planar lane lines based on the target lane width and the installation parameters to obtain three-dimensional lane lines; the target lane width is determined based on the two target lane lines; A distance determination module, configured to determine a target distance between the target obstacle and the vehicle based on the three-dimensional lane lines, the installation parameters, and the target coordinates of the target obstacle in the to-be-detected image; Wherein, the lane line determination module is further configured to: determine the planar lane width corresponding to each trajectory point pair based on multiple trajectory point pairs on the two-side planar lane lines to obtain multiple planar lane widths; for each trajectory point pair, determine the scaled triangle corresponding to the trajectory point pair based on the trajectory point pair and the installation parameters; correct the coordinates of the trajectory point pair based on the target lane width and the scaled triangle to adjust the planar lane width corresponding to the trajectory point pair to the target lane width to obtain the corrected trajectory point pair; and obtain the three-dimensional lane lines based on multiple corrected trajectory point pairs.
10. A vehicle, characterized in that, The vehicle includes an electronic device, the electronic device includes a processor and a memory, and at least one instruction or at least one segment of program is stored in the memory, and the at least one instruction or the at least one segment of program is loaded and executed by the processor to perform the target distance measurement method according to any one of claims 1-8.
Citation Information
Patent Citations
Three-dimensional lane line detection method and device, and storage medium
CN112733812A
Target vehicle distance measurement method, device, equipment and medium
CN114370849A