An unstructured road recognition method on HSV space

By combining the HSV model and OTU threshold calculation with the edge search method, the problem of accurate identification of unstructured roads under shadows and interference is solved, achieving efficient road edge detection that is suitable for autonomous driving systems.

CN112861768BActive Publication Date: 2026-06-26BEIJING INFORMATION SCI & TECH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INFORMATION SCI & TECH UNIV
Filing Date
2021-03-02
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing unstructured road detection algorithms struggle to accurately identify objects under shadows and interference, and require significant computation, failing to meet the real-time requirements of autonomous driving systems.

Method used

The HSV model is used to acquire color images through a vehicle-mounted single-lens CCD camera, calculate the S component and use the OTU method to determine the threshold, initially identify the road area, then divide the image into multiple squares, use the edge search method to determine the road outline, and finally accurately identify the road edge on the S component.

Benefits of technology

It achieves accurate identification of unstructured roads, has strong anti-interference capabilities, low computational load, and meets the real-time requirements of autonomous driving systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112861768B_ABST
    Figure CN112861768B_ABST
Patent Text Reader

Abstract

The application discloses a non-structured road recognition method on HSV space and belongs to the technical field of intelligent automobile auxiliary driving. The non-structured road color image is firstly calculated to obtain a black-and-white recognition result image by calculating an S component matrix and calculating a threshold value through an OSTU method, then the black-and-white image is divided into multiple squares, the proportion of black-and-white pixels in each square is calculated and converted into a pixel to obtain a smaller binary image, the method of searching left and right contours of the road is adopted on the small binary image to determine a rough road area, and finally the rough road area is corresponded to the S component to accurately recognize the road edge and the road area according to an edge-to-edge method. The application can preferably recognize the non-structured road, has strong anti-interference capacity, is not sensitive to the road shape, has smaller calculation amount and meets the real-time requirement of an unmanned driving system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an unstructured road recognition method in HSV space, belonging to the field of intelligent vehicle assisted driving technology. Background Technology

[0002] Autonomous driving systems for vehicles are an important application area of ​​computer vision, and road recognition algorithms are one of the key technologies in this field. Road image recognition provides important information for safe driving and automatic vehicle route planning.

[0003] In practice, roads can be divided into two categories: structured roads and unstructured roads. Structured roads generally have clear lane lines and road boundaries, and detection methods are relatively mature. Unstructured roads generally refer to roads with a lower degree of structure. These roads lack lane lines and clear road boundaries, and are further affected by interference from shadows and watermarks, making detection relatively more difficult.

[0004] Currently, algorithms for detecting unstructured roads are mainly categorized into feature-based methods, model-based methods, convolutional neural network (CNN)-based methods, and support vector machine (SVM)-based methods. Feature-based road detection algorithms primarily distinguish roads from non-roads based on differences in features such as color, texture, and gradient. Their advantages include insensitivity to road shape and low prior knowledge requirements, but they are more sensitive to shadows and watermarks, and computationally intensive. Model-based methods first need to find the best-fitting road model. These methods detect relatively complete road regions, but they cannot build effective models for complex road shapes. CNN-based and SVM-based methods require training on a large number of samples.

[0005] Therefore, it is particularly important to develop a method that can effectively and accurately identify unstructured road areas. Summary of the Invention

[0006] The purpose of this invention is to address the difficulty in accurately defining the boundaries of unstructured roads, which are easily affected by shadows and road obstructions. This invention proposes an HSV model-based unstructured road recognition method to solve the problems caused by existing methods that rely on road shadows and obstacles, accurately identify unstructured road areas, and meet the real-time requirements of autonomous driving systems in terms of computational complexity.

[0007] This invention is an unstructured road recognition method using the HSV model, specifically implemented through the following steps:

[0008] Step 1: Acquire unstructured road color images using a vehicle-mounted single-lens CCD camera. Calculate the S-component from the RGB model of the road color image, calculate the threshold using the OTU method, and preliminarily identify road and non-road areas to obtain a black-and-white recognition image.

[0009] Step 1-1: For a road color image of size M×N, calculate the S component using the RGB model. Here, R (Red) represents red, G (Green) represents green, and B (Blue) represents blue; the S component is the S component in the HSV model. H (Hue) represents hue, S (Saturation) represents saturation, and V (Value) represents brightness.

[0010] Let C max(i,j) = max(R(i,j), G(i,j), B(i,j)), and C min(i,j) = min(R(i,j), G(i,j), B(i,j)), then we have

[0011]

[0012] In the formula, i=0,...,M-1,j=0,...,N-1; R(i,j)∈[0,255], G(i,j)∈[0,255], B(i,j)∈[0,255], S(i,j)∈[0,255]. This indicates the integer division operation.

[0013] Step 1-2: For matrix S, calculate the threshold Thre using the OTU method.

[0014] The OSTU algorithm, also known as the maximum inter-class difference method, divides an image into two classes based on its grayscale characteristics. The optimal threshold is the one that maximizes the separation between the inter-class variance and the intra-class variance. Let Thre be the threshold for identifying roads and non-roads; p1 be the proportion of road pixels to the total number of pixels in matrix S, with an average pixel value of μ1; p2 be the proportion of non-road pixels to the total number of pixels in matrix S, with an average pixel value of μ2; the total average pixel value of matrix S is μ, and the inter-class variance is σ; matrix S has a size of M×N, where N1 is the number of pixels with a value less than the threshold Thre, and N2 is the number of pixels with a value less than the threshold Thre. Then:

[0015] μ1=N1 / (M×N)

[0016] μ2=N2 / (M×N)

[0017] N1 + N2 = M × N

[0018] μ1+μ2=1

[0019] μ = μ1 × p1 + μ2 × p2

[0020] σ = p1 × (μ - μ1) 2 +p2×(μ-μ2) 2

[0021] = p1 × p2 × (μ1 - μ2)2

[0022] The threshold that maximizes the inter-class variance σ is obtained by using a traversal method, which is the desired threshold Thre.

[0023] Steps 1-3: In matrix S, it is initially identified into two categories: 0 (representing road pixels) and 255 (representing non-road pixels), resulting in a black and white binary image WB of size M×N, with pixel values ​​ω(i,j).

[0024]

[0025] Where S(i,j) are the values ​​in matrix S.

[0026] Step 2: Divide the obtained preliminary recognition result, the black-and-white binary image WB, into multiple squares; calculate the ratio of black and white pixels within each square, and convert it into a smaller binary image. This step aims to reduce road recognition time and improve recognition efficiency.

[0027] Step 2-1: For the M×N black and white binary image WB obtained in Step 1-3, set an initial value r (generally r = 8), and divide the image into s×t squares, where each square is r×r in size, as shown below. Figure 2 As shown in (a):

[0028]

[0029] In the formula, This indicates the integer division operation.

[0030] Here, (M / r, N / r) are not necessarily integers. We can crop the top and left and right sides of the image to make s and t integers. This processing method is reasonable and computationally inefficient.

[0031] Step 2-2: Calculate the black and white pixel ratio of each square:

[0032] pi(i,j)=N W (i, j) / N z (i, j)

[0033] In the formula, i = 1, ..., s, j = 1, ..., t, N W (i, j) and N z (i, j) represent the number of white pixels in the i-th row and j-th column and the total number of pixels, respectively.

[0034] The value of pi(i,j) is between [0,1]. pi is a matrix of dimension s×t. Multiplying it by 255 and rounding it down can display the result in the form of a graph.

[0035] Steps 2-3: Convert pi into a binary image. Set a conversion threshold to convert the image into a binary image:

[0036]

[0037] Considering that there are very few white dots in the road area, the coefficient k is... coef The value is relatively small, usually set between [0.01 and 0.05]. Generally, 0.01 is a good starting point. Clearly, the size of the binary image wp is s × t.

[0038] Step 3: For the binary image obtained in Step 2, determine the starting point and vanishing point of the road search by the black pixel string with the largest number of consecutive black pixels in each row.

[0039] Step 3-1: Search the binary image wp of size s×t from bottom to top. For the black pixel string with the largest number of consecutive black pixels in each row, record the position of its leftmost and rightmost black pixel columns and the number of the largest black pixel string in the vector yA. Set a threshold rTh for the number of pixels at the road vanishing point. When the number of black pixel strings is not less than rTh, end the search.

[0040]

[0041] In the formula, the first column of vector yA It is the column position size of the leftmost pixel in the largest black pixel string in each row; the second column It is the column position size of the rightmost pixel in the largest black pixel string in each row; the third column `rTh` is the size of the maximum black pixel string in each row. `s` is the total number of rows in the binary image `wp`. Searching the binary image `wp` from bottom to top, when the number of pixels in the maximum black pixel string is less than `rTh`, i.e., ... When the search stops, the row size of the corresponding binary image wp is m.

[0042] Step 3-2, Vector yA, third column When the value is minimum, the maximum value of the corresponding binary image row wp is denoted as the road vanishing point re; from the bottom of the road image (row s) to three-quarters of the road image (row s×3 / 4), the third column of vector yA When the value is at its maximum, the minimum value of the corresponding row wp in the binary image is denoted as the starting point of the road search, rs.

[0043] Step 4: In the binary image wp of size s×t, the search starts from the starting point rs and ends at the vanishing point re, using the left-right search method to search for the left and right contours of the road.

[0044] Step 4-1: The search starting point is rs, and the corresponding left and right edge pixels are... The initial value of half the road width is Set a threshold for the number of pixels at the road vanishing point, rTh, and a threshold for the number of pixels to search left and right, npixelTh. Set npixel = min(npixelTh, rHalfWidth).

[0045] Step 4-2: First, search the left edge of the road, such as... Figure 2 As shown in (b). In the binary image wp, the starting point of the left edge is (rs, Starting from this point, take the pixel Lp(rs-1, ...) from the row above. (1) If the pixel value of pixel Lp is equal to 255, then search to the right in that row until the pixel value of a pixel is 0, then stop searching. The corresponding pixel is the left edge pixel Lp(rs-1, (2) If the pixel value of pixel Lp is equal to 0, it is handled in the following two ways: (a) Search to the right in this row, up to n pixels. If a pixel value of 255 is encountered, continue searching to the right until the pixel value of a pixel is equal to 0, then stop searching. The corresponding pixel is the left edge pixel Lp(rs-1, If no pixel with a value of 255 is found, proceed to (b). (b) Starting from pixel Lp, search to the left until a pixel with a value of 255 is found, or the image edge is reached, then stop searching. The corresponding pixel is the left edge pixel Lp(rs-1, ).

[0046] Step 4-3: Next, search the right edge of the road. Similar to step 4-2. The right edge pixel is denoted as Rp(rs-1, ...). ).

[0047] Step 4-4: Recalculate half the road width as follows

[0048] Set npixel = min(npixelTh, rHalfWidth). Repeat steps 4-2 and 4-3 until 2*rHalfWidlh < rTh, or the number of searched image rows is less than the road vanishing point re obtained in step 3, at which point stop the calculation. Record the stopped search rows as the road vanishing point re value.

[0049] Step 4-5: For the image portion larger than the search starting point rs, similar to steps 4-1 to 4-4, search for the left and right edge pixels.

[0050] Step 5: As shown in Step 2, each pixel in Step 4 corresponds to a square in the S matrix of Step 1, containing r×r pixels. Based on the left and right contour pixels found in Step 4, and combined with Step 2, find the pixel square corresponding to the S matrix in Step 1; within the square, determine the final road edge pixels using an edge-to-edge method.

[0051] Step 5-1, using the left edge pixel Lp(i, For example, Figure 2 As shown in (c). A corresponding square SL in the S matrix contains r × r pixels. (1) If That is, if the left edge pixel Lp is in the first column of the binary image wp, then in the square corresponding to the original road image, the searched left edge point is also in the first column of the S matrix, that is, the corresponding r left edge values ​​are also 0. (2) If Then move to the left and take one pixel, that is, take pixel Ln(i, ), corresponding to a square SA in the S matrix, containing r×r pixels, go to step 5-2. (3) If Then move left and take two pixels, that is, take pixel Ln(i, ) and Lm(i, ), corresponding to two squares in matrix S, each containing r×r pixels, are merged into one square SA, which contains r×2r pixels, and then proceed to step 5-2.

[0052] Step 5-2: In the S matrix, on the square SA, take the rightmost pixel on SS as the search starting point and search to the left. If a pixel is 255 or exceeds the left boundary of square SA, stop the search. This pixel is the left edge point of the row.

[0053] Step 5-3: The search for the right edge point of the original road is similar to that for the left edge point, i.e., similar to steps 5-1 and 5-2. The difference is that in step 5-2(2), the right edge point is moved by one or two pixels.

[0054] Beneficial effects

[0055] This invention is a method for identifying unstructured roads in HSV space. For a color image of an unstructured road, the S-component matrix is ​​first calculated, a threshold is calculated using the OTU method, and road regions are initially identified, resulting in a black-and-white recognition image. Then, the black-and-white image is divided into multiple squares, resulting in a smaller binary image. On this smaller binary image, a method of searching the left and right contours of the road is used to determine the approximate road region. Finally, the S-component is mapped to the edge-to-edge method for precise identification of road edges and road regions. This invention can effectively identify unstructured roads, has strong anti-interference capabilities, is insensitive to road shape, and has a relatively low computational load, meeting the real-time requirements of autonomous driving systems. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating the concept of an unstructured road recognition method in HSV space according to the present invention.

[0057] Figure 2 This is a road search diagram.

[0058] Figure 2 (a) is the S-component grid partitioning diagram.

[0059] Figure 2 (b) is the road edge search map on the grid binary image.

[0060] Figure 2 (c) is the road edge search map on the S component.

[0061] Figure 3 It is a map for identifying suburban roads.

[0062] Figure 3 (a) is the original image that was captured.

[0063] Figure 3 (b) is the S-component diagram.

[0064] Figure 3 (c) is the initial identification of the black and white road image in the S component based on the OTU threshold.

[0065] Figure 3 (d) is the segmented square binary image in the S component.

[0066] Figure 3 (e) is the road edge curve in the grid binary image.

[0067] Figure 3 (f) is the road recognition map in the grid binary image.

[0068] Figure 3 (g) is the road recognition result image.

[0069] Figure 4 Suburban road identification maps, where (a) is the original image collected and (b) is the road identification map.

[0070] Figure 5 Suburban road identification maps, where (a) is the original image collected and (b) is the road identification map.

[0071] Figure 6 Suburban road identification maps, where (a) is the original image collected and (b) is the road identification map.

[0072] Figure 7 Campus road recognition map, where (a) is the original image collected and (b) is the road recognition map.

[0073] Figure 8 Campus road recognition map, where (a) is the original image collected and (b) is the road recognition map.

[0074] Figure 9 The community road recognition map, where (a) is the original image collected and (b) is the road recognition map. Detailed Implementation

[0075] The present invention will be further described and described in detail below with reference to the accompanying drawings and embodiments:

[0076] Example:

[0077] To verify the effectiveness of the road recognition method, road recognition experiments were conducted in different types of unstructured road scenarios. The specific implementation method is as follows:

[0078] I. Taking a single road color image of size 425×606 as an example, the implementation method is explained in detail.

[0079] (a) For road images, preprocessing is performed first, followed by S-component transformation, threshold calculation, and preliminary road identification.

[0080] For the original road image of size 425×606, to facilitate the following steps, a preprocessing step is performed: Taking r=8, according to step 2, a binary image of size 53×75 can be obtained. Therefore, for the original image, the first row is cropped, and three columns are cropped from both the left and right sides, resulting in a color road image of size 424×600 (53×8, 75×8), as shown below. Figure 3 As shown in (a).

[0081] The S-component transform is performed on the cropped 424×600 road color image. The resulting S-component image is as follows: Figure 3 As shown in (b). The threshold Thre = 70 was calculated using the OTU method. Preliminary road identification results are as follows: Figure 3 As shown in (c), black areas with pixel values ​​less than the threshold Thre are road areas; white areas with pixel values ​​greater than or equal to the threshold Thre are non-road areas. Figures (a), (b), and (c) are the same size, all 424×600.

[0082] (ii) Taking r = 8, from step 2, the 424×600 road S-component image is divided into multiple 8×8 small squares; calculate the black and white pixel ratio of each square; take k coef =0.01, converting the image into a 53×75 binary image, such as Figure 3 As shown in (d). Clearly, Figure 3 (d) Size is Figure 3 (c) One-eighth of the size, but here it is for clearer observation.Figure 3 (d) Enlarge it appropriately for display.

[0083] (III) From step 3, we can set rTh = 2 to obtain vector yA, as follows: Figure 3 As shown in (e). The dashed curve "--" in the figure represents the first column of yA, i.e., the left edge curve of the road; the dotted curve ".." represents the second column of yA, i.e., the right edge curve of the road; and the solid curve represents the third column of yA, i.e., the road width curve. The horizontal axis corresponds to the row values ​​of the grid binary image, and the vertical axis corresponds to the column values ​​of the grid binary image. The starting point of the curve is m × m in step 3-1, where m = 27; the row value at the bottom of the road is s × the row value s of the t binary image, where s = 53. Combined with... Figure 3 (e) From step 3-2, we can obtain that the road vanishing point re = 27 and the road search starting point rs = 47.

[0084] (iv) From step 4, set npixelTh = 6, and search on the 53×75 binary image obtained in step 2 to obtain the pixel positions of the left and right edges of the road. Set the values ​​of the pixels at the left and right edges and those in between to 0, and the values ​​of the others to 255. The resulting image is as follows. Figure 3 As shown in (f). The black area represents the road area, and the white area represents the non-road area.

[0085] (v) Based on the left and right edges of the road obtained in step 5 and step 4, Figure 4 (c) Search for the left and right edges of the road. For easy comparison, the pixel values ​​of the left and right edges and the areas between them are set to 255, while the pixel values ​​of other areas are the same as the original image. The resulting image is shown in Figure 3(g). In the figure, the white area represents the road, and the other areas represent the original image information. Clearly, the road recognition method is effective.

[0086] 2. Using multiple color images of roads as examples, we verify the effectiveness of the road recognition method.

[0087] Multiple road image recognition results, such as Figures 4 to 9 . Figures 4 to 6 Map of suburban roads; Figure 7 and Figure 8 It is a campus road map; Figure 9 This is a road map of the residential area. Figure (a) is the original road map, and Figure (b) is the road recognition map. Roads identified in Figure (b) are represented in white. This demonstrates that the road recognition method is effective.

[0088] The above description is merely a preferred embodiment of the present invention, and the present invention should not be limited to the content disclosed in this embodiment and the accompanying drawings. Any equivalent or modified embodiments made without departing from the spirit of the present invention fall within the scope of protection of the present invention.

Claims

1. A method for identifying unstructured roads in HSV space, characterized in that, Includes the following steps: Step 1: Acquire color images of the road, calculate the S-component, calculate the threshold using the OTU method, initially identify the road area, and obtain a black and white recognition image; Step 2: Divide the obtained preliminary recognition result black and white image into multiple squares, calculate the ratio of black and white pixels in the squares, and convert it into a smaller binary image. Step 3: For the obtained smaller binary image, determine the road search starting point and road vanishing point from the black pixel string with the largest number of consecutive black pixels in each row; Step 4: In the obtained smaller binary image, the contour tracking method is used to search for the left and right edges of the road, and finally the vanishing point of the road is determined; Step 5: Combining the results of Step 4, in the black and white recognition image of Step 1, accurately search for the left and right edge lines of the road using the edge-to-edge method to achieve accurate recognition of the road area; Step 1 further includes the following steps: Step 1-1: For a road color image of size M×N, calculate the S component using the RGB model; Let Cmax(i,j) = max(R(i,j), G(i,j), B(i,j)) and Cmin(i,j) = min(R(i,j), G(i,j), B(i,j)), then we have In the formula, i=0,...,M-1,j=0,...,N-1; R(i,j)∈[0,255], G(i,j)∈[0,255], B(i,j)∈[0,255], S(i,j)∈[0,255], Indicates the integer operation; Steps 1-2: For matrix S, calculate the threshold Thre using the OTU method; Let Thre be the threshold for identifying roads and non-roads; p1 be the proportion of road pixels to the total number of pixels in matrix S; and μ1 be the average pixel value. Let p2 be the proportion of non-road pixels to the total number of pixels in matrix S; and μ2 be the average pixel value. The total average pixel value of matrix S is μ, and the inter-class variance is σ. The size of matrix S is M×N, where N1 is the number of pixels with a value less than the threshold Thre, and N2 is the number of pixels with a value less than the threshold Thre. Then: μ1=N1 / (M×N) μ2=N2 / (M×N) N1 + N2 = M × N μ1+μ2=1 μ = μ1 × p1 + μ2 × p2 σ=p1×(μ-μ1) 2 +p2×(μ-μ2) 2 =p1×p2×(μ1-μ2) 2 The threshold that maximizes the inter-class variance σ is obtained by using a traversal method, which is the desired threshold Thre; Steps 1-3: In matrix S, pixels are initially identified into two categories: 0 represents road pixels and 255 represents non-road pixels, resulting in a black-and-white binary image WB of size M×N, with pixel values ​​ω(i,j). Where S(i,j) are the values ​​in matrix S; Step 2 further includes the following steps: Step 2-1: For the M×N black and white binary image WB obtained in Step 1-3, set the initial value r = 8, and divide the image into s×t squares, where each square is r×r in size. The values ​​of s and t are as follows: In the formula, Indicates the integer operation; Here (M / r, N / r) are not necessarily integers. By cropping the top and left and right sides of the image to make s and t integers, this processing method is reasonable and has a small computational load. Step 2-2: Calculate the black and white pixel ratio of each square: pi(i,j)=N W (i,j) / N t (i,j) In the formula, i = 1, ..., s, j = 1, ..., t, N W (i, j) and N z (i, j) represent the number of white pixels in the i-th row and j-th column and the total number of pixels, respectively; The value of pi(i,j) is between [0,1]. pi is a matrix of dimension s×t. Multiplying it by 255 can display the result in the form of a graph. Steps 2-3: Convert pi into a binary image by setting a conversion threshold. coefficient k coef With the value set between [0.01 and 0.05], the size of the binary image wp is obviously s×t.

2. The method according to claim 1, characterized in that, Step 3 further includes the following steps: Step 3-1: Search the binary image wp of size s×t from bottom to top. For the black pixel string with the largest number of consecutive black pixels in each row, record the position of its leftmost and rightmost black pixel columns and the number of the largest black pixel string in the vector yA. Set the threshold rTh for the number of pixels at the road vanishing point. When the number of black pixel strings is not less than rTh, the search ends. In the formula, the first column of vector yA It is the column position size of the leftmost pixel in the largest black pixel string in each row; the second column It is the column position size of the rightmost pixel in the largest black pixel string in each row; the third column `rTh` is the size of the maximum black pixel string in each row; `s` is the total number of rows in the binary image `wp`; searching the binary image `wp` from bottom to top, when the number of the maximum black pixel string is less than `rTh`, i.e. When the search stops, the row size of the corresponding binary image wp is m. Step 3-2, Vector yA, third column When the value is minimum, the maximum value of the corresponding row wp in the binary image is denoted as the road vanishing point re; from the bottom row s of the road image to the s×3 / 4th row of the road image, the third column of vector yA When the value is at its maximum, the minimum value of the corresponding row wp in the binary image is denoted as the starting point of the road search, rs.

3. The method according to claim 1, characterized in that, Step 4 further includes the following steps: Step 4-1: The search starting point is rs, and the corresponding left and right edge pixels are... The initial value of half the road width is Set the threshold for the number of pixels at the road vanishing point, rTh; set the threshold for the number of pixels to search left and right, npixelTh; take npixel = min(npixelTh, rHalfWidth); Step 4-2: First, search for the left edge of the road; in the binary image wp, the starting point of the left edge is... Starting from this point, take the pixel from the next row. That is, decrease the row number by 1, and keep the column number unchanged; (1) If the pixel value of pixel Lp is equal to 255, then search to the right in that row until the pixel value is 0, then stop searching. The corresponding pixel is the left edge pixel of that row. (2) If the pixel value of pixel Lp is equal to 0, the following two cases are handled: (a) Search to the right in this row, not exceeding npixel pixels; if a pixel value of 255 is encountered, continue searching to the right until the pixel value is equal to 0, then stop searching. The corresponding pixel is the left edge pixel of this row. If no pixel with a value of 255 is found, proceed to (b); (b) Starting from pixel Lp, search to the left until a pixel with a value of 255 is found, or the image edge is reached, then stop searching. The corresponding pixel is the left edge pixel of that row. Step 4-3: Next, search the right edge of the road; similar to step 4-2; the right edge pixels are denoted as... Step 4-4: Recalculate half the road width as follows Set npixel = min(npixelTh, rHalfWidth); repeat steps 4-2 and 4-3 until 2*rHalfWidth < rTh, or the number of searched image rows is less than the road vanishing point re obtained in step 3, then stop the calculation; record the stopped search rows as the road vanishing point re value again. Step 4-5: For the image portion larger than the search starting point rs, similar to steps 4-1 to 4-4, search for the left and right edge pixels.

4. The method according to claim 1, characterized in that, Step 5 further includes the following steps: Step 5-1, using the left edge pixels For example; corresponding to a square SL in matrix S, containing r×r pixels; (1) if That is, if the left edge pixel Lp is in the first column of the binary image wp, then in the square corresponding to the original road image, the searched left edge point is also in the first column of the S matrix, that is, the corresponding r left edge values ​​are also 0; (2) if Then move to the left and take one pixel, that is, take the pixel. For a corresponding square SA in the S matrix, containing r×r pixels, proceed to step 5-2; (3) if Then move to the left and take two pixels, that is, take pixel points. and The two corresponding squares in the S matrix, each containing r×r pixels, are merged into one square SA, which contains r×2r pixels. Proceed to step 5-2. Step 5-2: In the square SA in the S matrix, take the rightmost pixel of SA as the search starting point and search to the left. If a pixel is 255 or exceeds the left boundary of the square SA, stop the search. This pixel is the left edge point of the row. Step 5-3: The search for the right edge point of the original road is similar to that of the left edge point, that is, similar to steps 5-1 and 5-2; the difference is that in step 5-2 (2), the right edge point is moved by one or two pixels.