Lane line extraction methods, devices, equipment, storage media, and program products

By processing and statistically analyzing lane line images, peak points are determined to extract the horizontal coordinates of the lane line center. This solves the problems of inaccurate lane line extraction and high cost in existing technologies, achieving efficient and low-cost lane line extraction.

CN115294543BActive Publication Date: 2025-12-02NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210911777.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-12-02
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

Existing lane line extraction methods suffer from insufficient accuracy and require supplemental lighting equipment, increasing hardware costs.

Method used

An enhanced image is obtained by processing the original image. Pixel values ​​are counted along the horizontal axis to determine the peak point of the target statistical map. Gaussian filtering is used to enhance lane line features, and the horizontal coordinate of the lane line center is directly extracted, avoiding the use of supplementary lighting equipment.

Benefits of technology

It improves the accuracy of lane line extraction, reduces hardware costs, and increases extraction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294543B_ABST
    Figure CN115294543B_ABST
Patent Text Reader

Abstract

This application provides a lane line extraction method, apparatus, device, storage medium, and program product, including: acquiring an original image; processing the original image to obtain an enhanced image; statistically analyzing the pixel values ​​of each column of the enhanced image along the horizontal axis to obtain a target statistical map, where the horizontal axis of the target statistical map represents the column of the enhanced image, and the vertical axis of the target statistical map represents the sum of all pixel values ​​in each column of the enhanced image; determining at least one peak point in the target statistical map; determining the horizontal coordinate of the at least one peak point as the horizontal coordinate of the center of at least one lane line; and extracting at least one lane line from the enhanced image based on the horizontal coordinate of the center of the at least one lane line. This improves the accuracy of lane line extraction and reduces its cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent driving of vehicles, and in particular to a lane line extraction method, apparatus, device, storage medium and program product. Background Technology

[0002] In the field of intelligent driving, vehicles can extract lane lines and drive automatically based on the extracted lane lines. Therefore, lane line extraction is of great significance in the field of intelligent driving.

[0003] Current lane line extraction methods involve: a vehicle acquiring a road surface image, processing the image to obtain a curve graph, and then using a set brightness threshold to crop the curve graph to obtain the left and right horizontal coordinates corresponding to the lane line center position. The average of these two horizontal coordinates is then used as the horizontal coordinate of the lane line center position. Finally, the vehicle can extract the lane line based on this horizontal coordinate. However, this method suffers from inaccurate lane line extraction. Summary of the Invention

[0004] This application provides a lane line extraction method, apparatus, device, storage medium, and program product to improve the accuracy of lane line extraction and reduce the cost of lane line extraction.

[0005] In a first aspect, this application provides a lane line extraction method, which includes: acquiring an original image; processing the original image to obtain an enhanced image; statistically analyzing the pixel values ​​of each column of the enhanced image along the horizontal axis to obtain a target statistical map, wherein the horizontal axis of the target statistical map represents the column of the enhanced image, and the vertical axis of the target statistical map represents the sum of all pixel values ​​in each column of the enhanced image; determining at least one peak point of the target statistical map; determining the horizontal coordinate of the at least one peak point as the horizontal coordinate of the center of at least one lane line; and extracting at least one lane line from the enhanced image based on the horizontal coordinate of the center of the at least one lane line.

[0006] Secondly, this application provides a lane line extraction device, comprising: an acquisition module, a processing module, a statistics module, a first determination module, a second determination module, and an extraction module, wherein the acquisition module is used to acquire an original image; the processing module is used to process the original image to obtain an enhanced image; the statistics module is used to perform statistics on the pixel values ​​of each column of the enhanced image along the horizontal axis direction to obtain a target statistical map, wherein the horizontal axis of the target statistical map represents the column of the enhanced image, and the vertical axis of the target statistical map represents the sum of all pixel values ​​in each column of the enhanced image; the first determination module is used to determine at least one peak point of the target statistical map; the second determination module is used to determine the horizontal coordinate of the at least one peak point as the horizontal coordinate of the center of at least one lane line; and the extraction module is used to extract at least one lane line from the enhanced image based on the horizontal coordinate of the center of at least one lane line.

[0007] Thirdly, an electronic device is provided, comprising: a processor and a memory for storing a computer program, the processor for calling and running the computer program stored in the memory, and performing the methods as described in the first aspect or its various implementations.

[0008] Fourthly, a computer-readable storage medium is provided for storing a computer program that causes a computer to perform the methods described in the first aspect or its various implementations.

[0009] Fifthly, a computer program product is provided, including computer program instructions that cause a computer to perform the methods as described in the first aspect or its various implementations.

[0010] Sixthly, a computer program is provided that causes a computer to perform the methods described in the first aspect or its various implementations.

[0011] Through the technical solution of this application, the electronic device can acquire an original image, process the original image to obtain an enhanced image, and statistically analyze the pixel values ​​of each column of the enhanced image along the horizontal axis to obtain a target statistical map. The horizontal axis of the target statistical map represents the column of the enhanced image, and the vertical axis of the target statistical map represents the sum of all pixel values ​​in each column of the enhanced image. Then, the electronic device can determine at least one peak point of the target statistical map. Next, the electronic device can determine the at least one peak point as the horizontal coordinate of the center of at least one lane line. Finally, the electronic device can extract at least one lane line from the enhanced image based on the horizontal coordinate of the center of at least one lane line. In the above process, since the pixel values ​​of lane lines in the enhanced image are higher than those of other locations, and the vertical axis of the target statistical map represents the sum of pixel values ​​in each column of the enhanced image, the vertical axis of the lane line location in the target statistical map is greater than that of other locations. Furthermore, because a horizontal Gaussian filter is used before generating the target statistical map, there will be a statistical peak resembling a Gaussian function at the lane line location in the target statistical map. The horizontal coordinate of the peak point of this statistical peak corresponds to the horizontal coordinate of the lane line center. Therefore, by determining the horizontal coordinate of the peak point of the target statistical map, the horizontal coordinate of the lane line center can be determined, thereby improving the accuracy of lane line extraction. In addition, existing technologies often require supplementary lighting to enhance the brightness of the lane line location during lane line extraction, which incurs hardware costs. Even when the brightness at the lane line location is low, the horizontal coordinate of the peak point of the target statistical map still corresponds to the horizontal coordinate of the lane line center. Therefore, the technical solution of this application does not require supplementary lighting, thus reducing the cost of lane line extraction. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart illustrating a lane line extraction method provided in this application embodiment;

[0014] Figure 2 A schematic diagram illustrating lane line extraction as provided in an embodiment of this application;

[0015] Figure 3 A schematic diagram illustrating another lane line extraction method provided in this application embodiment;

[0016] Figure 4 A schematic diagram illustrating another lane line extraction method provided in this application embodiment;

[0017] Figure 5 A schematic diagram illustrating yet another lane line extraction method provided in this application embodiment;

[0018] Figure 6 A schematic diagram illustrating yet another lane line extraction method provided in this application embodiment;

[0019] Figure 7 A schematic diagram illustrating yet another lane line extraction method provided in this application embodiment;

[0020] Figure 8 A schematic diagram of a lane line extraction device provided in an embodiment of this application;

[0021] Figure 9 This is a schematic block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0024] To address the problem of inaccurate lane line extraction in existing technologies, this application can process the original image to obtain an enhanced image. By determining the peak point of the target statistical map in the enhanced image, the horizontal coordinate of the lane line center can be determined, thereby extracting the lane line. This can improve the accuracy of lane line extraction and reduce the cost of lane line extraction.

[0025] It should be understood that the technical solution of this application can be applied to the following scenarios, but is not limited to:

[0026] The embodiments of this application can be applied to intelligent driving scenarios for vehicles, such as autonomous driving scenarios.

[0027] After introducing the application scenarios of the embodiments of this application, the technical solution of this application will be described in detail below:

[0028] Figure 1 The flowchart illustrates a lane line extraction method provided in this application. This method can be executed by an electronic device, such as an in-vehicle terminal. This application does not limit the scope of this method. Figure 1 As shown, the method may include the following steps:

[0029] S110: Obtain the original image;

[0030] S120: Process the original image to obtain an enhanced image;

[0031] S130: Statistically analyze the pixel values ​​of each column of the enhanced image along the horizontal axis to obtain the target statistical map;

[0032] S140: Determine at least one peak point in the target statistical chart;

[0033] S150: Determine the x-coordinate of at least one peak point as the x-coordinate of the center of at least one lane line;

[0034] S160: Extract at least one lane line from the enhanced image based on the x-coordinate of the center of at least one lane line.

[0035] In this context, the horizontal axis of the target statistics graph represents the columns of the enhanced image, and the vertical axis of the target statistics graph represents the sum of all pixel values ​​in each column of the enhanced image.

[0036] In some implementations, the above-mentioned processing of the original image may include, but is not limited to, the following steps: grayscale conversion, inverse perspective mapping (IPM) transformation, and horizontal and vertical Gaussian filtering of the original image. The original image may be a road surface image containing lane lines acquired by an in-vehicle terminal, but is not limited to this. Grayscale conversion transforms the original image into a grayscale image representing road surface brightness information, reducing the complexity of image processing; IPM transformation eliminates the perspective effect in the grayscale image, transforming it into a top-down view; horizontal and vertical Gaussian filtering enhances the features of the lane lines, such as their shape, color, and texture, making the lane lines clearer in the enhanced image. Therefore, obtaining the target statistical map based on the enhanced image makes lane line extraction more convenient and faster.

[0037] In some feasible implementations, when obtaining the target statistical image based on the enhanced image, the enhanced image can first be divided into multiple equal columns, meaning each column of the enhanced image has the same width. Then, the pixel values ​​of each column of the enhanced image are statistically analyzed to obtain the target statistical image. The horizontal axis of the target statistical image represents the columns of the enhanced image, and the vertical axis can represent the sum of all pixel values ​​in each column of the enhanced image, or the sum of the number of all white pixels in each column of the enhanced image. The pixel values ​​in each column of the enhanced image can be the brightness values ​​of each column of the original image, but are not limited to these. The enhanced image can be divided into 2^N columns, such as 128, 256, 512, or 1024, where N is a positive integer, to facilitate the division of the enhanced image by electronic devices.

[0038] It should be understood that because the pixel value of the lane line location in the enhanced image is higher than that of the location without lane lines, or because the number of white pixels corresponding to the lane line location in the enhanced image is greater than that of the location without lane lines, the ordinate of the lane line location in the target statistical map is greater than that of the location without lane lines. Moreover, when obtaining the target statistical map based on the enhanced image, a horizontal Gaussian filter is used before generating the target statistical map, resulting in a statistical peak at the lane line location in the target statistical map that approximates a Gaussian function. The x-coordinate of the peak point of this statistical peak corresponds to the x-coordinate of the lane line center. Therefore, determining the lane line center x-coordinate by determining the peak point of the target statistical map can improve the accuracy and efficiency of determining the lane line center x-coordinate, thereby improving the accuracy and efficiency of lane line extraction.

[0039] For example, when obtaining a target statistical image based on the above-mentioned enhanced image, and dividing the enhanced image into 350 columns, such as... Figure 2 As shown in (a), the enhanced image includes seven lane lines: lane 1, lane 2, lane 3, lane 4, lane 5, lane 6, and lane 7. Figure 2 The enhanced image represented by (a) is indicated by a black diagonal line. After statistically analyzing the brightness values ​​of each column in this enhanced image, we can obtain the following: Figure 2 The target statistical graph represented by (b) has its vertical axis representing the sum of all brightness values ​​in each column of the enhanced image, and its horizontal axis representing the columns of the enhanced image. The target statistical graph has seven statistical peaks that approximate a Gaussian function: peak 1, peak 2, peak 3, peak 4, peak 5, peak 6, and peak 7. Figure 2 As shown by the 7 dashed lines, the horizontal coordinates of the peak points of these 7 statistical peaks correspond to the horizontal coordinates of the center lines of the 7 lane lines mentioned above. For example, the horizontal coordinate of the peak point of statistical peak 1 corresponds to the horizontal coordinate of the center line of lane line 1, and the horizontal coordinate of the peak point of statistical peak 2 corresponds to the horizontal coordinate of the center line of lane line 2.

[0040] It should be noted that since the above enhanced image is an image processed by Gaussian filtering and other methods, the vertical axis of the above target statistics graph is a value between 0 and 25, rather than the sum of multiple values ​​between 0 and 255.

[0041] In some feasible implementations, when determining at least one peak point of a target statistical graph, the electronic device can first determine the function expression corresponding to the target statistical graph, then calculate the first and second derivatives of the function expression at each coordinate point in the target statistical graph, and finally determine at least one coordinate point where the first derivative is zero and the second derivative is negative as at least one peak point.

[0042] For example, suppose the target statistical graph of the original image is as follows: Figure 3 As shown, the target statistics chart includes 351 coordinate points. The positions of the 7 peak points in the target statistics chart are as follows: Figure 3 As shown in the circle. The electronic device can first determine the function expression of the curve corresponding to the target statistical chart, and calculate the first and second derivative formulas of the function expression. Then, the electronic device can input the 351 coordinate points into the above first and second derivative formulas respectively to determine the first and second derivatives of the function expression at each coordinate point. The coordinate points where the first derivative is zero and the second derivative is negative are determined as peak points.

[0043] In other possible implementations, when determining at least one peak point of the target statistical graph, the electronic device may first combine the ordinates of the target statistical graph's coordinate points into a target sequence according to the ascending or descending order of their abscissas. Then, the electronic device can determine at least one target ordinate in this target sequence. For each of the at least one target ordinates, the target ordinate is greater than the ordinate adjacent to it. Finally, the electronic device can determine the coordinate point of the target statistical graph corresponding to the at least one target ordinate as at least one peak point. The target sequence can be an array or a set; this application does not impose any restrictions on this.

[0044] For example, an electronic device may determine at least one peak point of a target statistical graph based on a target sequence in any of the following ways, but is not limited thereto:

[0045] In one method, the electronic device can determine at least one target ordinate in the target sequence by sequential search, and then determine the coordinate point of the target statistical chart corresponding to the at least one target ordinate as at least one peak point.

[0046] For example, an electronic device can sequentially traverse a target sequence. If a certain ordinate in the target sequence is greater than its adjacent next ordinate and greater than its adjacent previous ordinate, then that ordinate can be determined as the target ordinate. If the first ordinate in the target sequence is greater than its adjacent next ordinate, then the first ordinate is determined as the target ordinate. If the last ordinate in the target sequence is greater than its adjacent previous ordinate, then the last ordinate is determined as the target ordinate. For example, suppose the target statistical map of the enhanced image is as follows: Figure 3 As shown, the target statistics chart includes 351 coordinate points. The positions of the 7 peak points in the target statistics chart are as follows: Figure 3As shown in the circle, this embodiment of the application uses peak point 1 and its nearby coordinates as an example to describe in detail the method of determining the peak point by sequential search. The method of determining the peak point by sequential search using other coordinates is similar and will not be repeated here. Figure 3 As shown, assuming the two coordinate points to the right of peak point 1 are coordinate point 1 and coordinate point 2, and the coordinates of peak point 1, coordinate point 1, and coordinate point 2 are (44, 1.214495), (45, 1.211490), and (46, 1.202478) respectively, then the ordinates of these coordinate points can be combined to form target sequence 1 [1.214495, 1.211490, 1.202478]. Comparing the first ordinate in target sequence 1 with its adjacent second ordinate: 1.214495 > 1.211490, we can determine that the ordinate 1.214495 is the target ordinate, and its corresponding coordinate point (44, 1.214495) is the target ordinate. The peak point is 1.214495. Comparing the second ordinate in target sequence 1 with its adjacent first ordinate (i.e., the first ordinate): 1.211490 < 1.214495. Comparing the second ordinate in target sequence 1 with its adjacent third ordinate (i.e., the third ordinate): 1.211490 > 1.202478. Therefore, the ordinate 1.214495 is not the target ordinate. Comparing the last ordinate in target sequence 1 with its adjacent second ordinate (i.e., the second ordinate): 1.202478 < 1.211490. Therefore, the ordinate 1.202478 is not the target ordinate.

[0047] Method 2: The electronic device can first determine at least one target ordinate in the target sequence using the difference method, and then determine the coordinate point of the target statistical chart corresponding to at least one target ordinate as at least one peak point.

[0048] For example, the electronic device can first determine the difference sequence f of the target sequence d, where both the target sequence d and the difference sequence f have M ordinates. The i-th ordinate of the target sequence d is d(i), and the i-th ordinate of the difference sequence f is f(i), i = 0, 1, 2, ..., M, where M is a positive integer. f(0) = d(0), f(i) = d(i) - d(i-1), i = 1, 2, ..., M. Then, the electronic device can determine the sign of each ordinate in the difference sequence f. If the second ordinate f(i-1) in the difference sequence f is positive, then the electronic device can determine the sign of each ordinate in the difference sequence f. If the sign of f(2) is negative, i.e., f(2) < 0, then the first ordinate d(1) of the target sequence d can be determined as the target ordinate. If the sign of the last ordinate in the difference sequence f is positive, then the last ordinate of the target sequence d(i) can be determined as the target ordinate. If the sign of the ordinate f(i) in the difference sequence f is positive and the sign of the next adjacent ordinate f(i+1) is negative, i.e., f(i) > 0 and f(i+1) < 0, then the ordinate d(i) in the target sequence d can be determined as the target ordinate. For example, suppose the target statistical map of the enhanced image is as follows: Figure 3 As shown, the target statistics chart includes 351 coordinate points. The positions of the 7 peak points in the target statistics chart are as follows: Figure 3 As shown by the circles in the diagram, this embodiment of the application uses peak point 1 and its nearby coordinate points as an example to describe in detail the method for determining the peak point using the finite difference method. The method for determining the peak point using the finite difference method based on other coordinate points is similar and will not be repeated here. Figure 4 As shown, assuming the two coordinate points to the left of peak point 1 are coordinate points 3 and 4, and the two coordinate points to the right of peak point 1 are coordinate points 1 and 2, and the coordinates of coordinate points 3, 4, 1, 1, and 2 are (42, 1.202389), (43, 1.211444), (44, 1.214495), (45, 1.211490), and (46, 1.202478) respectively, then the ordinates of these coordinate points can be combined to form the target sequence d1[1.202389, 1.211444, 1.214495, 1.211490, 1.202].

[478] The difference sequence f1 corresponding to the target sequence d1 is [1.202389, 0.009055, 0.003051, -0.003005, -0.009012]. If the sign of each ordinate in the difference sequence f1 is determined to be positive, positive, positive, negative, negative, then the sign of the third ordinate in the difference sequence f1 is positive and the sign of the fourth element is negative. Therefore, the third ordinate 0.003051 in the target sequence d1 can be determined as the target ordinate. The coordinate point (44, 1.214495) corresponding to the third ordinate 0.003051 is determined as the peak point.

[0049] Method 3: Electronic devices can first determine at least one target ordinate in the target sequence using a binary search method, and then determine the coordinate point of the target statistical chart corresponding to at least one target ordinate as at least one peak point, so as to reduce the search range and improve the efficiency of determining the target ordinate, thereby improving the efficiency of extracting lane lines.

[0050] For example, the electronic device can first determine the target sequence nums, which has M ordinates. The i-th ordinate of the target sequence nums is nums(i), where i = 0, 1, 2, ..., M, and M is a positive integer. Then, the electronic device can determine the middle ordinate d(mid) of the target sequence nums. If M is even, then mid = (0 + M) / 2; if M is odd, then mid = (0 + M - 1) / 2. Then, the electronic device can compare the middle ordinate d(mid) with its adjacent next ordinate d(mid + 1). If d(mid) < d... If d(mid+1) is greater than d(mid+1), then the target ordinate is to the right of d(mid), meaning the target ordinate is in the right half of the target sequence nums. Therefore, the search range can be narrowed down to the right half of the target sequence nums. If d(mid) > d(mid+1), then the target ordinate is to the left of d(mid), meaning the target ordinate is in the left half of the target sequence nums. Therefore, the search range can be narrowed down to the left half of the target sequence nums. Repeating these steps continuously narrows the search range. When there is only one ordinate in the search range, then that ordinate is the target ordinate. When the target sequence includes multiple target ordinates, the target sequence can be divided into multiple subsequences using a divide-and-conquer method. For each subsequence, the above steps are performed: if the first ordinate of a subsequence is the target ordinate, then the first ordinate of that subsequence is compared with the last ordinate of its adjacent preceding subsequence. If the first ordinate of that subsequence is less than the last ordinate of its adjacent preceding subsequence, then the target ordinate is deleted. If the last ordinate of a subsequence is the target ordinate, then the last ordinate of that subsequence is compared with the first ordinate of its adjacent following subsequence. If the last ordinate of that subsequence is less than the first ordinate of its adjacent following subsequence, then the target ordinate is deleted. Finally, the target ordinates determined for each subsequence are determined as the target ordinates of the target sequence, thus allowing for faster determination of multiple peaks and improving the efficiency of lane line extraction.

[0051] For example, suppose the target statistical graph of the original image is as follows: Figure 4 As shown, the target statistics chart includes 351 coordinate points. The positions of the 7 peak points in the target statistics chart are as follows: Figure 4As shown in the circles, this embodiment of the application takes peak point 3, peak point 4 and their nearby coordinate points as examples. Figure 4 Taking the coordinates of the area indicated by the dashed box as an example, this paper describes in detail the method of determining the peak point using the binary search method. The method for determining the peak point using the binary search method for other coordinate points is similar and will not be repeated here. Figure 4 As shown, Figure 4The ordinates of the points within the dashed box in the image can be combined to form the target sequence [10.812004, 10.895889, 10.894087, 10.817002, 10.695451, 10.531155, 10.326323, 10.051840, 9.441965, 7.535724, 5.632271, 4.359540, 3.953222, 4.232109, 4.736362, 4.982545, 4.966951, 4.934371, 4.885294, 4.553170, 3.964616, 3.490853, 3.531834, 3.376]. The target sequence was then divided into eight subsequences: 804, 4.454996, 5.578882, 7.623380, 9.497849, 10.418650, 10.909265, 11.840100, 13.195714, 15.071291, 17.588936, 19.205406, 19.610727, 19.943169, 20.175486, 20.118626, 19.771570. Subsequence 1 [10.812004, 10.895889, 10.894087, 10.817002, 10.695451], subsequence 2 [10.53...]. 1155, 10.326323, 10.051840, 9.441965, 7.535724], subsequence 3 [5.632271, 4.35 9540, 3.953222, 4.232109, 4.736362], subsequence 4 [4.982545, 4.966951, 4.9343 71, 4.885294, 4.553170], subsequence 5 [3.964616, 3.490853, 3.531834, 3.376804 , 4.454996], subsequence 6 [5.578882, 7.623380, 9.497849, 10.418650, 10.909265 Subsequence 7 [11.840100, 13.195714, 15.071291, 17.588936, 19.205406] and subsequence 8 [19.610727, 19.943169, 20.175486, 20.118626, 19.771570] are given. For subsequence 1, the middle ordinate can be determined as 10.894087. Comparing the middle ordinate 10.894087 with its adjacent next ordinate 10.817002, we find that 10.894087 > 10.817002. Therefore, the target ordinate is located on the left side of the subsequence, narrowing the search range to [10.812004, 10.895889, 10.812004, 10.895889, 10.8940100].[894087], the intermediate ordinate is redefined as 10.895889. Comparing the intermediate ordinate 10.895889 with its adjacent next ordinate 10.894087: 10.895889 > 10.894087, the target ordinate is determined to be on the left half of the search range. The search range is narrowed to [10.812004, 10.895889]. The intermediate ordinate is redefined as 10.812004. Comparing the intermediate ordinate 10.812004 with its adjacent next ordinate 10.895889: 10.812004 > 10.894087, the target ordinate is determined to be on the left half of the search range. Within the right half of the search range, the search range is narrowed down to [10.895889]. Since there is only one ordinate in the search range, 10.895889, it can be determined that ordinate 10.895889 is the target ordinate. Similarly, the target ordinates of subsequences 2 to 8 can be determined as 10.531155, 5.632271, 4.982545, 4.454996, 10.909265, 19.205406, and 20.175486, respectively. Then, the target ordinates of subsequences 2 to 4 are determined as the first ordinate, and the target ordinates of subsequences 5 to 7 are determined as the last ordinate. If a ordinate is given, then it is determined whether these target ordinates are the target ordinates of the target sequence. For subsequence 2, its first ordinate 10.531155 is compared with the last ordinate 10.695451 of subsequence 1: 10.531155 < 10.695451, therefore the first ordinate 10.531155 of subsequence 2 is not the target ordinate of the target sequence, and this target ordinate is deleted. For subsequence 5, its last ordinate 4.454996 is compared with the first ordinate 5.578882 of subsequence 6: 4.454996 < 5.578882, therefore the subsequence is not the target ordinate of the target sequence. The last ordinate of sequence 5, 4.454996, is not the target ordinate of the target sequence; therefore, it is deleted. Similarly, the target ordinates of subsequences 3, 4, 6, and 7 can be deleted, resulting in ordinates of 5.632271, 4.982545, 10.909265, and 19.205406 respectively. Finally, the target ordinates of the above target sequences can be determined to be 10.895889 and 20.175486. The corresponding coordinates (106, 10.895889) and (142, 20.175486) can be identified as peak points, namely peak point 3 and peak point 4.

[0052] It should be understood that this application does not limit the method for determining at least one peak point of the target statistical graph.

[0053] In some implementations, the electronic device can smooth the target statistical map before determining at least one peak point to remove noise, thereby improving the accuracy of peak point determination and consequently improving the accuracy of determining the lane center x-coordinate. For example, as... Figure 5 As shown in the circle in (a), Figure 5 The target statistics plot shown in (a) includes multiple noise points, which are significant in the analysis of... Figure 5 After smoothing the target statistical graph shown in (a), we can obtain... Figure 5 The target statistical graph is shown in (b) above. The smoothing method described above can be linear smoothing, nonlinear smoothing, or adaptive smoothing; this application does not impose any restrictions on this.

[0054] In some implementations, after determining at least one peak point in the target statistical map, the electronic device may also remove noise peak points from the at least one peak point, which are peak points generated by interference, to improve the accuracy of determining peak points, thereby further improving the accuracy of lane line extraction.

[0055] For example, an electronic device can calculate the distance between the x-coordinates of adjacent peak points of at least one peak point. If the distance between the x-coordinates of adjacent peak points is less than a first distance, the peak point with the smaller y-coordinate among the adjacent peak points is identified as a noise peak point, and then that noise peak point is deleted from at least one peak point. For example: Figure 6 As shown, assuming the first distance is 15, the electronic device identifies 10 peak points in the target statistical chart, and their locations are as follows: Figure 7 As shown by the circles in the diagram, this application uses peak points 2, 3, and 4 as examples to illustrate the determination of at least one noise peak point. The method for determining noise peak points using other peak points is similar and will not be repeated here. Figure 6 As shown, the x-coordinates of peak points 2, 3, and 4 are 75, 106, and 120, respectively. The distance between the x-coordinates of peak points 2 and 3 is 106-75=31>15, and the distance between the x-coordinates of peak points 3 and 4 is 120-106=14<15. Therefore, peak point 4 can be determined as a noise peak point, and the electronic device can delete peak point 4.

[0056] In some implementations, when extracting at least one lane line from an enhanced image based on the abscissa of at least one lane line center, the electronic device can first calculate the distance between the abscissas of adjacent lane line centers. The width of the lane line extraction window is then determined based on this distance. The center of the extraction window is aligned with the abscissa of the lane line center, and the lane line is extracted from the enhanced image according to the width of the extraction window. For example, the electronic device can determine that the width of the lane line extraction window is greater than the lane line width and less than or equal to the distance between the abscissas of adjacent lane line centers. This solves the problem of overlapping extraction windows for two lane lines due to a large extraction window, which affects lane line extraction.

[0057] For example, this application uses lane lines 3, 4, and 5 as examples to illustrate how to determine the width of the lane line capture window. The method of determining the width of the lane line capture window based on the distance between the centers of other adjacent lane lines is similar and will not be repeated here. Figure 7 As shown in (a), the distance between the center positions of lane line 3 and lane line 4 is calculated as 'a'. The width of the lane lines is generally predetermined; assuming the lane line width is 'b', the width 'c1' of the lane line interception window corresponding to lane line 4 satisfies: c1 > b and c1 < a. Similarly, if the width 'c2' of the lane line interception window corresponding to lane line 4 is determined based on the center positions of lane line 4 and lane line 5, and if c2 ≠ c1, the smaller of c1 and c2 can be used as the width of the lane line interception window corresponding to lane line 4. If c2 = c1, either c1 or c2 can be used as the width of the lane line interception window corresponding to lane line 4. Furthermore, after determining the width of the lane line interception window, the center position of the interception window can be aligned with the horizontal coordinate of the lane line center, and the lane lines in the enhanced image can be extracted according to the width of the lane line interception window. The extracted lane lines in the enhanced image are shown below. Figure 7 As shown in (b), the electronic device can then delete the image information outside the cropping window and process the image information inside the cropping window through a mathematical fitting algorithm to obtain the lane lines.

[0058] In summary, the technical solutions provided by the above embodiments bring at least the following beneficial effects: Through the technical solutions of this application, the electronic device can acquire the original image, process the original image to obtain an enhanced image, and statistically analyze the pixel values ​​of each column of the enhanced image along the horizontal axis to obtain a target statistical map. The horizontal axis of the target statistical map represents the column of the enhanced image, and the vertical axis of the target statistical map represents the sum of all pixel values ​​in each column of the enhanced image. Then, the electronic device can determine at least one peak point of the target statistical map. Next, the electronic device can determine the at least one peak point as the horizontal axis of the center of at least one lane line. Finally, the electronic device can extract at least one lane line from the enhanced image based on the horizontal axis of the center of at least one lane line. In the above process, since the pixel values ​​of lane lines in the enhanced image are higher than those of other locations, and the vertical axis of the target statistical map represents the sum of pixel values ​​in each column of the enhanced image, the vertical axis of the lane line location in the target statistical map is greater than that of other locations. Furthermore, because a horizontal Gaussian filter is used before generating the target statistical map, there will be a statistical peak resembling a Gaussian function at the lane line location in the target statistical map. The horizontal coordinate of the peak point of this statistical peak corresponds to the horizontal coordinate of the lane line center. Therefore, by determining the horizontal coordinate of the peak point of the target statistical map, the horizontal coordinate of the lane line center can be determined, thereby improving the accuracy of lane line extraction. In addition, existing technologies often require supplementary lighting to enhance the brightness of the lane line location during lane line extraction, which incurs hardware costs. Even when the brightness at the lane line location is low, the horizontal coordinate of the peak point of the target statistical map still corresponds to the horizontal coordinate of the lane line center. Therefore, the technical solution of this application does not require supplementary lighting, thus reducing the cost of lane line extraction.

[0059] Furthermore, the electronic device can smooth the target statistical map before determining at least one peak point to remove noise from the target statistical map, thereby improving the accuracy of determining the peak point and thus improving the accuracy of determining the horizontal coordinate of the lane line center, thereby further improving the accuracy of lane line extraction.

[0060] Furthermore, after determining at least one peak point in the target statistical graph, the electronic device can remove at least one noise peak point from the at least one peak point to improve the accuracy of determining the peak point, thereby improving the accuracy of determining the horizontal coordinate of the lane line center and thus improving the accuracy of lane line extraction.

[0061] Furthermore, the electronic device can determine the width of the lane line extraction window based on the distance between the horizontal coordinates of the centers of adjacent lane lines and the width of the lane lines. This solves the problem that if the extraction window is too large, the extraction windows corresponding to the two lane lines will overlap, affecting the extraction of lane lines.

[0062] Figure 8 This is a schematic diagram of a lane line extraction device provided in an embodiment of this application, as shown below. Figure 8 As shown, the lane line extraction device includes:

[0063] Module 810 is used to acquire the original target image;

[0064] The processing module 820 is used to process the original image to obtain an enhanced image;

[0065] The statistics module 830 is used to perform statistics on the pixel values ​​of each column of the enhanced image along the horizontal axis to obtain a target statistics chart. The horizontal axis of the target statistics chart represents the column of the enhanced image, and the vertical axis of the target statistics chart represents the sum of all pixel values ​​in each column of the enhanced image.

[0066] The first determining module 840 is used to determine at least one peak point of the target statistical chart;

[0067] The second determining module 850 is used to determine the abscissa of at least one peak point as the abscissa of at least one lane line center.

[0068] Extraction module 860 is used to extract at least one lane line from the enhanced image based on the abscissa of the center of at least one lane line.

[0069] In some possible implementations, the first determining module 840 is specifically used to: combine the ordinates of the coordinates of the coordinates of the target statistical chart into a target sequence according to the order of the abscissas of the coordinates of the coordinates of the target statistical chart from small to large or from large to small; determine at least one target ordinate in the target sequence, wherein, for each target ordinate in the at least one target ordinate, the target ordinate is greater than the ordinate adjacent to the target ordinate; and determine the coordinate point of the target statistical chart corresponding to the at least one target ordinate as at least one peak point.

[0070] In some possible implementations, the first determining module 840 is specifically used to: determine the function expression corresponding to the target statistical graph; calculate the first and second derivatives of the function expression at each coordinate point in the target statistical graph; and determine at least one coordinate point where the first derivative is zero and the second derivative is negative as at least one peak point.

[0071] In some implementations, the lane line extraction device further includes a deletion module 870 for deleting noise peaks from at least one peak point, the noise peaks being peaks generated by interference among at least one peak point.

[0072] In some implementations, the deletion module 870 is specifically used to: calculate the distance between the abscissas of adjacent peak points of at least one peak point; if the distance between the abscissas of adjacent peak points is less than a first distance, then determine the peak point with the smaller ordinate among the adjacent peak points as the noise peak point; and delete the noise peak point from at least one peak point.

[0073] In some implementations, the extraction module 860 is specifically used to: calculate the distance between the abscissas of adjacent lane lines in at least one lane line center; determine the width of the lane line capture window based on the distance between the abscissas of adjacent lane lines; align the center position of the lane line capture window with the abscissa of the lane line center, and extract the lane lines in the enhanced image according to the width of the lane line capture window.

[0074] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 8 The lane line extraction device shown can execute the above method embodiments, and the aforementioned and other operations and / or functions of each module in the lane line extraction device are respectively to implement the corresponding processes in the above methods, which will not be described in detail here for the sake of brevity.

[0075] The lane line extraction device of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by the integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.

[0076] Figure 9 This is a schematic block diagram of the electronic device provided in the embodiments of this application.

[0077] like Figure 9 As shown, the electronic device may include:

[0078] The system includes a memory 910 and a processor 920. The memory 910 stores computer programs and transfers the program code to the processor 920. In other words, the processor 920 can retrieve and run the computer program from the memory 910 to implement the methods described in the embodiments of this application.

[0079] For example, the processor 920 can be used to execute the above-described method embodiments according to instructions in the computer program.

[0080] In some embodiments of this application, the processor 920 may include, but is not limited to:

[0081] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0082] In some embodiments of this application, the memory 910 includes, but is not limited to:

[0083] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0084] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 910 and executed by the processor 920 to perform the method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0085] like Figure 9 As shown, the electronic device may also include:

[0086] Transceiver 930, which can be connected to processor 920 or memory 910.

[0087] The processor 920 can control the transceiver 930 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 930 may include a transmitter and a receiver. The transceiver 930 may further include antennas, and the number of antennas may be one or more.

[0088] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.

[0089] This application also provides a computer storage medium storing a computer program thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, embodiments of this application also provide a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.

[0090] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0091] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0092] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0093] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0094] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for extracting lane lines, characterized in that, The method includes: Obtain the original image; The original image is processed to obtain an enhanced image; The pixel values ​​of each column of the enhanced image are statistically analyzed along the horizontal axis to obtain a target statistical image. The horizontal axis of the target statistical image represents the column of the enhanced image, and the vertical axis of the target statistical image represents the sum of all pixel values ​​in each column of the enhanced image. Identify at least one peak point in the target statistical graph; The abscissa of the at least one peak point is determined as the abscissa of the center of at least one lane line; At least one lane line in the enhanced image is extracted based on the x-coordinate of the center of the at least one lane line.

2. The method according to claim 1, characterized in that, Determining at least one peak point of the target statistical chart includes: The vertical coordinates of the target statistical chart are combined into a target sequence according to the order of the horizontal coordinates of each coordinate point from small to large or from large to small. Determine at least one target ordinate in the target sequence, wherein, for each of the at least one target ordinates, the target ordinate is greater than the ordinate adjacent to the target ordinate; The coordinate points of the target statistical chart corresponding to the ordinate of the at least one target are determined as the at least one peak point.

3. The method according to claim 1, characterized in that, Determining at least one peak point of the target statistical chart includes: Determine the function expression corresponding to the target statistical graph; Calculate the first and second derivatives of the function expression at each coordinate point in the target statistical graph; At least one coordinate point whose first derivative is zero and whose second derivative is negative is determined as the at least one peak point.

4. The method according to any one of claims 1-3, characterized in that, After determining at least one peak point of the target statistical chart, the method further includes: Remove noise peaks from the at least one peak, wherein the noise peaks are peaks generated by interference among the at least one peaks.

5. The method according to claim 4, characterized in that, The step of removing noise peaks from the at least one peak point includes: Calculate the distance between the x-coordinates of adjacent peak points of the at least one peak point; If the distance between the x-coordinates of the adjacent peak points is less than the first distance, then the peak point with the smaller y-coordinate among the adjacent peak points is determined as the noise peak point; Remove the noise peak from the at least one peak.

6. The method according to any one of claims 1-3, characterized in that, Extracting at least one lane line from the enhanced image based on the abscissa of the center of the at least one lane line includes: Calculate the distance between adjacent abscissas of the center of the at least one lane line; The width of the lane line capture window is determined based on the distance between the horizontal coordinates of the centers of adjacent lane lines; Align the center horizontal coordinate of the lane line cropping window with the center horizontal coordinate of the lane line, and extract the lane lines from the enhanced image according to the width of the lane line cropping window.

7. A lane line extraction device, characterized in that, include: The acquisition module is used to acquire the original image; The processing module is used to process the original image to obtain an enhanced image; The statistics module is used to perform statistics on the pixel values ​​of each column of the enhanced image along the horizontal axis to obtain a target statistics chart. The horizontal axis of the target statistics chart represents the column of the enhanced image, and the vertical axis of the target statistics chart represents the sum of all pixel values ​​in each column of the enhanced image. The first determining module is used to determine at least one peak point of the target statistical chart; The second determining module is used to determine the abscissa of the at least one peak point as the abscissa of the center of at least one lane line; An extraction module is used to extract at least one lane line from the enhanced image based on the abscissa of the center of the at least one lane line.

8. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Lane line detection method and apparatus

    US20200026930A1

  • Lane line detection method and apparatus

    WO2022082571A1