Method, device and electronic device for extracting lane
By obtaining the coordinate values of the target image and lane line position points in an autonomous driving vehicle, combining the calibration parameters and camera height of the vehicle-mounted camera, the lane is directly extracted, which solves the problems of large calculation volume and low efficiency in the prior art, and achieves more efficient and accurate lane extraction.
Patent Information
- Application Number
- CN202110949343.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-18
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-08-18
AI Technical Summary
When extracting from lanes by existing autonomous vehicles, the calculation amount is large and the calculation process is complex, resulting in low extraction efficiency and accuracy.
By obtaining the target image, the coordinate values of the lane line position points in the pixel coordinate system, the calibration parameters of the vehicle camera and the camera height, the transformation matrix from the pixel coordinate system to the vehicle coordinate system is determined, and the lane is directly extracted to avoid three-dimensional reconstruction and inverse perspective transformation processing.
It improves the efficiency and accuracy of lane extraction, simplifies the calculation process, and reduces the calculation burden.
Smart Images

Figure CN113657282B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method, device and electronic equipment for extracting a lane. Background Art
[0002] An autonomous vehicle is a smart car that uses a computer system to achieve unmanned driving. During the driving process, the autonomous vehicle needs to extract the self-lane, that is, the current lane in which the vehicle is traveling. Effective extraction of the self-lane can not only effectively divide the driving area, but also effectively determine the distance of the nearest obstacle in front, thereby improving the safety of vehicle driving. In related technologies, the self-lane is usually extracted by three-dimensional reconstruction. In the process of extracting the self-lane, it is usually necessary to perform inverse perspective transformation processing to convert the pixel coordinate system into the vehicle coordinate system, and then obtain an image from a bird's-eye view. This method has a large amount of calculation and a complex calculation process, which reduces the efficiency and accuracy of extracting the self-lane. Summary of the invention
[0003] The purpose of the present invention is to provide a method, device and electronic equipment for extracting a self-driving lane, so as to improve the extraction efficiency and accuracy of the self-driving lane.
[0004] The present invention provides a method for extracting a self-lane, which includes: acquiring a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, and a calibration parameter and a camera height of a vehicle-mounted camera; based on the calibration parameter and the camera height, determining a transformation matrix for converting the pixel coordinate system into a vehicle coordinate system; based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix, determining a second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system; and extracting the self-lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0005] Furthermore, the step of obtaining a target image including at least two lane lines and a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system includes: obtaining a first image captured by a vehicle-mounted camera; performing lane line detection on the first image, and outputting a second image including position points corresponding to the lane lines, and a third coordinate value of each position point in the pixel coordinate system; if it is determined based on the position points corresponding to the lane lines that the second image includes at least two lane lines, filtering the third coordinate value of each position point in the pixel coordinate system to obtain a filtered second image; processing the filtered second image based on the conversion range limiting parameters obtained in advance to obtain a target image and the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
[0006] Furthermore, the third coordinate value of each position point in the pixel coordinate system is filtered to obtain a filtered second image, including: for each third coordinate value, deleting the position point corresponding to the specified coordinate value whose coordinate value in the horizontal axis direction is greater than the width of the second image, and / or whose coordinate value in the vertical axis direction is greater than the height of the second image, to obtain the filtered second image.
[0007] Furthermore, the conversion range limitation parameters include: a first limiting point, a second limiting point, a third limiting point and a fourth limiting point; the first limiting point, the second limiting point and the third limiting point have the same longitudinal coordinate values, which are used to determine the upper boundary line of the target image in the filtered second image; the longitudinal coordinate value of the fourth limiting point is used to determine the lower boundary line of the target image in the filtered second image; the transverse coordinate value of the first limiting point is used to determine the left boundary line of the target image in the filtered second image; the transverse coordinate value of the third limiting point is used to determine the right boundary line of the target image in the filtered second image; the transverse coordinate value of the second limiting point is the same as the transverse coordinate value of the fourth limiting point, and is located on a straight line corresponding to half the width value of the filtered second image.
[0008] Furthermore, based on the conversion range limitation parameters acquired in advance, the filtered second image is processed to obtain the target image, and the step of obtaining the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system includes: connecting the first limitation point, the second limitation point, the third limitation point and the fourth limitation point in sequence, and determining the image area surrounded by the first limitation point, the second limitation point, the third limitation point and the fourth limitation point as the target image; obtaining the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
[0009] Furthermore, based on the calibration parameters and the camera height, the step of determining a transformation matrix for converting the pixel coordinate system into the vehicle coordinate system includes: determining the transformation matrix based on the calibration parameters and the camera height according to a preset transformation matrix calculation method.
[0010] Furthermore, based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix, the step of determining the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system includes: determining the first matrix based on the transformation matrix and the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system; normalizing the first matrix to obtain the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0011] Furthermore, based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system, the step of extracting the self-lane includes: determining the bird's-eye view image corresponding to the target image based on the second coordinate value; screening the second coordinate value to determine the position points in the bird's-eye view image that meet a preset range; if the position points that meet the preset range indicate that the bird's-eye view image includes at least two lane lines, performing straight line fitting based on the second coordinate value of the position point corresponding to each lane line to obtain a fitted straight line corresponding to each lane line; extracting the self-lane based on the fitted straight line corresponding to each lane line.
[0012] Furthermore, based on the fitted straight line corresponding to each lane line, the step of extracting the self-lane includes: determining the coordinates of the intersection of the fitted straight line corresponding to each lane line and the designated boundary line of the bird's-eye view image; wherein the designated boundary line includes the upper boundary line or the lower boundary line of the bird's-eye view image; sorting the first horizontal axis coordinate value in each intersection coordinate and the second horizontal axis coordinate value corresponding to half the width of the bird's-eye view image from small to large, determining the fitted straight line at the first horizontal axis coordinate value located on the left side of the second horizontal axis coordinate value as the left lane line of the self-lane, and determining the straight line at the first horizontal axis coordinate value located on the right side of the second horizontal axis coordinate value as the right lane line of the self-lane; determining the self-lane based on the left lane line and the right lane line.
[0013] The present invention provides a self-lane extraction device, which includes: an acquisition module, used to acquire a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, a calibration parameter of a vehicle-mounted camera and a camera height; a first determination module, used to determine a transformation matrix for converting a pixel coordinate system into a vehicle coordinate system based on the calibration parameter and the camera height; a second determination module, used to determine a second coordinate value of a position point corresponding to each lane line in a vehicle coordinate system based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix; and an extraction module, used to extract the self-lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0014] An electronic device provided by the present invention includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned self-lane extraction method.
[0015] The present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned self-lane extraction method.
[0016] The self-lane extraction method, device and electronic device provided by the present invention obtain a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, a calibration parameter of a vehicle-mounted camera and a camera height; based on the calibration parameter and the camera height, determine a transformation matrix for converting the pixel coordinate system into a vehicle coordinate system; based on the first coordinate value of a position point corresponding to each lane line in the pixel coordinate system and the transformation matrix, determine a second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system; based on the second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system, extract the self-lane. In this method, the transformation matrix for converting the pixel coordinate system into the vehicle coordinate system can be determined according to the calibration parameter and the camera height of the vehicle-mounted camera, and the first coordinate value of the position point corresponding to the lane line in the pixel coordinate system is converted into the second coordinate value in the vehicle coordinate system through the transformation matrix, thereby extracting the self-lane. Since there is no need to go through processes such as three-dimensional reconstruction and inverse perspective transformation processing, the extraction efficiency and accuracy of the self-lane are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A flow chart of a method for extracting a lane provided by an embodiment of the present invention;
[0019] Figure 2 A flowchart of another method for extracting a lane provided by an embodiment of the present invention;
[0020] Figure 3 A schematic diagram of a BEV conversion range provided by an embodiment of the present invention;
[0021] Figure 4 A flowchart of another method for extracting a lane provided by an embodiment of the present invention;
[0022] Figure 5 A flowchart of another method for extracting a lane provided by an embodiment of the present invention;
[0023] Figure 6 A flowchart of another method for extracting a lane provided by an embodiment of the present invention;
[0024] Figure 7 A schematic diagram of a test result provided by an embodiment of the present invention;
[0025] Figure 8 A schematic diagram of a curve test result provided by an embodiment of the present invention;
[0026] Fig. 9 A schematic diagram of a ramp test result provided by an embodiment of the present invention;
[0027] Fig.10 A schematic diagram of a special scenario test result provided by an embodiment of the present invention;
[0028] Fig.11 A schematic diagram of the structure of a lane extraction device provided by an embodiment of the present invention;
[0029] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] At present, when an autonomous vehicle is driving, effectively extracting the lane can not only effectively divide the driving area, but also effectively determine the distance to the nearest obstacle in front, thereby improving the safety of the vehicle. In the related art, there are relatively few methods for extracting the lane. In one method, the lane can be extracted by three-dimensional reconstruction. In the process of extracting the lane, this method usually requires inverse perspective transformation processing to obtain a bird's-eye view. This method has a large amount of calculation and a complex calculation process, which reduces the efficiency and accuracy of extracting the lane.
[0032] Based on this, the embodiments of the present invention provide a method, device and electronic device for extracting a self-lane, and the technology can be applied to applications that require extracting a self-lane during vehicle driving.
[0033] To facilitate understanding of this embodiment, a method for extracting a lane disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:
[0034] Step S102, obtaining a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, calibration parameters of a vehicle-mounted camera, and a camera height.
[0035] The above target image is usually an image including the area corresponding to the lane. Therefore, the target image usually needs to include at least two lane lines. The image area corresponding to the target image can be a triangular area, etc. Each lane line contained in the above target image usually corresponds to multiple position points, and each position point has its corresponding first coordinate value. In the pixel coordinate system, the first coordinate value is usually a two-dimensional coordinate; the calibration parameters of the above vehicle-mounted camera can be obtained by the calibration parameter acquisition method in the relevant technology, such as the Zhang calibration method can be used to calibrate the vehicle-mounted camera to obtain the camera's internal parameter matrix, and fx, fy, u0, v0 can be obtained through the internal parameter matrix; the camera can be calibrated by external parameters to obtain the pitch angle pitch and the yaw angle yaw. The above camera height can be understood as the vertical height of the vehicle-mounted camera in the vehicle from the ground. In actual implementation, when it is necessary to extract the vehicle-mounted lane where the vehicle is traveling, it is usually necessary to first obtain the above target image, the first coordinate value, the calibration parameters of the vehicle-mounted camera and the camera height.
[0036] Step S104: determining a transformation matrix for converting the pixel coordinate system into the vehicle coordinate system based on the calibration parameters and the camera height.
[0037] The above-mentioned vehicle coordinate system is usually a special moving coordinate system used to describe the movement of a car, whose origin coincides with the center of mass. When the vehicle is stationary on a horizontal road, the X-axis is parallel to the ground and points to the front of the vehicle, the Z-axis passes through the center of mass of the car and points upward, and the Y-axis points to the left of the driver. In actual implementation, in order to convert the image taken by the on-board camera into an image under the field of view of a bird's-eye view, the pixel coordinate system can be converted into the vehicle coordinate system. Specifically, the corresponding transformation matrix can be determined based on the calibration parameters and camera height of the obtained on-board camera; for example, the transformation matrix expression can be determined in advance, and the obtained calibration parameters and camera height can be substituted into the transformation matrix expression to determine the above-mentioned transformation matrix.
[0038] Step S106, based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix, determine the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0039] In actual implementation, after determining the transformation matrix, the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system can be transformed based on the transformation matrix to obtain the second coordinate value corresponding to each position point in the vehicle coordinate system. After completing the transformation process, the image under the bird's-eye view perspective corresponding to the target image can be obtained.
[0040] Step S108, extracting the lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0041] After determining the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system, the lane in which the vehicle is traveling can be extracted based on the determined multiple second coordinate values.
[0042] The above-mentioned method for extracting the self-lane obtains a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, a calibration parameter of a vehicle-mounted camera and a camera height; based on the calibration parameter and the camera height, a transformation matrix for converting the pixel coordinate system into the vehicle coordinate system is determined; based on the first coordinate value of a position point corresponding to each lane line in the pixel coordinate system and the transformation matrix, a second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system is determined; based on the second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system, the self-lane is extracted. In this method, the transformation matrix for converting the pixel coordinate system into the vehicle coordinate system can be determined according to the calibration parameter and the camera height of the vehicle-mounted camera, and the first coordinate value of the position point corresponding to the lane line in the pixel coordinate system is converted into the second coordinate value in the vehicle coordinate system through the transformation matrix, thereby extracting the self-lane. Since there is no need to go through processes such as three-dimensional reconstruction and inverse perspective transformation, the extraction efficiency and accuracy of the self-lane are improved.
[0043] The embodiment of the present invention also provides another method for extracting a lane, which is implemented on the basis of the method in the above embodiment; Figure 2 As shown, the method comprises the following steps:
[0044] Step S202: Acquire a first image captured by the vehicle-mounted camera.
[0045] Step S204: perform lane line detection on the first image, and output a second image including position points corresponding to the lane lines, and a third coordinate value of each position point in the pixel coordinate system.
[0046] The above-mentioned first image can be understood as the original image captured by the on-board camera during the driving process of the vehicle. After obtaining the first image, lane line detection can be performed on the first image. Specifically, the detection method in the relevant technology can be adopted, such as Hough-based lane line detection, perspective transformation-based lane line detection, etc. After the lane line detection is completed, for each frame of the first image captured by the on-board camera, the second image corresponding to the first image showing the lane line position points can be output, as well as the point coordinates of each position point in the pixel coordinate system, that is, the above-mentioned third coordinate value.
[0047] Step S206: If it is determined based on the position points corresponding to the lane lines that the second image includes at least two lane lines, the third coordinate value of each position point in the pixel coordinate system is filtered to obtain a filtered second image.
[0048] In actual implementation, the above-mentioned first image may or may not include lane lines. Therefore, after performing lane line detection on the first image, it is necessary to confirm whether the number of lane lines contained in the second image in the detection result is less than two. If it is less than two, it is assumed that the lane extraction has failed. If it is not less than two, it is necessary to further filter the third coordinate value of each position point in the pixel coordinate system, and determine the filtered second image based on the position point after the filtered coordinate value.
[0049] Specifically, the step of filtering the third coordinate value of each position point in the pixel coordinate system to obtain the filtered second image includes: for each third coordinate value, deleting the position point corresponding to the specified coordinate value whose coordinate value in the horizontal axis direction is greater than the width of the second image, and / or whose coordinate value in the vertical axis direction is greater than the height of the second image, to obtain the filtered second image.
[0050] Since false detection may occur during the lane line detection process, it is necessary to filter the third coordinate value of each position point obtained in the pixel coordinate system. Usually, the third coordinate value of each position point detected by the lane line in the pixel coordinate system is a two-dimensional coordinate. The specified coordinate value corresponding to the horizontal coordinate greater than the width of the second image, or the vertical coordinate greater than the height of the second image, or the horizontal coordinate greater than the width of the second image and the vertical coordinate greater than the height of the second image can be deleted, that is, the position point (i.e., pixel point) corresponding to the specified coordinate value is deleted, and the other third coordinate values are valid coordinate values, so as to obtain the second image after filtering out invalid position points. For example, if the size of the second image is 1920*1080, the pixel points with coordinates exceeding 1920 or 1080 need to be deleted.
[0051] Step S208, based on the conversion range limitation parameters acquired in advance, the filtered second image is processed to obtain a target image and a first coordinate value of a position point corresponding to each lane line in the target image in a pixel coordinate system.
[0052] If the number of lane lines included in the filtered second image is determined to be less than two based on the filtered position points, the self-lane extraction is assumed to fail. If the number of lane lines included in the filtered second image is determined to be not less than two, it is not difficult to find by observing the image captured by the vehicle-mounted camera that the upper half of the image is almost the sky, and the lower half of the image is almost the road on which the vehicle is traveling, and the lane line information on the road is the important information required for self-lane extraction. Therefore, after obtaining the filtered second image, it is usually necessary to further set the image conversion range. In actual implementation, the conversion range limit parameters can be set in advance, and the image conversion range can be set for the filtered second image according to the set conversion range limit parameters, thereby obtaining the above-mentioned target image, and the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
[0053] The above-mentioned conversion range limitation parameters generally include: a first limiting point, a second limiting point, a third limiting point and a fourth limiting point; the first limiting point, the second limiting point and the third limiting point have the same longitudinal coordinate values, which are used to determine the upper boundary line of the target image in the second image after screening; the longitudinal coordinate value of the fourth limiting point is used to determine the lower boundary line of the target image in the second image after screening; the transverse coordinate value of the first limiting point is used to determine the left boundary line of the target image in the second image after screening; the transverse coordinate value of the third limiting point is used to determine the right boundary line of the target image in the second image after screening; the transverse coordinate value of the second limiting point is the same as the transverse coordinate value of the fourth limiting point, and is located on a straight line corresponding to half the width value of the second image after screening.
[0054] In actual implementation, four points usually need to be set, namely the first limiting point, the second limiting point, the third limiting point and the fourth limiting point, which can be set according to the image range to be converted. Figure 3A schematic diagram of a BEV transformation range is shown in the figure. The first limiting point, the second limiting point and the third limiting point are usually set on a straight line. Generally, a straight line corresponding to a position half the height of the image pixel is selected, and the straight line is usually parallel to the horizontal axis to indicate the farthest longitudinal position that needs to be transformed on the second image after screening, which can be represented by Bev_top. For example, if the image size is 1920*1080, half the image height is 1080 / 2=540; the fourth limiting point is usually set on a straight line corresponding to a position close to the lower edge of the second image after screening, and the straight line is usually parallel to the horizontal axis. The maximum position of the lower edge of the second image after screening can be selected to indicate the position of the second image after screening. The nearest longitudinal position on the second image that needs to be transformed can be represented by Bev_bottom; the first limiting point is usually set on a straight line corresponding to the left edge position of the second image after screening, and the straight line is usually parallel to the longitudinal axis. It can be set according to actual needs. The minimum left edge position of the second image after screening can be selected, which can be represented by Bev_left; the third limiting point is usually set on a straight line corresponding to the right edge position of the second image after screening, and the straight line is usually parallel to the longitudinal axis. It can be set according to actual needs. The maximum right edge position of the second image after screening can be selected, which can be represented by Bev_right; Figure 3 As shown, the coordinate values of the second defining point and the fourth defining point in the horizontal axis direction are usually the same, and are usually located on a straight line corresponding to half of the width value of the filtered second image, and the straight line is usually parallel to the vertical axis.
[0055] The step S208 can be implemented by step 1 and step 2:
[0056] Step 1: Connect the first defining point, the second defining point, the third defining point and the fourth defining point in sequence, and determine the image area surrounded by the first defining point, the second defining point, the third defining point and the fourth defining point as the target image.
[0057] like Figure 3 As shown, the four set points are connected in sequence, that is, the first limiting point, the second limiting point, the third limiting point and the fourth limiting point are connected in sequence, and the enclosed image area is a triangle. The enclosed triangle can be determined as the target image.
[0058] Step 2: Obtain the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
[0059] Step S210, obtaining calibration parameters and camera height of the vehicle-mounted camera.
[0060] Step S212, determining the transformation matrix based on the calibration parameters and the camera height according to a preset transformation matrix calculation method.
[0061] The above-mentioned preset transformation matrix calculation method can be the M1 matrix expression shown below. The M1 matrix expression is usually pre-set. The calibration parameter value of the vehicle-mounted camera and the camera height value can be substituted into the M1 matrix expression to obtain the above-mentioned transformation matrix. In the M1 matrix expression, fx, fy, u0, v0 are the obtained calibration parameters of the vehicle-mounted camera, fx, fy, u0, v0; in addition, C1=cos(pitch), C2=cos(yaw), S1=sin(pitch), S2=sin(yaw), and h is the camera height in the M1 matrix expression; it should be noted that fx, fy, u0, v0 in the calibration parameters are usually fixed, and the pitch angle and yaw angle usually change in real time.
[0062]
[0063] Step S214, determining a first matrix based on the transformation matrix and the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system.
[0064] In actual implementation, for the convenience of calculation, the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system is usually expressed in the form of four-dimensional coordinates. For example, in the pixel coordinate system, the horizontal coordinate of a position point is u and the vertical coordinate is v, then the four-dimensional coordinate form is p = [u, v, 1, 1]. Multiply the above transformation matrix by p T , and obtain the first matrix, which is a matrix with four rows and one column.
[0065] Step S216, normalizing the first matrix to obtain a second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system.
[0066] After obtaining the first matrix, the first matrix is usually normalized. Specifically, the data in each row of the first matrix can be divided by the data in the last row to obtain the world coordinates in the vehicle coordinate system, that is, the second coordinate value in the vehicle coordinate system, which can be represented by d, where d T =[x, y, z, 1], where x represents the front distance from the front plane of the vehicle, y represents the distance from the left side of the vehicle, and z represents the upward height.
[0067] In addition, if it is necessary to convert the coordinate values in the vehicle coordinate system to the coordinate values in the pixel coordinate system, the transformation matrix can be determined based on the following transformation matrix expression M2, and d can be multiplied by the transformation matrix, where the meaning of each character in the transformation matrix expression M2 can refer to the meaning of each character in the above-mentioned M1 matrix expression.
[0068]
[0069] Step S218: extracting the lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0070] The above-mentioned method for extracting the self-lane obtains a first image captured by a vehicle-mounted camera. Lane line detection is performed on the first image, and a second image containing position points corresponding to the lane lines and a third coordinate value of each position point in a pixel coordinate system is output. If it is determined based on the position points corresponding to the lane lines that the second image includes at least two lane lines, the third coordinate value of each position point in the pixel coordinate system is filtered to obtain a filtered second image. Based on the conversion range limitation parameters obtained in advance, the filtered second image is processed to obtain a target image and the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system. The calibration parameters and camera height of the vehicle-mounted camera are obtained. According to the preset transformation matrix calculation method, the transformation matrix is determined based on the calibration parameters and the camera height. Based on the transformation matrix and the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system, a first matrix is determined. The first matrix is normalized to obtain the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system. The self-lane is extracted based on the second coordinate value. In this method, the transformation matrix for converting the pixel coordinate system into the vehicle coordinate system can be determined based on the calibration parameters of the on-board camera and the camera height. The first coordinate value of the position point corresponding to the lane line in the pixel coordinate system is converted into the second coordinate value in the vehicle coordinate system through the transformation matrix, and the ego lane is extracted. Since there is no need for three-dimensional reconstruction and inverse perspective transformation processing, the efficiency and accuracy of extracting the ego lane are improved.
[0071] The embodiment of the present invention also provides another method for extracting a lane, which is implemented on the basis of the method in the above embodiment; Figure 4 As shown, the method comprises the following steps:
[0072] Step S402, obtaining a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, calibration parameters of a vehicle-mounted camera, and a camera height.
[0073] Step S404: determining a transformation matrix for converting the pixel coordinate system into the vehicle coordinate system based on the calibration parameters and the camera height.
[0074] Step S406, based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix, determine the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0075] Step S408: determining a bird's-eye view image corresponding to the target image based on the second coordinate value.
[0076] The above-mentioned bird's-eye view image can be understood as an image from a bird's-eye view perspective. Usually, after the coordinates in the pixel coordinate system are converted into the coordinates in the vehicle coordinate system, it is equivalent to converting the image captured by the vehicle camera into an image from a bird's-eye view perspective. The bird's-eye view image can be determined. For example, if the second coordinate value in the vehicle coordinate system is represented by d, where d T =[x, y, z, 1], set the x and y coordinates in the two-dimensional coordinate system of the bird's-eye view image and display them.
[0077] Step S410, screening the second coordinate values to determine the position points in the bird's-eye view image that meet a preset range.
[0078] The above-mentioned preset range is usually a range within a certain distance in front of the front plane of the vehicle, for example, it can be within 30 meters in front of the front plane of the vehicle; in actual implementation, in order to improve the effectiveness of the extracted lane, improve the extraction efficiency and accuracy, after determining the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system, the obtained second coordinate value is usually filtered, for example, the position point within 30 meters in front of the front plane of the vehicle is selected, and the position point greater than 30 meters is deleted, and only the position point within 30 meters is retained. Specifically, if the second coordinate value in the vehicle coordinate system is represented by d, where d T =[x, y, z, 1], since x represents the front distance from the front plane of the vehicle, the multiple second coordinate values corresponding to the multiple position points can be filtered according to the x value.
[0079] Step S412: If the position points that meet the preset range indicate that the bird's-eye view image includes at least two lane lines, straight line fitting is performed based on the second coordinate values of the position points corresponding to each lane line to obtain a fitting straight line corresponding to each lane line.
[0080] If the position points after screening indicate that the number of lane lines in the bird's-eye view image is less than two, it is assumed that the lane extraction has failed. If the number of lane lines is not less than two, a straight line fitting can be performed on the lane lines retained after screening. According to the second coordinate values of all position points, the straight line equation y=kx+b can be obtained, and the values of k and b can be solved. Specifically, the straight line fitting method in the relevant technology can be adopted, which will not be repeated here. After completing the straight line fitting process, each retained lane line usually corresponds to a fitting straight line.
[0081] Step S414, extracting the lane based on the fitting straight line corresponding to each lane line.
[0082] The step S414 can be implemented by the following steps 5 to 7:
[0083] Step 5: determine the coordinates of the intersection of the fitting straight line corresponding to each lane line and the designated boundary line of the bird's-eye view image; wherein the designated boundary line includes the upper boundary line or the lower boundary line of the bird's-eye view image.
[0084] For the convenience of explanation, the upper left corner of the bird's-eye view image is taken as the origin. In actual implementation, after obtaining the fitting straight line corresponding to each lane line mentioned above, the intersection of each fitting straight line and the lower boundary line of the bird's-eye view image (i.e., BEV image) can be calculated. Specifically, let the value of y of each fitting straight line be the image height of the bird's-eye view image, and the value of x of each fitting straight line can be calculated.
[0085] Step six, sort the first horizontal axis coordinate value in each intersection coordinate and the second horizontal axis coordinate value corresponding to half the width of the bird's-eye view image from small to large, and determine the fitting straight line where the first horizontal axis coordinate value is located on the left side of the second horizontal axis coordinate value as the left lane line of the self-driving lane, and determine the straight line where the first horizontal axis coordinate value is located on the right side of the second horizontal axis coordinate value as the right lane line of the self-driving lane.
[0086] Calculate the value corresponding to half the width of the bird's-eye view image, recorded as half_x, sort the x value of each fitted straight line obtained through the above steps and half_x from small to large. After sorting, the fitted straight line with the x value immediately to the left of half_x corresponds to the left lane line of the self-drive lane, and the fitted straight line with the x value immediately to the right of half_x corresponds to the right lane line of the self-drive lane. If half_x is the maximum or minimum value, it means that the vehicle has been missed, and the detected lane lines are all on the left or right side, and the self-drive lane cannot be screened. At this time, it is usually assumed that the self-drive lane screening has failed, and the self-drive lane screening is completed.
[0087] See also Figure 5 Another flow chart of a method for extracting a self-driving lane is shown, including fitting straight line 1, fitting straight line 2, fitting straight line 3 and fitting straight line 4, calculating the x values of the coordinates of the intersection of each fitting straight line with the specified boundary line of the bird's-eye view image respectively as x1, x2, x3, x4, calculating the value half_x corresponding to half the width of the bird's-eye view image, and sorting x1, x2, x3, x4 and half_x from small to large. If half_x is in the middle, the self-driving lane can be extracted. If half_x is the smallest or half_x is the largest, the self-driving lane cannot be extracted.
[0088] Step seven: determine the own lane based on the left lane marking and the right lane marking.
[0089] The above-mentioned method for extracting the self-driving lane determines the bird's-eye view image corresponding to the target image based on the second coordinate value. The second coordinate value is screened to determine the position points in the bird's-eye view image that meet the preset range. If the position points that meet the preset range indicate that the bird's-eye view image includes at least two lane lines, a straight line fitting is performed based on the second coordinate value of the position point corresponding to each lane line to obtain a fitted straight line corresponding to each lane line. The self-driving lane is extracted based on the fitted straight line corresponding to each lane line. In this method, the transformation matrix for converting the pixel coordinate system to the vehicle coordinate system can be determined based on the calibration parameters of the on-board camera and the camera height. The transformation matrix is used to convert the first coordinate value of the position point corresponding to the lane line in the pixel coordinate system into the second coordinate value in the vehicle coordinate system, and then the self-driving lane is extracted. Since there is no need to go through processes such as three-dimensional reconstruction and inverse perspective transformation, the efficiency and accuracy of extracting the self-driving lane are improved.
[0090] To further understand the above embodiments, the following is provided: Figure 6 The flowchart of another self-lane extraction method shown in the figure first obtains a lane line image and determines the BEV transformation range. At the same time, based on the lane line detection pixel coordinates, it is determined whether the number of lane lines is less than 2. If so, the self-lane extraction fails by default. If not, the pixel coordinates are filtered. After filtering, it is determined again whether the number of lane lines is less than 2. If so, the self-lane extraction fails by default. If not, a BEV transformation is performed based on the determined BEV transformation range, and the world coordinate points after the BEV transformation are filtered. The retained lane lines are fitted with straight lines to obtain the fitted straight lines corresponding to each lane line, and finally the self-lane extraction is performed based on the fitted straight lines.
[0091] The above method can convert the image captured by the on-board camera into an image captured under a bird's-eye view, providing effective assistance for ranging and lane detection in the field of autonomous driving; under a bird's-eye view, it can effectively distinguish the self-driving lane, left and right lanes, and the classification speed is fast and simple, which effectively solves the weakness of lane type regression. The BEV transformation method is efficient and accurate, significantly better than other inverse perspective transformation methods. In addition, the self-driving lane screening in this method is relatively novel, and combined with the lane line features, it avoids a large number of regression calculations in deep learning. And the accuracy is relatively high. It can effectively avoid the complexity brought by the three-dimensional reconstruction of the lane line, and the self-driving lane can be extracted through a simple and easy-to-implement solution.
[0092] The above-mentioned lane extraction method has been verified by a large number of experiments. The extraction method is simple and efficient and can be applied to highway and urban road scenes, and is also effective at highway ramps and curves. As long as the lane line can be effectively detected, the lane extraction method in this solution can be used to extract the lane. Figure 7 A schematic diagram of a test result is shown in FIG. Figure 8A schematic diagram of a curve test result is shown in FIG. Fig. 9 A schematic diagram of a ramp test result is shown in FIG. Fig.10 A schematic diagram of a special scenario test result is shown in Figures 7 to 10 The left picture in the figure is the input image and the coordinates of the lane line points, and the right picture is the self-lane screening process. The two black solid lines in the middle area of the image in the right picture are the extracted self-lanes.
[0093] The present invention provides a schematic diagram of the structure of a self-driving lane extraction device, such as Fig.11 As shown, the device includes: an acquisition module 110, used to acquire a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, a calibration parameter of a vehicle-mounted camera and a camera height; a first determination module 111, used to determine a transformation matrix for converting a pixel coordinate system into a vehicle coordinate system based on the calibration parameter and the camera height; a second determination module 112, used to determine a second coordinate value of a position point corresponding to each lane line in a vehicle coordinate system based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix; an extraction module 113, used to extract a lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0094] The above-mentioned self-lane extraction device obtains a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, a calibration parameter of a vehicle-mounted camera and a camera height; based on the calibration parameter and the camera height, a transformation matrix for converting the pixel coordinate system into the vehicle coordinate system is determined; based on the first coordinate value of a position point corresponding to each lane line in the pixel coordinate system and the transformation matrix, a second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system is determined; based on the second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system, the self-lane is extracted. In the device, the transformation matrix for converting the pixel coordinate system into the vehicle coordinate system can be determined according to the calibration parameter and the camera height of the vehicle-mounted camera, and the first coordinate value of the position point corresponding to the lane line in the pixel coordinate system is converted into the second coordinate value in the vehicle coordinate system through the transformation matrix, thereby extracting the self-lane. Since there is no need to go through processes such as three-dimensional reconstruction and inverse perspective transformation processing, the extraction efficiency and accuracy of the self-lane are improved.
[0095] Furthermore, the acquisition module is also used to: acquire a first image captured by the vehicle-mounted camera; perform lane line detection on the first image, and output a second image containing position points corresponding to the lane lines, and a third coordinate value of each position point in the pixel coordinate system; if it is determined based on the position points corresponding to the lane lines that the second image includes at least two lane lines, the third coordinate value of each position point in the pixel coordinate system is filtered to obtain a filtered second image; based on the conversion range limitation parameters obtained in advance, the filtered second image is processed to obtain a target image, and the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
[0096] Furthermore, the acquisition module is also used to: for each third coordinate value, delete the position point corresponding to the specified coordinate value whose horizontal axis coordinate value is greater than the width of the second image, and / or whose vertical axis coordinate value is greater than the height of the second image, to obtain a filtered second image.
[0097] Furthermore, the conversion range limitation parameters include: a first limiting point, a second limiting point, a third limiting point and a fourth limiting point; the first limiting point, the second limiting point and the third limiting point have the same longitudinal coordinate values, which are used to determine the upper boundary line of the target image in the filtered second image; the longitudinal coordinate value of the fourth limiting point is used to determine the lower boundary line of the target image in the filtered second image; the transverse coordinate value of the first limiting point is used to determine the left boundary line of the target image in the filtered second image; the transverse coordinate value of the third limiting point is used to determine the right boundary line of the target image in the filtered second image; the transverse coordinate value of the second limiting point is the same as the transverse coordinate value of the fourth limiting point, and is located on a straight line corresponding to half the width value of the filtered second image.
[0098] Furthermore, the acquisition module is also used to: connect the first defining point, the second defining point, the third defining point and the fourth defining point in sequence, and determine the image area enclosed by the first defining point, the second defining point, the third defining point and the fourth defining point as the target image; obtain the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
[0099] Furthermore, the first determination module is also used to: determine the transformation matrix based on the calibration parameters and the camera height according to a preset transformation matrix calculation method.
[0100] Furthermore, the second determination module is also used to: determine the first matrix based on the transformation matrix and the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system; normalize the first matrix to obtain the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system.
[0101] Furthermore, the extraction module is also used to: determine the bird's-eye view image corresponding to the target image based on the second coordinate value; screen the second coordinate value to determine the position points in the bird's-eye view image that meet a preset range; if the position points that meet the preset range indicate that the bird's-eye view image includes at least two lane lines, perform straight line fitting based on the second coordinate value of the position point corresponding to each lane line to obtain a fitted straight line corresponding to each lane line; extract the lane based on the fitted straight line corresponding to each lane line.
[0102] Furthermore, the extraction module is also used to: determine the coordinates of the intersection of the fitting straight line corresponding to each lane line and the designated boundary line of the bird's-eye view image; wherein the designated boundary line includes the upper boundary line or the lower boundary line of the bird's-eye view image; sort the first horizontal axis coordinate value in each intersection coordinate, and the second horizontal axis coordinate value corresponding to half the width of the bird's-eye view image from small to large, and determine the fitting straight line where the first horizontal axis coordinate value is located on the left side of the second horizontal axis coordinate value as the left lane line of the self-lane, and determine the straight line where the first horizontal axis coordinate value is located on the right side of the second horizontal axis coordinate value as the right lane line of the self-lane; determine the self-lane based on the left lane line and the right lane line.
[0103] The implementation principle and technical effects of the self-driving lane extraction device provided in the embodiment of the present invention are the same as those of the aforementioned self-driving lane extraction method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the self-driving lane extraction device, reference may be made to the corresponding contents in the aforementioned self-driving lane extraction method embodiment.
[0104] The embodiment of the present invention further provides an electronic device, see Fig.12 As shown, the electronic device includes a processor 130 and a memory 131. The memory 131 stores machine executable instructions that can be executed by the processor 130. The processor 130 executes the machine executable instructions to implement the above-mentioned lane extraction method.
[0105] Further, Fig.12 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .
[0106] The memory 131 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0107] The processor 130 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 130. The above processor 130 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and completes the steps of the method of the above embodiment in combination with its hardware.
[0108] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned lane extraction method. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0109] The computer program product of the lane extraction method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0110] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for extracting a lane, characterized in that: The method comprises: Acquire a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, a calibration parameter of a vehicle-mounted camera, and a camera height; Based on the calibration parameters and the camera height, determining a transformation matrix for converting a pixel coordinate system into a vehicle coordinate system; Determine a second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix; Extracting the own lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system; The step of acquiring a target image including at least two lane lines and a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system comprises: Acquire a first image captured by the vehicle-mounted camera; Perform lane line detection on the first image, and output a second image including position points corresponding to the lane lines, and a third coordinate value of each position point in the pixel coordinate system; If it is determined based on the position points corresponding to the lane lines that the second image includes at least two lane lines, filtering the third coordinate value of each position point in the pixel coordinate system to obtain a filtered second image; Based on the conversion range limitation parameters acquired in advance, the filtered second image is processed to obtain the target image and the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
2. The method according to claim 1, characterized in that The step of filtering the third coordinate value of each position point in the pixel coordinate system to obtain the filtered second image comprises: For each of the third coordinate values, the position points corresponding to the designated coordinate values whose horizontal axis coordinate values are greater than the width of the second image and / or whose vertical axis coordinate values are greater than the height of the second image are deleted to obtain a filtered second image.
3. The method according to claim 1, characterized in that The conversion range limiting parameters include: a first limiting point, a second limiting point, a third limiting point and a fourth limiting point; The first defining point, the second defining point and the third defining point have the same longitudinal coordinate value, which is used to determine the upper boundary line of the target image in the filtered second image; the longitudinal coordinate value of the fourth defining point is used to determine the lower boundary line of the target image in the filtered second image; The horizontal axis coordinate value of the first defining point is used to determine the left boundary line of the target image in the filtered second image; the horizontal axis coordinate value of the third defining point is used to determine the right boundary line of the target image in the filtered second image; The horizontal axis coordinate value of the second defining point is the same as the horizontal axis coordinate value of the fourth defining point, and is located on a straight line corresponding to half of the width value of the filtered second image.
4. The method according to claim 3, characterized in that The step of processing the filtered second image based on the pre-acquired conversion range limiting parameters to obtain the target image and the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system comprises: sequentially connecting the first defining point, the second defining point, the third defining point and the fourth defining point, and determining an image area enclosed by the first defining point, the second defining point, the third defining point and the fourth defining point as the target image; Obtain a first coordinate value of a position point corresponding to each lane line in the target image in a pixel coordinate system.
5. The method according to claim 1, characterized in that The step of determining a transformation matrix for converting a pixel coordinate system into a vehicle coordinate system based on the calibration parameters and the camera height comprises: According to a preset transformation matrix calculation method, the transformation matrix is determined based on the calibration parameters and the camera height.
6. The method according to claim 1, characterized in that The step of determining the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix comprises: Determine a first matrix based on the transformation matrix and the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system; The first matrix is normalized to obtain a second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system.
7. The method according to claim 1, characterized in that The step of extracting the own lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system comprises: Based on the second coordinate value, determining a bird's-eye view image corresponding to the target image; Screening the second coordinate values to determine a position point in the bird's-eye view image that meets a preset range; If the position points satisfying the preset range indicate that the bird's-eye view image includes at least two lane lines, performing straight line fitting based on the second coordinate values of the position points corresponding to each lane line to obtain a fitting straight line corresponding to each lane line; The own lane is extracted based on the fitting straight line corresponding to each lane line.
8. The method according to claim 7, characterized in that The step of extracting the self-lane based on the fitting straight line corresponding to each lane line comprises: Determine the coordinates of the intersection of the fitting straight line corresponding to each lane line and the designated boundary line of the bird's-eye view image; wherein the designated boundary line includes the upper boundary line or the lower boundary line of the bird's-eye view image; Sort the first horizontal axis coordinate value in each of the intersection coordinates and the second horizontal axis coordinate value corresponding to half the width of the bird's-eye view image from small to large, determine the fitted straight line where the first horizontal axis coordinate value is located on the left side of the second horizontal axis coordinate value as the left lane line of the self-drive lane, and determine the straight line where the first horizontal axis coordinate value is located on the right side of the second horizontal axis coordinate value as the right lane line of the self-drive lane; The own lane is determined based on the left lane marking and the right lane marking.
9. A self-driving lane extraction device, characterized in that: The device comprises: An acquisition module, used to acquire a target image including at least two lane lines, a first coordinate value of a position point corresponding to each lane line in a pixel coordinate system, a calibration parameter of a vehicle-mounted camera, and a camera height; A first determination module, configured to determine a transformation matrix for converting a pixel coordinate system into a vehicle coordinate system based on the calibration parameters and the camera height; A second determination module, configured to determine a second coordinate value of a position point corresponding to each lane line in the vehicle coordinate system based on the first coordinate value of the position point corresponding to each lane line in the pixel coordinate system and the transformation matrix; An extraction module, configured to extract the own lane based on the second coordinate value of the position point corresponding to each lane line in the vehicle coordinate system; The acquisition module is also used for: Acquire a first image captured by the vehicle-mounted camera; Perform lane line detection on the first image, and output a second image including position points corresponding to the lane lines, and a third coordinate value of each position point in the pixel coordinate system; If it is determined based on the position points corresponding to the lane lines that the second image includes at least two lane lines, filtering the third coordinate value of each position point in the pixel coordinate system to obtain a filtered second image; Based on the conversion range limitation parameters acquired in advance, the filtered second image is processed to obtain the target image and the first coordinate value of the position point corresponding to each lane line in the target image in the pixel coordinate system.
10. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for extracting the self-lane according to any one of claims 1 to 8.
11. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method for extracting the lane according to any one of claims 1 to 8.
Citation Information
Patent Citations
Three-dimensional lane line information generation method, device, electronic equipment and medium
CN112598762A