Unstructured road segmentation method based on region growing and gaussian process regression

CN121121093BActive Publication Date: 2026-08-21SHAANXI HEAVY DUTY AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511038698.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-08-21
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

其中,基于深度学习方法虽然在结构化道路识别方面取得较大成功,但由于其对数据集和计算资源的要求较高,并不适用于非结构化的道路分割

Benefits of technology

[0067] This invention proposes an unstructured road segmentation algorithm based on region growing and Gaussian process regression. It uses pixel blocks as the smallest unit of the region growing algorithm, significantly reducing computational load and improving efficiency compared to traditional pixel-based region growing algorithms. Simultaneously, it introduces Gaussian process regression to learn the HSV color features of roads and non-roads, using this as a classifier to judge pixel units. This avoids the threshold setting issue required in traditional region growing algorithms, improving model applicability and further enhancing the segmentation accuracy of unstructured roads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121121093B_ABST
    Figure CN121121093B_ABST
Patent Text Reader

Abstract

The application provides a non-structured road segmentation method based on region growing and Gaussian process regression, adopts Gaussian filtering to pre-process an image; converts an image RGB color feature into an HSV color feature; selects a middle triangular area below the image as a road area, and randomly samples m sample HSV color features in the area as road area samples; samples n sample HSV color features in a non-road area as non-road area samples, and combines and forms a training set; trains a model by using the training set, and optimizes model hyperparameters by using an elastic back propagation algorithm; realizes road area segmentation based on a region growing algorithm of a pixel block; adopts a flood fill method to fill holes in the segmented road area, and visualizes the segmented road area and a boundary on an original image. The application can accurately identify a non-structured road, and simultaneously solves problems of a large randomness, a large calculation amount and a manual setting of a segmentation threshold of a traditional region growing algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention proposes an unstructured road segmentation method based on region growing and Gaussian process regression, which relates to the field of intelligent driving environment perception. Background Technology

[0002] In recent years, with the rapid development of intelligent driving systems, environmental perception technologies such as road segmentation have gradually become research hotspots. Road segmentation aims to accurately extract road areas from complex natural scenes, providing support for subsequent path planning and navigation decisions. Roads are generally divided into structured roads and unstructured roads. Structured roads include highways and urban roads, which contain clear lane lines, and their recognition technology is relatively mature. However, for unstructured roads such as rural roads and mountain roads, due to the lack of obvious road features and the influence of factors such as adverse weather conditions and terrain changes, traditional road segmentation methods often fail to meet practical needs.

[0003] Visual sensors, with their advantages of low cost, rich information, and flexible deployment, play a crucial role in intelligent driving and road segmentation. Currently, vision-based road segmentation technologies are mainly divided into two categories: those based on traditional image processing methods and those based on machine learning. Traditional methods include region growing and thresholding. Traditional region growing algorithms use pixels as the basic growing unit, requiring extensive similarity judgments and region expansion calculations for each pixel when processing high-resolution images. Therefore, as image resolution increases, the computational complexity of the algorithm grows exponentially, leading to slower processing speeds and failing to meet real-time requirements. In the implementation of traditional region growing algorithms, the similarity between pixels is usually determined based on differences in features such as color and texture. However, traditional methods often rely on fixed thresholds to determine whether pixels belong to the same region. This approach struggles to cope with challenges posed by changes in lighting, shadows, or complex backgrounds, failing to provide robust and efficient segmentation results. Traditional thresholding methods are also pixel-based, computationally intensive, and sensitive to noise, resulting in insufficient computational accuracy and real-time performance to meet application requirements. Machine learning methods include classic methods such as support vector machines and Gaussian process regression, as well as deep learning methods. While deep learning-based methods have achieved great success in structured road recognition, they are not suitable for unstructured road segmentation due to their high requirements for datasets and computing resources. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention aims to provide an unstructured road segmentation method based on region growing and Gaussian process regression. During the region growing process, a Gaussian process regression model is used as a classifier to classify pixel blocks in the image, replacing the original manual threshold setting process. This improves the efficiency and accuracy of road segmentation, helping vehicles accurately identify road areas in unknown or challenging terrain. The specific technical solution is as follows:

[0005] Unstructured road segmentation methods based on region growing and Gaussian process regression include:

[0006] S1: Gaussian filtering is used to preprocess the image, smoothing the image, reducing noise, and preserving edge information;

[0007] S2: Convert the RGB color features of the image to HSV color features;

[0008] S3: Select the middle triangular area at the bottom of the image as the road area, and randomly sample m samples of HSV color features in this area as road area samples; sample n samples of HSV color features in the non-road area as non-road area samples, and merge the road area samples and non-road area samples to form a training set.

[0009] S4: The Gaussian process regression model is trained using the training set, and the hyperparameters of the model are optimized using the elastic backpropagation algorithm;

[0010] S5: A pixel-based region growing algorithm is used to segment road regions. Starting from an initial seed unit, the algorithm grows by selecting eight neighboring units for each current unit, calculating the average HSV color feature of each unit, and feeding this value into a trained Gaussian process regression model to calculate a predicted value. If the predicted value is greater than a preset threshold, the unit is determined to belong to a "road region" and merged into the road region, while also being marked as processed. Otherwise, it is determined to be a "non-road region." This process continues until all pixel units have been processed, or all current seed units have no growing neighbors, at which point the entire growth process ends, yielding the final road region. Here, pixel units are the objects processed during the region growing process, while seed units are the first batch of pixel units processed and whose growth begins.

[0011] S6: Use the flood fill method to fill the holes in the segmented road areas and visualize the segmented road areas and boundaries on the original image.

[0012] Preferably, in step S1, the method for preprocessing the image using Gaussian filtering is as follows:

[0013] The input images are preprocessed by size normalization, and the size of the processed images is 320×240.

[0014] Gaussian filtering constructs a two-dimensional Gaussian kernel matrix and convolves it with the image. The convolution operation applies the Gaussian kernel to each pixel of the image, and a weighted average is calculated to obtain the new value for each pixel. The mathematical expression for the Gaussian distribution is:

[0015]

[0016] Where g(u,v) is the coordinate difference between other pixels in the neighborhood and the center pixel, u is the row coordinate difference between other pixels in the neighborhood and the center pixel, v is the column coordinate difference between other pixels in the neighborhood and the center pixel, and σ is the standard deviation, which controls the smoothness of the filter.

[0017] Preferably, in step S3, the road area is selected as a triangular area at the bottom of the image, starting from the bottom edge w / 3, with a width of w / 3 and a height of h / 4. In this area, m samples of HSV color features are randomly selected as road area samples, and the three variables of their HSV color features are extracted as feature vectors, and their category label is set to "1".

[0018] The area at the top of the image with a height of h / 3 is selected as the non-road area. The HSV color features of n samples are randomly selected as non-road area samples, and the three variables of their HSV color features are extracted as feature vectors, and their category labels are set to "0".

[0019] The collected data is saved to a CSV file for subsequent training; the training set can be represented as:

[0020] D = {(X i ,y i |i=1,2,…(m+n)}

[0021] Among them, X i =(H i ,S i V i Let y be the HSV color feature of the i-th sample in the image. i ∈{0,1} is the category label corresponding to the i-th sample.

[0022] Furthermore, in S4, the specific process of training the Gaussian process regression model using the training set is as follows:

[0023] If the training set has M rows of data, where each row contains HSV color features and one label, then the feature matrix X can be represented in the following matrix form:

[0024]

[0025] The label vector y is represented as:

[0026]

[0027] Among them, the HSV color feature of the Mth sample is (H M ,S M V M The class label of the Mth sample is y. M ;

[0028] The feature matrix X is standardized by calculating the mean and standard deviation of each column, and the data is converted to a form with zero mean and unit variance to ensure that the features have the same scale, thus improving the algorithm's performance. The standardization formula is:

[0029]

[0030] Where X′ represents the standardized data, μ is the mean of each feature, and σ is the standard deviation;

[0031] Let the training observations be the label vector y and the test output f. * The prior distribution follows a joint Gaussian distribution, and the posterior distribution is obtained by conditionalizing the prior distribution to conform to the constraints of the training data. If the prior mean is zero, the prediction equation for the Gaussian process regression is:

[0032]

[0033]

[0034] Where X represents the training input sample, i.e., the feature matrix X, X * K(X,X) represents the test input sample; K(X,X) is the kernel matrix between training samples; K(X) * X) is the kernel matrix between test points and training points; I is the identity matrix; The variance of the observed noise; cov(f * ) represents the covariance matrix of the predicted values ​​at the test points.

[0035] Training observations The true value of the objective function. The feature matrix of a single sample; the noise term ε follows a function with a mean of zero and a variance of ε. Gaussian distribution;

[0036] Initialize the Gaussian process model, setting the dimension of the input data to 3. The kernel function K is calculated using the following formula:

[0037] K = k SE (x,x′)+k Noise (x,x′)

[0038]

[0039]

[0040] Where, k SE (x,x′) is the squared exponent kernel, k Noise (x,x′) is the noise kernel. σ(x,x′) is the signal variance, which mainly controls the variance of the kernel; l is the length scale, which determines the correlation between data points; σ(x,x′) is the Kronecker delta function, which is 1 when x = x′, and 0 otherwise; x and x′ are both input feature vectors, which are the two input points for the kernel function calculation, and come from the training set or the test set.

[0041] Furthermore, in S4, the specific process of optimizing the model hyperparameters using the elastic backpropagation algorithm is as follows:

[0042] We define initial hyperparameters for the length scale, signal variance, and noise variance, and construct the log-marginal likelihood function based on the covariance function, i.e., the kernel function K, as follows:

[0043]

[0044] Where θ={l,σ f ,σ n} represents the hyperparameters. For Gaussian process regression with Gaussian noise, it can be optimized by maximizing the logarithmic marginal likelihood function; σ f The standard deviation of the signal is equal to the variance of the signal. The square root of σ; n The standard deviation of noise is equal to the variance of noise. The square root of ; p(y|X,θ) is the conditional probability density function, representing the probability of observing the output training observation y given the input training sample X and hyperparameter θ; logp(y|X,θ) represents the log marginal likelihood function; y T It is the transpose of y, T is the mathematical symbol representing transpose; n is the number of training samples, that is, the number of elements in the observed value y;

[0045] The elastic backpropagation algorithm is used to maximize the log-marginal likelihood function, and the gradient of the log-marginal likelihood function is calculated:

[0046]

[0047] This indicates that at the t-th iteration, for the r-th hyperparameter θ r The partial derivative of the logarithmic marginal likelihood function, i.e., the gradient; t represents the current iteration number; r represents the r-th hyperparameter; θ r Let θ be the r-th component; The mathematical notation for taking the partial derivative of a function;

[0048] Update the step size for each hyperparameter:

[0049]

[0050] Where, η + This indicates that the learning step size is increased when the gradient directions are consistent, η + >1, usually set to 1.2; η - This indicates that the step size is reduced when the gradient direction changes, η - <1, usually set to 0.5; This represents the step size of the r-th parameter in the t-th iteration, i.e., the current iteration step size, with an initial value of 0.1; This represents the step size of the r-th parameter in the (t-1)-th iteration; The gradient of the log-likelihood function of the r-th hyperparameter in the t-th iteration; Let represent the gradient of the log-likelihood function with respect to the r-th hyperparameter in the (t-1)-th iteration;

[0051] The formula for updating hyperparameters is:

[0052]

[0053] in, The sign of the gradient of the log-likelihood function of the r-th parameter in the t-th iteration is +1 for a positive sign, -1 for a negative sign, and 0 for zero.

[0054] Furthermore, in S5, the specific method for implementing road region segmentation based on the pixel block region growing algorithm is as follows:

[0055] Select a pixel block S consisting of a pixels d As the smallest unit:

[0056] S d ={p1,p2,…,p a},d=1,2,…D

[0057] Among them, S d p represents the d-th pixel block, with a total of D pixel blocks. j This represents the j-th pixel.

[0058] For each pixel block S d Extract the mean of its HSV color features:

[0059]

[0060] The eight neighboring units of the initial seed unit are selected for growth, and the HSV color features F(S) of the neighboring units are used to determine the color features. dThe predicted values ​​are then fed into the trained Gaussian process regression model and calculated.

[0061]

[0062] in, This represents the Gaussian process prediction function obtained through training, with a threshold set to W. When, determine S d If it belongs to the "road area", merge it into the road area and mark it as processed; otherwise, determine S. d This area is designated as a "non-road area".

[0063] Preferably, the flooding method specifically includes:

[0064] The background area outside the image is selected as a seed point, and a flood filling algorithm is used to fill it to prevent the outer black area from being misidentified as a hole.

[0065] Invert the filled image; the area that was originally the background turns black, while the unfilled holes inside remain unchanged.

[0066] The inverted fill result is merged with the original segmented road area to fill all internal holes, making the road area more coherent.

[0067] This invention proposes an unstructured road segmentation algorithm based on region growing and Gaussian process regression. It uses pixel blocks as the smallest unit of the region growing algorithm, significantly reducing computational load and improving efficiency compared to traditional pixel-based region growing algorithms. Simultaneously, it introduces Gaussian process regression to learn the HSV color features of roads and non-roads, using this as a classifier to judge pixel units. This avoids the threshold setting issue required in traditional region growing algorithms, improving model applicability and further enhancing the segmentation accuracy of unstructured roads. Attached Figure Description

[0068] Figure 1 This is a flowchart illustrating the technical process of the unstructured road segmentation method based on region growth and Gaussian process regression of this invention.

[0069] Figure 2 This is a comparison diagram of the RGB and HSV color spaces of this invention.

[0070] Figure 3 This is a schematic diagram of the optimal road area and non-road area.

[0071] Figure 4 This is a schematic diagram of the eight-neighborhood of the region growing algorithm.

[0072] Figure 5 These are before-and-after comparison photos of the flood filling method.

[0073] Figure 6 This is a road segmentation result diagram applying the present invention. Detailed Implementation

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

[0075] like Figure 1 As shown, the unstructured road segmentation method based on region growing and Gaussian process regression includes:

[0076] S1: Gaussian filtering is used to preprocess the image, smoothing the image, reducing noise, and preserving edge information;

[0077] S2: Convert the RGB color features of the image to HSV color features; in terms of color feature extraction, this invention selects the HSV model, which is more in line with human visual perception; compared with the traditional RGB color space, the HSV color space is more in line with human visual perception and can more effectively suppress noise; the HSV model represents the luminance component V and the chrominance component H separately, which can effectively avoid the influence of uneven image color caused by uneven lighting; HSV represents the hue, saturation, and value of a color; comparison between RGB color space and HSV color space is as follows. Figure 2 As shown;

[0078] S3: Select the middle triangular area at the bottom of the image as the road area, and randomly sample m samples of HSV color features in this area as road area samples; sample n samples of HSV color features in the non-road area as non-road area samples, and merge the road area samples and non-road area samples to form a training set.

[0079] S4: The Gaussian process regression model is trained using the training set, and the hyperparameters of the model are optimized using the elastic backpropagation algorithm;

[0080] S5: A pixel-based region growing algorithm is used to segment the road region. Starting from the initial seed unit, the algorithm grows the region. For the current unit, its eight neighboring units are selected, and the mean HSV color feature of each unit is calculated. This value is then fed into a trained Gaussian process regression model to calculate the predicted value. If the predicted value is greater than a preset threshold, the unit is determined to belong to the "road region" and merged into the road region. The unit is also marked as processed. Otherwise, it is determined to be a "non-road region". The entire growth process ends when all pixel units have been processed or when all current seed units have no growing neighbors, and the final road region is obtained.

[0081] S6: Use the flood fill method to fill the holes in the segmented road areas and visualize the segmented road areas and boundaries on the original image.

[0082] In step S1, the method for preprocessing the image using Gaussian filtering is as follows:

[0083] The input images are preprocessed by size normalization, and the size of the processed images is 320×240.

[0084] During image acquisition, sensor noise, lighting variations, or external environmental factors can cause random noise. Gaussian filtering, on the other hand, can mitigate the influence of neighboring pixels on pixel values, thus smoothing the image and suppressing noise. Gaussian filtering constructs a two-dimensional Gaussian kernel matrix and convolves it with the image. The convolution operation applies the Gaussian kernel to each pixel of the image, and a weighted average is calculated to obtain the new value for each pixel. The mathematical expression for the Gaussian distribution is:

[0085]

[0086] Where g(u,v) is the coordinate difference between other pixels in the neighborhood and the center pixel, u is the row coordinate difference between other pixels in the neighborhood and the center pixel, v is the column coordinate difference between other pixels in the neighborhood and the center pixel, and σ is the standard deviation, which controls the smoothness of the filter.

[0087] In order for the Gaussian process regression model to effectively learn the feature distribution of road areas and non-road areas and establish the relationship between input features and output values, it is necessary to collect images to construct a training set.

[0088] Road area sample collection: such as Figure 3 As shown, the optimal area for the road is a triangular region at the bottom of the image, starting from the bottom edge w / 3, with a width of w / 3 and a height of h / 3. In this region, m samples of HSV color features are randomly selected as road area samples, and the three variables of their HSV color features are extracted as feature vectors, with their category label set to "1".

[0089] Sample collection in non-road areas: such as Figure 3 As shown, since the top of the image is usually a non-road area such as sky and trees, the area at the top of the image with a height of h / 3 is selected as the non-road area. The HSV color features of n samples are randomly selected as non-road area samples, and the three variables of their HSV color features are extracted as feature vectors, and their category labels are set to "0".

[0090] Data storage: The collected data is saved to a CSV file for subsequent training; the training set can be represented as:

[0091] D = {(X i ,y i |i=1,2,…(m+n)}

[0092] Among them, X i =(H i ,S i V i Let y be the HSV color feature of the i-th sample in the image. i ∈{0,1} is the category label corresponding to the i-th sample.

[0093] In S4, the specific process of training the Gaussian process regression model using the training set is as follows:

[0094] If the training set has M rows of data, where each row contains HSV color features and one label, then the feature matrix X can be represented in the following matrix form:

[0095]

[0096] Each row corresponds to a data sample, and each column represents one of the three features: H, S, and V. The label vector y is represented as:

[0097]

[0098] The HSV color feature of the Mth sample is (H M ,S M V M The class label of the Mth sample is y. M ;

[0099] To improve the stability and convergence speed of the model, the feature matrix X is standardized by calculating the mean and standard deviation of each column and converting the data to a form with zero mean and unit variance. This ensures that the features have the same scale, thus improving the algorithm's performance. The standardization formula is:

[0100]

[0101] Where X′ represents the standardized data, μ is the mean of each feature, and σ is the standard deviation of each feature;

[0102] Let the training observations be the label vector y and the test output f. * The prior distribution follows a joint Gaussian distribution, and the posterior distribution is obtained by conditionalizing the prior distribution to conform to the constraints of the training data. If the prior mean is zero, the prediction equation for the Gaussian process regression is:

[0103]

[0104]

[0105] Where X represents the training input sample, i.e., the feature matrix X, X * K(X,X) represents the test input sample; K(X,X) is the kernel matrix between training samples; K(X) * X) is the kernel matrix between test points and training points; I is the identity matrix; The variance of the observed noise; cov(f * ) represents the covariance matrix of the predicted values ​​at the test points.

[0106] Training observations The true value of the objective function. The feature matrix of a single sample; the noise term ε follows a function with a mean of zero and a variance of ε. Gaussian distribution;

[0107] Initialize the Gaussian process model, setting the dimension of the input data to 3. The kernel function K is calculated using the following formula:

[0108] K = k SE (x,x′)+k Noise (x,x′)

[0109]

[0110]

[0111] Where, k SE (x,x′) is the squared exponent kernel, k Noise (x,x′) is the noise kernel. σ(x,x′) is the signal variance, which mainly controls the variance of the kernel; l is the length scale, which determines the correlation between data points; σ(x,x′) is the Kronecker delta function, which is 1 when x = x′, and 0 otherwise; x and x′ are both input feature vectors, which are the two input points for the kernel function calculation, and come from the training set or the test set.

[0112] In S4, the specific process of optimizing the model hyperparameters using the elastic backpropagation algorithm is as follows:

[0113] We define initial hyperparameters for the length scale, signal variance, and noise variance, and construct the log-marginal likelihood function based on the covariance function, i.e., the kernel function K, as follows:

[0114]

[0115] Where θ={l,σ f ,σ n} represents the hyperparameters. For Gaussian process regression with Gaussian noise, it can be optimized by maximizing the logarithmic marginal likelihood function; σ f The standard deviation of the signal is equal to the variance of the signal. The square root of σ; n The standard deviation of noise is equal to the variance of noise. The square root of ; p(y|X,θ) is the conditional probability density function, representing the probability of observing the output training observation y given the input training sample X and hyperparameter θ; logp(y|X,θ) represents the log marginal likelihood function; y T It is the transpose of y, T is the mathematical symbol representing transpose; n is the number of training samples, that is, the number of elements in the observed value y;

[0116] Resilient backpropagation (RProp) is employed to maximize the log-marginal likelihood function. RProp addresses the sensitivity to step size selection inherent in standard gradient descent by independently adjusting the learning step size for each hyperparameter. The gradient of the log-marginal likelihood function is calculated as follows:

[0117]

[0118] This indicates that at the t-th iteration, for the r-th hyperparameter θ r The partial derivative of the logarithmic marginal likelihood function, i.e., the gradient; t represents the current iteration number; r represents the r-th hyperparameter; θ r Let θ be the r-th component; The mathematical notation for taking the partial derivative of a function;

[0119] Update the step size for each hyperparameter:

[0120]

[0121] Where, η + This indicates that the learning step size is increased when the gradient directions are consistent, η + >1, usually set to 1.2; η - This indicates that the step size is reduced when the gradient direction changes, η- <1, usually set to 0.5; This represents the step size of the r-th parameter in the t-th iteration, i.e., the current iteration step size, with an initial value of 0.1. This represents the step size of the r-th parameter in the (t-1)-th iteration; The gradient of the log-likelihood function of the r-th hyperparameter in the t-th iteration; Let represent the gradient of the log-likelihood function of the r-th hyperparameter in the (t-1)-th iteration;

[0122] The formula for updating hyperparameters is:

[0123]

[0124] in, The sign of the gradient of the log-likelihood function of the r-th parameter in the t-th iteration is +1 for a positive sign, -1 for a negative sign, and 0 for zero.

[0125] In step S5, the specific method for implementing road region segmentation based on the pixel block region growing algorithm is as follows:

[0126] Traditional region growing algorithms use a single pixel *p* as the smallest unit of growth, requiring pixel-by-pixel processing to traverse the entire image, resulting in significant computational overhead. Furthermore, pixel-level operations are susceptible to noise, leading to inaccurate segmentation results. A pixel block *S* consisting of *a* pixels is selected instead. d As the smallest unit:

[0127] S d ={p1,p2,…,p a},d=1,2,…D

[0128] Among them, S d p represents the d-th pixel block, with a total of D pixel blocks. j This represents the j-th pixel; in such a case... Figure 3 A single pixel block is randomly selected within the optimal area of ​​the road shown as the initial seed unit.

[0129] The top third of the image is defined as a non-road region, thus limiting the road growth area to the bottom two-thirds; for each pixel block S d Extract the mean of its HSV color features:

[0130]

[0131] like Figure 4 As shown, the eight neighboring units of the initial seed unit are selected for growth, and the HSV color features F(S) of the neighboring units are used to determine the color features. d The predicted values ​​are then fed into the trained Gaussian process regression model and calculated.

[0132]

[0133] in, This represents the Gaussian process prediction function obtained through training, with a threshold set to W. When, determine S d If it belongs to the "road area", merge it into the road area and mark it as processed; otherwise, determine S. d This area is designated as a "non-road area".

[0134] Repeat the above steps until all pixel units have been processed, or until all seed units have no growing neighborhoods, then end the entire growth process and obtain the final road region.

[0135] Flood fill is used to eliminate holes in the road area. The road area obtained in step S5 is a binary image; a comparison before and after filling is shown below. Figure 5 As shown, the internal gaps in the road area are completely eliminated. Next, the filled road area is overlaid onto the original image to enhance the visualization. Finally, the boundary lines of the road area are smoothed and drawn, completing the segmentation of the road area. The flood filling method specifically involves:

[0136] The background area outside the image is selected as a seed point, and a flood filling algorithm is used to fill it to prevent the outer black area from being misidentified as a hole.

[0137] Invert the filled image; the area that was originally the background turns black, while the unfilled holes inside remain unchanged.

[0138] The inverted fill result is merged with the original segmented road area to fill all internal holes, making the road area more coherent.

[0139] An unstructured road segmentation algorithm based on region growing and Gaussian process regression was developed in C++ on the Ubuntu system. ROS was used as the communication middleware, and QT was used for further development. The final result of the unstructured road segmentation is as follows: Figure 6 As shown, this method can accurately segment road areas and performs well even under varying lighting conditions. During region growing, a Gaussian process regression model is used as a classifier to classify pixel blocks in the image, replacing the original manual threshold setting process. This improves the efficiency and accuracy of road segmentation, helping vehicles accurately identify road areas in unknown or challenging terrain.

[0140] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An unstructured road segmentation method based on region growing and Gaussian process regression, characterized in that, include: S1: Gaussian filtering is used to preprocess the image, smoothing the image, reducing noise, and preserving edge information; S2: Convert the RGB color features of the image to HSV color features; S3: Select the middle triangular area at the bottom of the image as the road area, and randomly sample m samples of HSV color features in this area as road area samples; sample n samples of HSV color features in the non-road area as non-road area samples, and merge the road area samples and non-road area samples to form a training set. S4: The Gaussian process regression model is trained using the training set, and the hyperparameters of the model are optimized using the elastic backpropagation algorithm; S5: The region growing algorithm based on pixel blocks is used to segment the road region. It starts growing from the initial seed unit. For the current unit, its eight neighboring units are selected, the mean HSV color feature of each unit is calculated, and the value is fed into the trained Gaussian process regression model to calculate the predicted value. If the predicted value is greater than the preset threshold, the unit is determined to belong to the "road region" and merged into the road region, and the unit is marked as processed; otherwise, it is determined to be a "non-road region"; until all pixel units are processed, or all current seed units have no growing neighborhood, the entire growth process ends and the final road region is obtained. S6: Use the flood fill method to fill the holes in the segmented road areas and visualize the segmented road areas and boundaries on the original image; In S4, the specific process of training the Gaussian process regression model using the training set is as follows: The data in the training set are set as follows: The feature matrix consists of rows, where each row contains HSV color features and one label. Represented in the following matrix form: Tag vector Represented as: Among them, the The HSV color characteristics of each sample are , No. The category label for each sample is ; For the characteristic matrix Standardization is performed by calculating the mean and standard deviation of each column and converting the data to a form with zero mean and unit variance. This ensures that the features have the same scale, improving algorithm performance. The standardization formula is: in, For standardized data, The mean of each feature, Standard deviation; Set training observations, i.e., label vectors and test output The prior distribution follows a joint Gaussian distribution, and the posterior distribution is obtained by conditionalizing the prior distribution to conform to the constraints of the training data. If the prior mean is zero, the prediction equation for the Gaussian process regression is: in, This represents the training input samples, i.e., the feature matrix. , This represents the test input sample; The kernel matrix between training samples; This is the kernel matrix between test points and training points; It is the identity matrix; The variance of the observed noise; The covariance matrix representing the predicted values ​​at test points; Training observations , The true value of the objective function. The feature matrix for a single sample; noise term Follows a pattern with a mean of zero and a variance of . Gaussian distribution; Initialize the Gaussian process model, setting the dimension of the input data to 3, and the kernel function. The calculation formula is as follows: in, It is a squared exponent kernel. For noise kernel, It is the signal variance, which mainly controls the variance of the kernel; It is a length scale that determines the correlation between data points; It is the Kronecker delta function, when hour, Otherwise, it is 0; , Both are input feature vectors, which are the two input points for the kernel function calculation, and come from the training set or the test set; In step S5, the specific method for implementing road region segmentation based on the pixel block region growing algorithm is as follows: Select A pixel block composed of pixels As the smallest unit: in, Indicates the first A total of [number] pixel blocks, Pixel blocks, Indicates the first 1 pixel; For each pixel block Extract the mean of its HSV color features: The eight neighboring units of the initial seed unit are selected for growth, and the HSV color features of the neighboring units are used. The predicted values ​​are then fed into the trained Gaussian process regression model and calculated. in, This represents the Gaussian process prediction function obtained through training, with a threshold set to... ,when At that time, the judgment If it belongs to the "road area", merge it into the road area and mark it as processed; otherwise, determine... This is designated as a "non-road area".

2. The unstructured road segmentation method based on region growing and Gaussian process regression according to claim 1, characterized in that, In step S1, the method for preprocessing the image using Gaussian filtering is as follows: The input images are preprocessed by size normalization, and the size of the processed images is 320×240. Gaussian filtering constructs a two-dimensional Gaussian kernel matrix and convolves it with the image. The convolution operation applies the Gaussian kernel to each pixel of the image, and a weighted average is calculated to obtain the new value for each pixel. The mathematical expression for the Gaussian distribution is: in, Let be the coordinate difference between other pixels in the neighborhood and the center pixel, u be the row coordinate difference between other pixels in the neighborhood and the center pixel, and v be the column coordinate difference between other pixels in the neighborhood and the center pixel. The standard deviation controls the smoothness of the filter.

3. The unstructured road segmentation method based on region growing and Gaussian process regression according to claim 1, characterized in that, In S3, the road area is selected as the area below the bottom edge of the image. Starting from the point, the width is Gao Wei In a triangular region, m samples of HSV color features are randomly selected as road area samples, and three variables of their HSV color features are extracted as feature vectors, with their category label set to "1". Select the top height of the image The area is a non-road area. The HSV color features of n samples are randomly selected as non-road area samples, and the three variables of their HSV color features are extracted as feature vectors, and their category labels are set to "0". The collected data is saved to a CSV file for subsequent training; the training set can be represented as: in, For the first in the image HSV color characteristics of each sample For the first The category label corresponding to each sample.

4. The unstructured road segmentation method based on region growing and Gaussian process regression according to claim 1, characterized in that, In S4, the specific process of optimizing the model hyperparameters using the elastic backpropagation algorithm is as follows: Initial hyperparameters are set for the length scale, signal variance, and noise variance, and then based on the covariance function, i.e., the kernel function. The log-marginal likelihood function is constructed as follows: in, For hyperparameters, the regression of Gaussian processes with Gaussian noise can be optimized by maximizing the logarithmic marginal likelihood function; The standard deviation of the signal is equal to the variance of the signal. The square root of; The standard deviation of noise is equal to the variance of noise. The square root of; Let be the conditional probability density function, representing the conditional probability density function of training input samples given the input. and hyperparameters In this case, the output training observations were observed. The probability of; Represents the log-marginal likelihood function; yes The transpose of , where T is the mathematical symbol representing transpose; The number of training samples, i.e., the number of observations. The number of elements in the middle; The elastic backpropagation algorithm is used to maximize the log-marginal likelihood function, and the gradient of the log-marginal likelihood function is calculated: Indicates the first During the iteration, for the ... Hyperparameters The partial derivative of the logarithmic marginal likelihood function, i.e., the gradient; Indicates the current iteration number; Indicates the first One hyperparameter; for The One component; The mathematical notation for taking the partial derivative of a function; Update the step size for each hyperparameter: in, This means increasing the learning step size when the gradient directions are consistent. It is usually set to 1.2; This indicates that the step size is reduced when the gradient direction changes. It is usually set to 0.5; In the t-th iteration, the first... The step size of each parameter, i.e. the current iteration step size, is initially set to 0.1; This represents the step size of the r-th parameter in the (t-1)-th iteration; The gradient of the log-likelihood function of the r-th hyperparameter in the t-th iteration; Let represent the gradient of the log-likelihood function with respect to the r-th hyperparameter in the (t-1)-th iteration; The formula for updating hyperparameters is: in, The sign of the gradient of the log-likelihood function of the r-th parameter in the t-th iteration is +1 for a positive sign, -1 for a negative sign, and 0 for zero.

5. The unstructured road segmentation method based on region growing and Gaussian process regression according to claim 1, characterized in that, The flood filling method specifically refers to: The background area outside the image is selected as a seed point, and a flood filling algorithm is used to fill it to prevent the outer black area from being misidentified as a hole. Invert the filled image; the area that was originally the background turns black, while the unfilled holes inside remain unchanged. The inverted fill result is merged with the original segmented road area to fill all internal holes, making the road area more coherent.

Citation Information

Patent Citations

  • Road detection based on superpixels and convolution neural network

    CN106446914A

  • Quadruped robot complex scene sensing method and system based on multimode fusion

    CN117830991A