Lane line calibration method and system based on Hough transform and storage medium
Through the lane line calibration method based on Hough transform, the calibration process is automatically completed using radar data, which solves the problem that traditional calibration methods rely on manual input and highly skilled technicians, and achieves high-precision and high-efficiency lane line calibration.
Patent Information
- Application Number
- CN202411997829.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-11
AI Technical Summary
Traditional traffic radar calibration methods rely on manual input calibration information, which has problems with high-skilled technicians relying on calibration information errors and grid-based accuracy and efficiency.
The lane line calibration method based on Hough transformation is used to automatically complete the calibration process through radar data, including setting the radar normal direction, screening the motion track, establishing a grid map, and screening the Hough transformation and lane line equations.
Automatic calibration is realized, the calibration accuracy and efficiency is improved, manual intervention is reduced, and high accuracy can be maintained in complex road environments.
Smart Images

Figure CN119805388A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent vehicle technology, and in particular to a lane line calibration method, system and storage medium based on Hough transform. Background Art
[0002] Traditional traffic radar calibration algorithms usually rely on manual input of calibration information, such as lane width, number of lanes, lane position, etc. This method has certain limitations in practical applications, mainly in the following aspects:
[0003] Reliance on highly skilled technicians: Traditional calibration methods require construction workers to have a high level of technical skills, because the calibration process involves accurate measurement and setting of lane geometry. This not only increases the workload of construction workers, but also places high demands on the technical capabilities of on-site construction workers. For large-scale radar installation and layout, especially in different road environments, traditional calibration methods have poor adaptability and are prone to calibration errors, affecting the accuracy of the final results.
[0004] Errors caused by manual input of calibration information: Since the actual conditions of lanes (such as lane width, number, location, etc.) may vary between different regions and road sections, manually input calibration information is easily affected by human factors, which may lead to inconsistent or inaccurate calibration parameters. Especially in complex road environments, manual calibration may not fully reflect the actual road conditions, thus affecting the radar calibration results.
[0005] Accuracy and efficiency issues faced during the rasterization process: In the automatic calibration algorithm, the rasterization process is a key link. The size of the grid setting directly affects the accuracy and efficiency of the calibration. If the grid is too large, it will not be able to capture enough detailed information, which will cause accuracy errors; if the grid is too small, it may make data extraction difficult, slow processing speed, and even increase the time and computational burden required for calibration. In order to balance accuracy and efficiency, the grid size setting often needs to be optimized and adjusted according to the specific scenario, but in actual operation, it is often difficult to achieve an accurate match. Summary of the invention
[0006] To solve the above technical problems, the present application proposes a lane line calibration method, system and storage medium based on Hough transform.
[0007] In a first aspect, the present application proposes a lane line calibration method based on Hough transform, and the Hough transform lane line calibration method comprises:
[0008] S1: Set the normal direction of the radar to the positive direction of the X-axis, rotate the positive direction of the X-axis 90° clockwise to the positive direction of the Y-axis, and establish an initial grid map;
[0009] S2: Filter out the moving tracks in the radar and update the initial grid map. When the number of the moving tracks is greater than a set minimum value and the calibration time is greater than a set minimum value, a final grid map is obtained;
[0010] S3: Screening valid grids in the final grid map;
[0011] S4: performing Hough transform on the effective grid to obtain multiple road straight line equations;
[0012] S5: Filter the plurality of road straight line equations according to lane line rules to obtain and output all lane line equations.
[0013] The method of the present invention completely completes the calibration process automatically through radar data, eliminating the cumbersome manual setting steps. The automation level of calibration can be greatly improved by effectively screening radar data and automatically identifying lane lines through Hough transform. In addition, the present invention performs Hough transform on the basis of rasterized maps, and can quickly and effectively extract road straight line information from complex radar data. The advantage of Hough transform is that it can accurately identify lane lines under different conditions (such as different lane widths, curves or irregularities), and can maintain high accuracy in complex backgrounds or environments. This makes lane line calibration not only faster, but also greatly improves accuracy.
[0014] Further, the grid map includes: X direction (0m~Xmax), Y direction (-Ymax~Ymax);
[0015] The grid step in the X direction is Xstep, and the grid step in the Y direction is Ystep;
[0016] The array of the grid is (Xmax / Xstep)*X direction (0m~Xmax).
[0017] Furthermore, the grid includes: the number of tracks N, the sum of lateral distances sumY and a valid flag mark.
[0018] Furthermore, the step S2 includes: for any moving track target (X0, Y0), the corresponding coordinates in the grid map are [X0 / Xstep, (Y0+Ymax) / Ystep], and the grid initial coordinates are integers to obtain the grid [GX0, GY0].
[0019] Further, the step S2 includes: the number of tracks N in the grid [GX0, GY0] is increased by 1, and sumY=sumY+Y0 in the grid [GX0, GY0].
[0020] Further, the step S3 includes: setting a horizontal grid group with the same X-axis subscript as a search unit, selecting a grid whose track number is greater than the minimum track number and greater than the track number in the left and right grids as a valid grid;
[0021] There are Xmax / Xstep search units along the positive direction of the X axis. Search out valid grids one by one and reset the flags.
[0022] The mark bit of the valid grid is set to mark=1; the mark bits of the remaining grids are set to mark=0.
[0023] By dividing the grid map in detail (setting the steps in the X and Y directions respectively), the lane line calibration area is accurately represented. The refined setting of the grid (such as the step in the X direction is Xstep and the step in the Y direction is Ystep) ensures the high-precision division of the data, so that the spatial position of each track can be captured more accurately, improving the calibration accuracy.
[0024] Recording the number of tracks (N) and the sum of the lateral distances (sumY) in each area in the grid helps to effectively count and accumulate relevant data during the calibration process. This recording method enables the system to better understand the track density and characteristics of each area, thereby providing support for subsequent calibration analysis and optimization.
[0025] By mapping the coordinates of each track target into the grid coordinate system, integer processing is used to ensure that each track accurately corresponds to a specific position in the grid. As track data continues to accumulate, the number of tracks in the grid and the sum of lateral distances will be dynamically updated, providing a stable data basis for subsequent lane line recognition.
[0026] By managing the valid marks in the grid, valid data points can be screened during the calibration process to avoid interference from invalid or noisy data. By continuously updating and screening the data in the grid, the calibration results are more reliable and accurate, especially in complex road environments.
[0027] The automation of rasterization and data accumulation greatly reduces the need for manual intervention and improves computational efficiency. The automatic accumulation of tracks and grid updates make the calibration process more efficient, reduce the computational burden, and enable rapid processing of large amounts of data in large-scale systems.
[0028] Further, the step S4 includes:
[0029] For any valid grid, determine the grid subscript as [GX, GY];
[0030] Calculate the corresponding X value as X=GX*Xstep;
[0031] Calculate the corresponding Y value as Y=sumY / N;
[0032] With angle as the independent variable and distance radius as the dependent variable, Hough transform is performed based on the [X1, Y1] parameters, and equal-angle addition is performed to transform the two-dimensional Hough array into a one-dimensional Hough array;
[0033] Performing a valid angle search on the one-dimensional Hough array, finding the angle corresponding to the maximum value in the one-dimensional array, and determining the corresponding lane line angle;
[0034] Selecting data whose angle is the lane line angle in the one-dimensional Hough array to obtain a final Hough array;
[0035] Select the Hough coordinates in the final Hough array whose values are greater than the set minimum value and greater than the values of the Hough coordinates on the left and right sides as valid Hough coordinates;
[0036] Each valid Hough coordinate generates a road straight line equation.
[0037] By determining the subscript [GX, GY] of any valid grid and calculating the corresponding X and Y values, the physical space position (X and Y) corresponding to the grid can be accurately calibrated, and the statistics and processing of the track data in each grid space are provided, so that the calculation results are more consistent with the actual lane line position distribution. Among them, Y = sumY / N, and the Y value is calculated by the average of multiple frames, which effectively solves the large error caused by the large grid setting, and ensures the accuracy while ensuring the effective accumulation of the grid.
[0038] For multi-lane roads, since the slope angles of the straight lines corresponding to multiple lane lines are the same, but the radii of the corresponding Hough arrays are different, the Hough arrays can be added at equal angles according to the angles to convert the two-dimensional Hough array into a one-dimensional Hough array for processing.
[0039] After converting the raster data into a one-dimensional Hough array, the system will perform an effective angle search to find the angle corresponding to the maximum value in the array. This maximum value usually corresponds to the main direction or main direction of the lane line, so the angle of the lane line can be accurately determined. This process optimizes the accuracy of lane line detection, especially in complex road environments. By searching for the maximum angle, the main direction of the lane line can be found quickly and accurately.
[0040] The data corresponding to the lane line angle is selected from the Hough array, and the valid Hough coordinates are further screened out by comparing the set minimum value with the left and right Hough coordinates. This step effectively avoids the interference of noise data and ensures that only the Hough coordinates with the most significant performance at the lane line position are selected.
[0041] Furthermore, the step S5 comprises:
[0042] All road straight line equations are sorted from small to large according to the distance radius of their corresponding valid Hough coordinates: road straight line equation 1 - road straight line equation n, and the road straight line equations that satisfy the absolute value of the difference between the left and right road straight line equations is less than the preset lower value are deleted;
[0043] For road straight line equation 1 and road straight line equation 2, the lane line rules are:
[0044] When: preset low value < road line equation 2 - road line equation 1 < preset high value, road line equation 2 and road line equation 1 are adjacent lanes, and two lane line equations are output;
[0045] When: road line equation 2 - road line equation 1 > preset high value, road line equation 2 and road line equation 1 are non-adjacent lanes, and two lane line equations are output;
[0046] Furthermore, the step S5 further includes:
[0047] For any two road line equations m and road line equation m-1, where m∈[2,n], the lane line rule is:
[0048] When: preset low value < road line equation m - road line equation m-1 < preset high value, road line equation m and road line equation m-1 are adjacent lanes, and a lane line equation is output;
[0049] Road straight line equation m-road straight line equation m-1>4, road straight line equation m-1 and road straight line equation m are non-adjacent lanes, and two lane line equations are output.
[0050] By deleting the road line equations whose absolute difference with the left and right road line equations is less than the preset lower value, some invalid detection results that may be caused by noise or errors can be effectively removed. This screening process ensures the accuracy of lane line detection and avoids lane line overfitting or interference from irrelevant data.
[0051] Through the set "preset low value" and "preset high value" thresholds, it is determined whether different road straight line equations belong to adjacent lanes. This rule helps the system automatically identify the relationship between adjacent lanes. In actual road scenarios, if the angle difference between lane lines is small (that is, the distance difference between the straight line equations meets the set interval), they can be considered to be adjacent lanes and merged into one lane line equation. This is crucial for the autonomous driving system to judge multiple lanes and path planning, especially when the lane changes are not large, it can provide a smoother and more continuous lane model.
[0052] When the difference between the straight line equations exceeds a preset high value, it can be identified as a non-adjacent lane. In this way, the system can identify and process lanes that are far apart in space, avoiding mistakenly confusing different lanes. This not only improves the accuracy of lane detection, but also accurately delineates the boundaries of each lane in complex or multi-lane situations.
[0053] In a second aspect, the present application proposes a system for the lane line calibration method based on Hough transform according to the first aspect, the system comprising:
[0054] A grid map establishment module is used to set the radar normal direction to the positive direction of the X-axis, and the positive direction of the X-axis is rotated 90° clockwise to the positive direction of the Y-axis to establish an initial grid map;
[0055] A grid map updating module, used to filter out the moving tracks in the radar and update the initial grid map, and obtain the final grid map when the number of the moving tracks is greater than a set minimum value and the calibration time is greater than a set minimum value;
[0056] A valid grid screening module, used for screening valid grids in the final grid map;
[0057] A Hough transform module, used for performing Hough transform on the effective grid to obtain multiple road straight line equations;
[0058] The lane line equation output module is used to filter the plurality of road straight line equations according to the lane line rules, and obtain and output all lane line equations.
[0059] In a third aspect, the present application proposes a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a control processor, the lane line calibration method based on Hough transform as described in the first aspect is implemented.
[0060] In summary, the present application proposes a lane line calibration method, system and storage medium based on Hough transform, aiming to improve the accuracy and efficiency of lane line calibration. The method comprises the following steps: setting the normal direction of the radar as the positive direction of the X-axis, and determining the positive direction of the Y-axis by rotating 90° clockwise, and establishing an initial grid map; filtering out the motion tracks in the radar, and updating the initial grid map, and when the number of motion tracks is greater than the set minimum value and the calibration time exceeds the set minimum value, obtaining the final grid map; filtering valid grids in the final grid map; performing Hough transform on the valid grids to obtain multiple road straight line equations; filtering the road straight line equations according to the lane line rules, and finally obtaining and outputting all lane line equations.
[0061] Compared with the prior art, this application has at least the following beneficial effects:
[0062] This method can effectively identify lane lines through Hough transform based on traffic radar, and improve the accuracy and reliability of lane line calibration through screening and rule optimization. This application does not require the input of any lane line parameters, and the radar can automatically complete the calibration function of all lane lines. In addition, this method can obtain lane widths with extremely low error rates through grid processing of track data accumulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Attached Figure 1 The flowchart of the lane marking method based on Hough transform is shown in an embodiment of the present invention.
[0064] Attached Figure 2 A schematic diagram of effective grid screening shown in an embodiment of the present invention.
[0065] Attached Figure 3 A schematic diagram of a valid grid point map shown in an embodiment of the present invention.
[0066] Attached Figure 4 A schematic diagram of a lane marking system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] Embodiment 1:
[0069] As attached Figure 1 As shown, the present application proposes a lane line calibration method based on Hough transform, and the Hough transform lane line calibration method includes:
[0070] S1: Set the normal direction of the radar to the positive direction of the X-axis, rotate the positive direction of the X-axis 90° clockwise to the positive direction of the Y-axis, and establish an initial grid map;
[0071] S2: Filter out the moving tracks in the radar and update the initial grid map. When the number of the moving tracks is greater than a set minimum value and the calibration time is greater than a set minimum value, a final grid map is obtained;
[0072] S3: Screening valid grids in the final grid map;
[0073] S4: performing Hough transform on the effective grid to obtain multiple road straight line equations;
[0074] S5: Filter the plurality of road straight line equations according to lane line rules to obtain and output all lane line equations.
[0075] As a preferred embodiment, the initial grid map is a grid map obtained when the millimeter wave radar is initially started. The millimeter wave radar detects surrounding objects and accurately measures their distance, relative speed and angle, and generates the initial grid map with the provided environmental information, providing basic data support for subsequent lane line calibration.
[0076] As a preferred embodiment, the grid map includes: X direction (0m~Xmax), Y direction (-Ymax~Ymax);
[0077] The grid step in the X direction is Xstep, and the grid step in the Y direction is Ystep;
[0078] The array of the grid is (Xmax / Xstep)*X direction (0m~Xmax).
[0079] As a preferred embodiment, the grid includes: the number of tracks N, the sum of lateral distances sumY and a valid mark.
[0080] As a preferred embodiment, step S2 includes: for any moving track target (X0, Y0), the corresponding grid map internal coordinates are [X0 / Xstep, (Y0+Ymax) / Ystep], and the grid initial coordinates are integers to obtain the grid [GX0, GY0].
[0081] As a preferred embodiment, the step S2 includes: the number of tracks N in the grid [GX0, GY0] is increased by 1, and sumY=sumY+Y0 in the grid [GX0, GY0].
[0082] A grid map is a data structure that divides the environment space into uniform grids and assigns a value to each grid. Usually, the value of each grid represents the obstacle occupancy or free space information at that location.
[0083] In an embodiment of the present invention, each grid in the grid map may optionally contain track information. The track information refers to the trajectory data of the vehicle. In the initial stage of the system, the track information in the grid map may be rough or incomplete. To this end, the millimeter wave radar will continue to detect the surrounding environment and collect sufficient track information to gradually update the initial grid map, and finally obtain a more complete grid map.
[0084] As a preferred embodiment, step S3 includes: setting a horizontal grid group with the same X-axis subscript as a search unit, selecting a grid whose track number is greater than the minimum track number and greater than the track number in the left and right grids as a valid grid;
[0085] There are Xmax / Xstep search units along the positive direction of the X axis. Search out valid grids one by one and reset the flags.
[0086] The mark bit of the valid grid is set to mark=1; the mark bits of the remaining grids are set to mark=0.
[0087] In the embodiment of the present invention, as shown in the attached Figure 2 As shown in the figure, valid grids are selected according to the following criteria: First, grids whose track number is greater than a certain minimum track number and greater than the track number of the two adjacent grids on the left and right of the search unit need to be selected as valid grids. For example, if the track number of a grid is 100, and the track numbers of the left and right adjacent grids are 50 and 80 respectively, and the set minimum track number is 60, then the grid will be considered a valid grid.
[0088] Then, scan each search unit one by one to find the valid grids that meet the conditions, and set the flag for each valid grid. The flag of the valid grid will be set to mark = 1, indicating that the grid contains valid track information; the flag of the remaining grids that do not meet the conditions is set to mark = 0, indicating that these grids do not contain valid track information or the number of tracks is small.
[0089] This method can effectively screen out representative grid areas, helping the system focus on areas with reliable track data for further processing, thereby improving the environmental perception capabilities of the autonomous driving system. Figure 3 It is the valid grid point map obtained through steps S1-S3.
[0090] As a preferred embodiment, step S4 includes:
[0091] For any valid grid, determine the grid subscript as [GX, GY];
[0092] Calculate the corresponding X value as X=GX*Xstep;
[0093] Calculate the corresponding Y value as Y=sumY / N;
[0094] With angle as the independent variable and distance radius as the dependent variable, Hough transform is performed based on the [X1, Y1] parameters, and equal-angle addition is performed to transform the two-dimensional array into a one-dimensional array;
[0095] Performing a valid angle search on the one-dimensional array, finding the angle corresponding to the maximum value in the one-dimensional array, and determining the corresponding lane line angle;
[0096] Selecting data whose angle is the lane line angle in the one-dimensional array to obtain a Hough array;
[0097] Select the Hough coordinates in the Hough array whose values are greater than the set minimum value and greater than the values of the Hough coordinates on the left and right sides as valid Hough coordinates;
[0098] Each valid Hough coordinate generates a road straight line equation.
[0099] As a preferred embodiment, the step S5 includes:
[0100] All road straight line equations are sorted from small to large according to the distance radius of their corresponding valid Hough coordinates: road straight line equation 1 - road straight line equation n, and the road straight line equations that satisfy the absolute value of the difference between the left and right road straight line equations is less than the preset lower value are deleted;
[0101] For road straight line equation 1 and road straight line equation 2, the lane line rules are:
[0102] When: preset low value < road line equation 2 - road line equation 1 < preset high value, road line equation 2 and road line equation 1 are adjacent lanes, and two lane line equations are output;
[0103] When: road line equation 2 - road line equation 1 > preset high value, road line equation 2 and road line equation 1 are non-adjacent lanes, and two lane line equations are output;
[0104] As a preferred embodiment, the step S5 further includes:
[0105] For any two road line equations m and road line equation m-1, where m∈[2,n], the lane line rule is:
[0106] When: preset low value < road line equation m - road line equation m-1 < preset high value, road line equation m and road line equation m-1 are adjacent lanes, and a lane line equation is output;
[0107] Road straight line equation m-road straight line equation m-1>4, road straight line equation m-1 and road straight line equation m are non-adjacent lanes, and two lane line equations are output.
[0108] In the embodiment of the present invention, optionally, for any valid cell to be converted to a Hough array, the conversion rule is as follows:
[0109] The grid subscript of this cell is: [GX1, GY1];
[0110] The corresponding X value is: X1 = GX1*Xstep;
[0111] The corresponding Y value is: Y1 = sumY / N;
[0112] The angle is the independent variable, the distance radius is the dependent variable, and [X1, Y1] is the conversion parameter; the angle α ranges from -θ to θ, and the angle step is set to θ step , that is, α={-θ,-θ+θ step ,-θ+2*θ step, …,θ}, α is an m*1 array, the distance radius is calculated one by one, and then updated to the Hough array. n The corresponding distance ρ n Satisfy the following formula:
[0113] ρ n =Y1*cos(α n )+X1*sin(α n )
[0114] For any [α n , ρ n ] coordinates, for [(α n +θ) / θ step , ρ n / ρ step ] rounded to get [Hα n ,Hρ n ]. Update the Hough array as follows:
[0115] Hough[Hρ n ][Hα n ]=Hough[Hρ n ][Hα n ]+1;
[0116] After completing the Hough array update of all valid grid points, we start to extract the array peak points. For multi-lane roads, since the slope angles of the straight lines corresponding to multiple lane lines are the same, but the radii of the corresponding Hough arrays are different, we can convert the two-dimensional Hough array into a one-dimensional Houghθ array by adding equal angles according to the angles to determine the angle of the road. The processing formula is as follows:
[0117]
[0118] Perform a valid angle search on the one-dimensional Houghθ array, and search for the subscript Indexθ corresponding to the maximum value in the one-dimensional Houghθ array; the lane line angle corresponding to Indexθ is θ R =(Indexθ-θ)*θ step; Select the Houghρ array with the angle subscript Indexθ in the two-dimensional Hough array. The Houghρ array satisfies the following formula:
[0119] Houghρ={Hough[1][Indexθ], Hough[2][Indexθ]…, Hough[ρ max / ρ step ][Indexθ]}
[0120] Perform peak search on the one-dimensional array Houghρ, and select the valid points whose values in the array are greater than the minimum value MinρNum and whose values are greater than the values of the arrays on the left and right at the same time.
[0121] The radius ρ corresponding to any radius subscript Indexρ after screening is ρ=Indexρ*ρ step ; When there are n peak points that meet the search conditions, n valid road Hough coordinates can be obtained as follows:
[0122] Hough R ={[θ R ,ρ1]…[θ R ,ρ n ]}
[0123] Any road Hough coordinate θ R ,ρ n The corresponding straight line equation is:
[0124] y = tan(-θ R )*x+ρ n / cos(θ R )
[0125] n Hough coordinates can be used to calculate n road straight line equations.
[0126] In the embodiment of the present invention, optionally, for the road straight line equation, let x=0, and a one-dimensional array B[n] can be obtained. For any B[m] (satisfying m <n),B[m]=ρ m / cos(θ R ).
[0127] Sort array B from small to large to get BO[m], delete the lanes in array BO that satisfy the absolute value of the left and right difference < 2, because the minimum lane width is set to 2.5m, and the lanes that meet the conditions may be misidentified; after deletion, a new array BO2 is obtained; because adjacent lanes share lane lines, the rules for outputting lane lines according to BO2 are as follows:
[0128] Traverse BO2 from small to large. For the first lane BO2[1], the lane line rules are:
[0129] When 2.0 < BO2[2] - BO2[1] < 4, BO2[1] and BO2[2] are adjacent lanes, and the lane width width = BO2[2] - BBO2[1]; output two lane lines:
[0130]
[0131] When BO2[2] - BBO2[1] > 4, BO2[1] and BO2[2] are non - adjacent lanes, and the lane width is defaulted to width = 3.5m; output two lane lines:
[0132]
[0133] Continue to traverse BO2. For any lane BO2[m] where m > 1, the lane line rules are:
[0134] When 2.0 < BO2[m] - BO2[m - 1] < 4, BO2[m] and BO2[m - 1] are adjacent lanes, and the lane width width = BO2[m] - BBO2[m - 1]; output one lane line:
[0135] y = tan(-θ R ) * x + BO2[m] + width / 2
[0136] When BO2[m] - BBO2[m - 1] > 4, BO2[m - 1] and BO2[m] are non - adjacent lanes, and the lane width is defaulted to width = 3.5m; output two lane lines:
[0137]
[0138] Output all lane line equations according to the above rules.
[0139] Embodiment 2:
[0140] As shown in the attached Figure 4 figure, this application proposes a system for a lane line calibration method based on the Hough transform in Embodiment 1. The system includes:
[0141] A grid map establishment module, used to set the radar normal direction to the positive X - axis direction, and the positive X - axis direction rotated 90° clockwise is the positive Y - axis direction, and establish an initial grid map;
[0142] A grid map update module, used to filter out the moving tracks in the radar and update the initial grid map. When the number of moving tracks is greater than the set minimum value and the calibration time is greater than the set minimum value, obtain the final grid map;
[0143] A valid grid screening module, used for screening valid grids in the final grid map;
[0144] A Hough transform module, used for performing Hough transform on the effective grid to obtain multiple road straight line equations;
[0145] The lane line equation output module is used to filter the plurality of road straight line equations according to the lane line rules, and obtain and output all lane line equations.
[0146] Embodiment three:
[0147] Based on the same inventive concept, the present application proposes a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a control processor, the lane line calibration method based on Hough transform as described in Example 1 is implemented.
[0148] In the computer-readable storage medium, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.
[0149] In summary, the present application proposes a lane line calibration method, system and storage medium based on Hough transform, aiming to improve the accuracy and efficiency of lane line calibration. The method comprises the following steps: setting the normal direction of the radar as the positive direction of the X-axis, and determining the positive direction of the Y-axis by rotating 90° clockwise, and establishing an initial grid map; filtering out the motion tracks in the radar, and updating the initial grid map, and when the number of motion tracks is greater than the set minimum value and the calibration time exceeds the set minimum value, obtaining the final grid map; filtering valid grids in the final grid map; performing Hough transform on the valid grids to obtain multiple road straight line equations; filtering the road straight line equations according to the lane line rules, and finally obtaining and outputting all lane line equations.
[0150] This method can effectively identify lane lines based on traffic radar through Hough transform, and improve the accuracy and reliability of lane line calibration through screening and rule optimization.
[0151] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
[0152] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling an electronic device to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0153] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A lane line calibration method based on Hough transform, characterized in that: The Hough change lane line calibration method comprises: S1: Set the normal direction of the radar to the positive direction of the X-axis, rotate the positive direction of the X-axis 90° clockwise to the positive direction of the Y-axis, and establish an initial grid map; S2: Filter out the motion tracks in the radar and update the initial grid map; when the number of the motion tracks is greater than a set minimum value and the calibration time is greater than a set minimum value, obtain the final grid map; S3: Screening valid grids in the final grid map; S4: performing Hough transform on the effective grid to obtain multiple road straight line equations; S5: screening the plurality of road straight line equations according to lane line rules, obtaining and outputting all lane line equations; Wherein, the step 2 further includes: recording the sumY of each grid; the sumY is the cumulative value of the motion track in any grid in the Y-axis direction.
2. The lane line calibration method based on Hough transform according to claim 1, characterized in that: The step S2 includes: for any moving track target (X0, Y0), the corresponding initial coordinates in the grid map are [X0 / Xstep, (Y0+Ymax) / Ystep], and the initial coordinates are integers to obtain the grid [GX0, GY0].
3. The lane line calibration method based on Hough transform according to claim 2, characterized in that: The updating of the initial grid map includes: when the grid [GX0, GY0] captures the moving track, the number of tracks N in the grid [GX0, GY0] is increased by 1, and sumY=sumY+Y0 in the grid [GX0, GY0].
4. The lane line calibration method based on Hough transform according to claim 3 is characterized in that: The step S3 comprises: setting a horizontal grid group with the same X-axis subscript as a search unit, selecting a grid whose track number is greater than the minimum track number and greater than the track number in the left and right grids as a valid grid; There are Xmax / Xstep search units along the positive direction of the X axis, which search out valid grids one by one and reset the flags; The mark bit of the valid grid is set to mark=1; the mark bits of the remaining grids are set to mark=0.
5. The lane line calibration method based on Hough transform according to claim 4, characterized in that: The step S4 comprises: for any valid grid, determining the grid subscript as [GX, GY]; Calculate the corresponding X value as X=GX*Xstep; Calculate the corresponding Y value as Y=sumY / N; Taking the angle as the independent variable and the distance radius as the dependent variable, a Hough transform is performed based on the [X, Y] parameters of the rectangular coordinate system in the grid map to obtain a two-dimensional Hough array, and the two-dimensional Hough array is transformed into a one-dimensional Hough array after equal-angle addition; a valid angle search is performed on the one-dimensional Hough array to find the angle corresponding to the maximum value in the one-dimensional Hough array, and the corresponding lane line angle is determined; Select data whose angle is the lane line angle in the two-dimensional Hough array to obtain a final Hough array.
6. The lane line calibration method based on Hough transform according to claim 5, characterized in that: The step S4 further comprises: Select the Hough coordinates in the final Hough array whose values are greater than the set minimum value and greater than the values of the Hough coordinates on the left and right sides as valid Hough coordinates; Each valid Hough coordinate generates a road straight line equation.
7. The lane line calibration method based on Hough transform according to claim 7, characterized in that: The step S5 comprises: sorting all the road straight line equations from small to large according to the distance radius of their corresponding valid Hough coordinates: road straight line equation 1-road straight line equation n, and deleting the road straight line equations that simultaneously satisfy the absolute value of the difference between the left and right road straight line equations and the road straight line equations that is less than a preset lower value; For road straight line equation 1 and road straight line equation 2, the lane line rules are: When: preset low value < road line equation 2 - road line equation 1 < preset high value, road line equation 2 and road line equation 1 are adjacent lanes, and two lane line equations are output; When: Road Line Equation 2 - Road Line Equation 1 > preset high value, Road Line Equation 2 and Road Line Equation 1 are non-adjacent lanes, and two lane line equations are output.
8. The lane marking method based on Hough transform according to claim 7, characterized in that: The step S5 further comprises: For any two road line equations m and road line equation m-1, where m∈[2,n], the lane line rule is: When: preset low value < road line equation m - road line equation m-1 < preset high value, road line equation m and road line equation m-1 are adjacent lanes, and a lane line equation is output; Road straight line equation m-road straight line equation m-1>4, road straight line equation m-1 and road straight line equation m are non-adjacent lanes, and two lane line equations are output.
9. A system for lane marking based on the Hough transform according to claim 1-8, the system comprising: A grid map establishment module is used to set the radar normal direction to the positive direction of the X-axis, and the positive direction of the X-axis is rotated 90° clockwise to the positive direction of the Y-axis to establish an initial grid map; A grid map updating module, used to filter out the moving tracks in the radar and update the initial grid map, and obtain the final grid map when the number of the moving tracks is greater than a set minimum value and the calibration time is greater than a set minimum value; A valid grid screening module, used for screening valid grids in the final grid map; A Hough transform module, used for performing Hough transform on the effective grid to obtain multiple road straight line equations; The lane line equation output module is used to filter the plurality of road straight line equations according to the lane line rules, and obtain and output all lane line equations.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by the control processor, the lane line calibration method based on Hough transform as described in any one of claims 1 to 8 is implemented.