A method and system for automated detection of road settlement
By constructing a road texture grayscale array and using the DBSCAN algorithm for joint clustering to identify road subsidence boundaries, the problem of blind spots in subsidence area detection in existing technologies is solved, and the complete morphology and path trend of the subsidence area are automatically detected.
Patent Information
- Application Number
- CN202511055496.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-07-30
AI Technical Summary
Existing technologies are unable to capture the sudden change positions of tiny settlement boundaries in real time when detecting road settlement, resulting in detection blind spots and the risk of missing boundaries. They are unable to provide complete morphological information of the settlement area, especially in sections where the settlement boundaries are irregular, change dramatically, or cover a wide range, affecting the assessment of the road structure safety status and timely response.
By acquiring the grayscale image of the road surface, constructing the road texture grayscale array, extracting the horizontal and vertical gradient components, and using the DBSCAN algorithm for joint clustering, the candidate points of the road settlement boundary are identified, the angle mutation position is calculated, and the road settlement direction path set is constructed to realize the automatic detection of the settlement area.
It realizes complete path identification and trend analysis of the subsidence area, enhances the detection resolution and the ability to adapt to complex road surface changes, and ensures the automatic extraction and tracking of the boundary morphology and path trend of the subsidence area.
Smart Images

Figure CN120564155B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of road monitoring, and in particular to an automatic detection method and system for road subsidence. Background Art
[0002] The field of road monitoring technology involves real-time or periodic monitoring and evaluation of the operating status of transportation infrastructure such as highways, bridges, and municipal roads, including the perception, collection, recording, and analysis of physical indicators such as pavement structure stability, flatness, cracks, settlement, deformation, and displacement.
[0003] Among them, the automated detection method for road settlement refers to the use of instruments such as horizontal displacement meters, level measurement systems or static levels to detect settlement problems caused by foundation compression, structural fatigue or external loads during road use. The degree of settlement is determined by regularly reading instrument readings or collecting liquid pressure changes.
[0004] Existing technologies rely on physically deployed instruments for periodic data reading, and can only obtain single-point settlement values at the measuring point. In scenarios where road settlement presents continuous or irregular changes, it is unable to provide complete morphological information of the settlement area. Especially in road sections where the settlement boundary is irregular, changes drastically, or covers a wide range, the spatial trend of the settlement contour cannot be portrayed by relying solely on changes in point pressure or height values. At the same time, due to limitations on measurement frequency and the number of point layouts, it is impossible to capture the sudden change position of the tiny settlement boundary in real time, resulting in large deviations in the estimation of the settlement range, and the risk of detection blind spots and missed boundaries, which further affects the complete assessment and timely response to the safety status of the road structure. Summary of the Invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose an automatic detection method and system for road subsidence.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: a method for automatically detecting road subsidence, comprising the following steps:
[0007] S1: Obtain the original grayscale image of the road surface and construct a road texture grayscale array according to the pixel coordinates in the image;
[0008] S2: extracting the horizontal and vertical gradient components from the road texture grayscale array, determining the main gradient direction of the road texture based on the gradient components, calculating the angle difference between pixels in the main gradient direction, selecting the maximum angle difference as the perturbation amplitude of the corresponding pixel, and obtaining a road texture direction perturbation amplitude array;
[0009] S3: using the road texture direction disturbance amplitude array as input data, using the DBSCAN algorithm to jointly cluster the disturbance intensity values and their spatial positions in the image coordinates, and extracting the cluster edge point coordinates as a set of candidate road settlement boundary points;
[0010] S4: performing linear fitting on the set of candidate points of the road settlement boundary, selecting each position and its adjacent positions in the fitted road settlement boundary to form a three-point group, calculating the corresponding angle, identifying the position where the angle suddenly changes, and obtaining a set of sudden change positions of the road settlement boundary;
[0011] S5: Calculate the direction vectors of the continuous path segments between the mutation positions of the road settlement boundary mutation position set, extract the direction trend of the path separated by the mutation positions, and construct a road settlement direction path set.
[0012] As a further solution of the present invention, the road texture grayscale array includes grayscale value distribution, pixel position index, and image size structure; the road texture direction disturbance amplitude array includes the main gradient direction angle, neighborhood angle difference, and disturbance amplitude value; the road settlement boundary candidate point set includes cluster edge point coordinates, cluster edge connectivity, and candidate point quantity distribution; the road settlement boundary mutation position set includes mutation point position, three-point group angle value, and angle change trend; the road settlement direction path set includes path segment direction vector, path segment sequence structure, and path trend direction.
[0013] As a further solution of the present invention, the step of obtaining the road texture grayscale array is specifically as follows:
[0014] S111: After obtaining the RGB image of the road area, call each pixel value of the blue channel and the red channel in the image, calculate the pixel ratio of the two channels according to the same row and column coordinates, and arrange all the ratio results in the row and column order of the original image to obtain road channel ratio data;
[0015] S112: Based on the road channel ratio data, extract the brightness change of the ratio distribution in each image area, detect the local contrast difference between adjacent areas, adjust the image brightness of the area where the ratio is higher than the surrounding average, and generate a road local contrast image;
[0016] S113: Based on the local road contrast image, grayscale conversion processing is performed on each pixel point, and the pixels are recombined in coordinate order to obtain a road texture grayscale array.
[0017] As a further solution of the present invention, the steps for obtaining the road texture direction disturbance amplitude array are specifically as follows:
[0018] S211: based on the road texture gray scale array, using Sobel operator extracts gradient component of each pixel position in horizontal and vertical directions respectively, records horizontal gradient value and vertical gradient value in order of image coordinates, and generates road texture gradient component data;
[0019] S212: based on the road texture gradient component data, calculates the arctangent ratio of the vertical gradient value and the horizontal gradient value of each pixel position, determines the main gradient direction angle of each pixel, and organizes all main gradient directions according to image coordinates to obtain road texture main gradient direction data;
[0020] S213: based on the road texture main gradient direction data, calculate the angle difference between the main gradient direction angle of each pixel position and the adjacent pixel position, extract the maximum angle difference as the disturbance amplitude of the corresponding pixel, and obtain the road texture direction disturbance amplitude array.
[0021] As a further scheme of the present application, the obtaining step of the road settlement boundary candidate point set is specifically:
[0022] S311: call the road texture direction disturbance amplitude array, extract the disturbance amplitude value of each pixel position and the corresponding image coordinates, combine and construct a two-dimensional input data set according to the corresponding relationship, and obtain the disturbance amplitude and spatial position joint data;
[0023] S312: based on the disturbance amplitude and spatial position joint data, the DBSCAN algorithm is used to perform density clustering on the disturbance amplitude similarity and image space adjacency relationship between each point in the data, identify the core points and boundary points in the continuous aggregation area, and obtain the road disturbance clustering area label;
[0024] S313: based on the road disturbance clustering area label, filter all pixel coordinate points on the clustering boundary, and integrate them in order of image coordinates to form a point set, and obtain the road settlement boundary candidate point set.
[0025] As a further scheme of the present application, the obtaining step of the road settlement boundary mutation position set is specifically:
[0026] S411: based on the road settlement boundary candidate point set, sort according to the longitudinal coordinate of each point in the image to obtain the road settlement boundary fitting path;
[0027] S412: based on the road settlement boundary fitting path, select three points in each position and the adjacent positions before and after to form a three-point group, obtain the direction vectors between the adjacent two segments in each three-point group, and calculate the included angle between the two vectors to generate the road settlement boundary angle sequence;
[0028] S413: Based on the road settlement boundary angle sequence, the difference between each angle and the corresponding previous angle is calculated, the position where the angle change amplitude exceeds the angle change reference value is identified, and the corresponding image coordinate point is extracted, to obtain a road settlement boundary mutation position set.
[0029] As a further scheme of the present application, the road settlement direction path set obtaining step is specifically:
[0030] S511: Based on the road settlement boundary mutation position set and the road settlement boundary fitting path, the fitting path is divided into multiple continuous path segments according to the coordinates of the mutation positions in the path, the start and end coordinate positions of each path segment are recorded, and a road settlement boundary path segment segmentation result is obtained;
[0031] S512: Based on the road settlement boundary path segment segmentation result, the coordinate information of all points in each path segment is extracted, the direction vector between consecutive points is calculated, and a road settlement boundary path segment direction vector is generated;
[0032] S513: The trend of the dominant direction in the road settlement boundary path segment direction vector is extracted using the Hough transform algorithm, and the direction of each path segment is merged to obtain a road settlement direction path set.
[0033] A road settlement automatic detection system, which is used to execute the above road settlement automatic detection method, the system comprises:
[0034] A texture construction module that obtains an original grayscale image of a road surface and constructs a road texture grayscale array according to the pixel coordinates in the image;
[0035] A disturbance calculation module that extracts the horizontal and vertical gradient components in the road texture grayscale array, determines the main gradient direction of the road texture according to the gradient components, calculates the angle difference between the pixel points in the main gradient direction field, selects the maximum angle difference as the disturbance amplitude of the corresponding pixel point, and obtains a road texture direction disturbance amplitude array;
[0036] A clustering extraction module that uses the road texture direction disturbance amplitude array as input data, jointly clusters the disturbance intensity values and their spatial positions in the image coordinates using the DBSCAN algorithm, and extracts the clustering edge point coordinates as a road settlement boundary candidate point set;
[0037] A mutation detection module that linearly fits the road settlement boundary candidate point set, selects each position and the adjacent positions before and after in the fitted road settlement boundary to form a three-point group and calculates the corresponding angle, identifies the angle mutation position, and obtains a road settlement boundary mutation position set;
[0038] A path modeling module calculates direction vectors of continuous path segments between the set of road settlement boundary mutation positions, extracts path direction trend directions separated by the mutation positions, and constructs a set of road settlement direction paths.
[0039] Compared with the prior art, the application has the advantages and positive effects that:
[0040] In the application, by acquiring road image gray texture and analyzing horizontal and vertical gradient components, a main gradient direction disturbance amplitude array is constructed, local disturbance changes of texture direction can be accurately perceived, automatic recognition of settlement area boundaries is realized by combining disturbance intensity and joint clustering of image coordinates, and by calculating angle changes between direction vectors of adjacent three-point groups in the road settlement boundary fitting path, combining the extraction mechanism of the main direction trend of the path segment, and calibrating boundary mutation points and tracking the trend changes in the image space, the measurement range limitation caused by relying on fixed instrument points is avoided, complete path recognition and trend analysis of the settlement area can be realized without physical contact, the spatial perception ability of irregular settlement areas is effectively enhanced, the resolution and the ability to adapt to complex road surface changes are improved, and the automatic extraction and tracking of the settlement area boundary morphology and path trend based on image data are ensured. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 It is a workflow schematic diagram of the application;
[0042] Figure 2 It is a flowchart of step S1 of the application;
[0043] Figure 3 It is a flowchart of step S2 of the application;
[0044] Figure 4 It is a flowchart of step S3 of the application;
[0045] Figure 5 It is a flowchart of step S4 of the application;
[0046] Figure 6 It is a flowchart of step S5 of the application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical scheme and advantages of the application clearer, the application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the application and do not limit the application.
[0048] In the description of the present application, it should be understood that the terms "length", "width", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, in the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0049] Please refer to Figure 1 The present application provides a technical solution: a road settlement automatic detection method, comprising the following steps:
[0050] S1: obtaining the original gray image of the road surface, and constructing the road texture gray array according to the pixel coordinates in the image;
[0051] S2: extracting the horizontal and vertical gradient components in the road texture gray array, judging the main gradient direction of the road texture according to the gradient components, calculating the angle difference between the pixel points in the main gradient direction field, selecting the maximum angle difference as the disturbance amplitude of the corresponding pixel point, and obtaining the road texture direction disturbance amplitude array;
[0052] S3: using the DBSCAN algorithm to jointly cluster the disturbance intensity values and their spatial positions in the image coordinates by taking the road texture direction disturbance amplitude array as input data, and extracting the cluster edge point coordinates as the road settlement boundary candidate point set;
[0053] S4: linearly fitting the road settlement boundary candidate point set, selecting three points from each position and the adjacent positions before and after the fitting road settlement boundary to form a three-point group and calculating the corresponding angle, identifying the angle mutation position, and obtaining the road settlement boundary mutation position set;
[0054] S5: calculating the direction vector of the continuous path segment between the mutation positions in the road settlement boundary mutation position set, extracting the path direction trend separated by the mutation positions, and constructing the road settlement direction path set;
[0055] The road texture gray array includes gray value distribution, pixel position index and image size structure, the road texture direction disturbance amplitude array includes main gradient direction angle, neighborhood angle difference value and disturbance amplitude value, the road settlement boundary candidate point set includes cluster edge point coordinates, cluster edge connectivity and candidate point number distribution, the road settlement boundary mutation position set includes mutation point position, three-point group angle value and angle change trend, and the road settlement direction path set includes path segment direction vector, path segment sequence structure and path trend.
[0056] See also Figure 2 , the specific steps for obtaining the road texture grayscale array are:
[0057] S111: After obtaining the RGB image of the road area, call each pixel value of the blue channel and the red channel in the image, calculate the pixel ratio of the two channels according to the same row and column coordinates, and arrange all the ratio results in the row and column order of the original image to obtain road channel ratio data;
[0058] First, extract the pixel values of the blue and red channels respectively. Assuming that the image resolution is 1920 rows and 1080 columns, with a total of more than two million pixels, each pixel has a blue channel value and a red channel value. For each pixel position, the ratio of the blue channel pixel value divided by the red channel pixel value is calculated. If the red channel pixel value is 0, it is manually set to a minimum value to avoid errors. For example, 0 is replaced by 0.01 for calculation. When the blue channel value of a pixel position is 80 and the red channel value is 40, the ratio is 2. When the blue channel value is 60 and the red channel value is 120, the ratio is 0.5. This operation is repeated for each pixel in the entire image to obtain a ratio image of the same size as the image. Then these ratio data are arranged in the order of rows and columns of the image, for example, starting from the first row in the upper left corner, and arranged from left to right to the end of the row, and then continuing to the next row and repeating this process until the last pixel, forming a set of ratio data arranged according to the row and column structure of the image.
[0059] S112: Based on the road channel ratio data, extract the brightness change of the ratio distribution in each image area, detect the local contrast difference between adjacent areas, adjust the image brightness of the area where the ratio is higher than the surrounding average, and generate a road local contrast image;
[0060] Based on the obtained road passage ratio data, the entire image is divided into multiple image regions of equal size, for example, the image is grid divided in 8 rows and 8 columns as a region unit, in each region, the average brightness of all pixel ratio values is calculated, and the change trend of the ratio in the region is combined to determine whether there is a significant local difference, for example, the average ratio of the current processing region is 2.1, and the average ratios of the left, right, upper and lower adjacent regions are 1.6, 1.7, 1.5 and 1.4 respectively, so the average of the surrounding regions is about 1.55, the current region is higher than the surrounding average by 0.55, at this time a threshold value is set to determine whether the difference is significant, for example, the threshold value is 0.3, the setting of the threshold value is based on the following: after collecting a large number of road image samples, by counting the ratio difference between different regions, it is found that when the difference is more than 0.3, the human eye can observe obvious brightness change, therefore 0.3 is selected as the empirical threshold value, when the current region difference exceeds the threshold value, it is considered that the region ratio is prominent and needs to be adjusted in brightness, and then a brightness adjustment factor is set, the value of the factor is 1.2, which comes from image enhancement practice, when the original brightness is increased by 20%, the image contrast is obviously enhanced but will not be saturated, therefore 1.2 is selected as the empirical enhancement coefficient, the original brightness in the region, for example 150, is increased to 180, on the contrary, when the region ratio is lower than the average of the adjacent regions but the difference does not constitute a significant contrast, the original brightness is maintained, when the difference exceeds the negative threshold value, for example -0.3, it is considered that the region ratio is lower than the surrounding regions and is sufficient to form dark features, at this time a weakening factor β of 0.9 is used, which also comes from image brightness reduction practice, when the brightness is reduced by 10%, the image details are still preserved, the brightness change is noticeable but not too dark, therefore this value is used for brightness down operation, for example, the original brightness value is 150, and after adjustment it is 135, all pixel regions are processed in order to form a whole road local contrast image.
[0061] S113: Based on the road local contrast image, a gray scale conversion process is performed on each pixel point, and the coordinates are recombined in order to obtain a road texture gray scale array;
[0062] On the obtained road local contrast image, a gray scale conversion process is performed, and a weighted average method is used to integrate the red, green and blue channel values of each pixel into a single gray scale value, for example, when the red value of a pixel is 90, the green value is 100 and the blue value is 110, the gray scale value can be obtained by adding the weights of 0.3, 0.6 and 0.1 respectively to get 99, the gray scale value replaces the original three channel values, and the whole image performs this operation to obtain a gray scale image, and then the gray scale values are arranged and combined according to the spatial position order of the pixels, for example, from the first pixel of the first row of the image to the right until the end of the row, and then from top to bottom in order of row number, all gray scale values are recombined in row and column order to form a complete road texture gray scale array, which has the same row and column structure as the original image.
[0063] Referring to Figure 3 The obtaining step of the road texture direction perturbation amplitude array is specifically as follows:
[0064] S211: Based on the road texture gray scale array, the gradient components of each pixel position are extracted in the transverse and longitudinal directions respectively by using the Sobel operator, and the horizontal gradient value and the vertical gradient value are recorded in the order of image coordinates to generate road texture gradient component data;
[0065] Based on the obtained road texture gray scale array, for each pixel point, gradient extraction operation is performed in the transverse and longitudinal directions respectively by using the Sobel operator. The Sobel operator is a template tool commonly used for edge detection. The gray scale change information of the neighborhood is obtained by sliding a fixed convolution window in the image. In the transverse operation, a horizontal template is used. For example, the gray scale values of the three pixels around the current pixel are combined in the left-middle-right manner, multiplied by the predefined weight and summed to obtain the horizontal gradient value of the point. In the vertical operation, a vertical template is used. The three pixel combination manner of up-middle-down is used to perform similar weighted summation operation to obtain the vertical gradient value. For example, when processing a pixel point, assuming that the left-middle-right gray scales of the pixel point are 90, 100 and 110, the horizontal gradient value obtained by using the weighted manner (-1, 0, 1) is 20. If the up-down pixels are 85, 100 and 115, the vertical gradient value obtained by using the same manner is 30. The extraction process is performed on each pixel in the image, and the transverse and longitudinal gradient values of all pixel points are recorded in the order of the coordinates of the original image to form road texture gradient component data, so that each pixel has two corresponding values in the data structure to represent the horizontal and vertical local gray scale change trends.
[0066] S212: Based on the road texture gradient component data, the inverse tangent ratio of the vertical gradient value to the horizontal gradient value of each pixel position is calculated to determine the main gradient direction angle of each pixel, and all the main gradient directions are organized in the order of image coordinates to obtain road texture main gradient direction data;
[0067] Based on the acquired road texture gradient component data, the horizontal and vertical gradient values of each pixel are calculated for their direction angles. The vertical gradient value is ratioed with the horizontal gradient value, and then the inverse tangent function table is searched for conversion to obtain the corresponding angle value as the main gradient direction angle of the pixel. For example, when the vertical gradient of a pixel is 30 and the horizontal gradient is 30, the ratio is 1, and the corresponding angle is approximately 45 degrees. If the vertical gradient is 15 and the horizontal gradient is 30, the ratio is 0.5, and the angle is approximately 26 degrees. When the vertical gradient is 0 and the horizontal gradient is 20, the direction angle is 0 degrees. If the horizontal gradient is 0 and the vertical gradient is a positive value such as 20, the direction angle is 90 degrees. To avoid division by zero errors, the horizontal minimum value can be set to a very small value such as 0.01 for substitution operation. The same calculation operation is performed on each pixel in the entire image range, and the calculated direction angles are recorded in the row and column order of the image to generate a road texture main gradient direction data map of the same size as the original image. Each pixel position in the map stores its main grayscale change direction, which is expressed as an angle.
[0068] S213: Based on the road texture main gradient direction data, calculate the angle difference between the main gradient direction of each pixel position and the adjacent pixel position, extract the maximum angle difference as the disturbance amplitude of the corresponding pixel, and obtain the road texture direction disturbance amplitude array;
[0069] Based on the main gradient direction data of road texture, traverse each pixel in the image and select pixels within a certain range around it, such as taking four adjacent pixels above, below, left and right, and calculate the difference between the main gradient direction angle of this pixel and each adjacent pixel. For example, if the current pixel angle is 60 degrees, and the adjacent pixel angles are 45, 70, 90 and 30 degrees respectively, then the angle difference between it and each neighboring pixel is calculated to be 15, 10, 30, and 30 degrees. The largest value is selected as the perturbation amplitude of the pixel, which is 30 degrees here. This value indicates the degree of change between the pixel and its neighbors in the main gradient direction. This operation is performed one by one on all pixels in the entire image, and the maximum angle difference corresponding to each pixel position is combined in row and column order to form a road texture direction perturbation amplitude array.
[0070] See also Figure 4 ,The specific steps for obtaining the road settlement boundary candidate point set are:
[0071] S311: Calling the road texture direction disturbance amplitude array, extracting the disturbance amplitude value and the corresponding image coordinates of each pixel position, combining the two according to the corresponding relationship to construct a two-dimensional input data set, and obtaining the disturbance amplitude and spatial position joint data;
[0072] Based on the acquired array of directional perturbation amplitudes of the road texture, each pixel in the image is traversed, and the perturbation amplitude value at that location is extracted. For example, if the perturbation amplitude of a certain pixel is 35 degrees, the image coordinate position of the pixel is recorded, such as row 300 and column 500. This perturbation amplitude value and its corresponding coordinate position are combined into a structured data point. The same operation is performed on each pixel in the entire image, forming a joint data set with perturbation amplitude as the attribute and image rows and columns as spatial information. This data form is essentially a two-dimensional input dataset, where each data item contains three basic information: pixel row number, pixel column number, and the perturbation amplitude value of the pixel point. In the image dimension, this dataset retains spatial location information while retaining directional perturbation features in the content dimension. For example, when processing an image with a size of 1920 rows and 1080 columns, a total of 2,073,600 data points need to be recorded, each with a clear coordinate position and perturbation amplitude value. This ensures that subsequent clustering or boundary analysis can be based on this data for joint spatial and feature judgment, obtaining complete joint perturbation amplitude and spatial location data.
[0073] S312: Based on the joint data of disturbance amplitude and spatial position, the DBSCAN algorithm is used to perform density clustering on the disturbance amplitude similarity and image spatial adjacency relationship between each point in the data, identify the core points and boundary points in the continuous cluster area, and obtain the road disturbance cluster area label;
[0074] After constructing the joint data of perturbation amplitude and spatial position, each pixel is represented as a three-dimensional data point ,in 、 are image coordinates, is the perturbation amplitude value. To perform density clustering on these points, two factors must be considered simultaneously: one is the physical adjacency in the image space, and the other is the feature similarity in the perturbation amplitude. These two factors are independent of each other but act simultaneously on the clustering process. Therefore, a dual-threshold decision strategy should be adopted to constrain both spatial adjacency and perturbation similarity.
[0075] First, for the image space adjacency relationship, the spatial distance is defined as:
[0076] ;
[0077] in, Represents pixel points With pixels Euclidean distance in image coordinate space; 、 It's a pixel The horizontal and vertical coordinates in the image, 、 It's a pixel Set the spatial adjacency radius threshold. , that is, when the physical distance between two pixels is less than or equal to 3 pixels, they are considered spatially adjacent.
[0078] Secondly, for the similarity of the disturbance amplitude, the similarity calculation method in the form of Gaussian function is used to normalize the difference in the disturbance amplitude value, and the disturbance similarity is defined as:
[0079] ;
[0080] in, Represents pixel points With pixels similarity in perturbation magnitude; 、 Pixels and The disturbance amplitude value; is the standard scale of the perturbation amplitude, which is used to control the width of the similarity function. It is usually set according to the empirical fluctuation range of the perturbation amplitude in the image, for example It means that when the perturbation difference between two pixels is 8, the similarity is about 0.61. Set the perturbation similarity threshold , that is, when , the disturbances are considered similar.
[0081] Set up a point The disturbance is ,point The disturbance is , the difference is , substituting into the Gaussian similarity function, we get: ;because , meeting the disturbance amplitude similarity requirement.
[0082] Considering its spatial position, if The coordinates are , The coordinates are , then the spatial distance is: ;
[0083] because , although the perturbations are similar, they are not spatially adjacent, so the clustering condition is not met. In the DBSCAN clustering process, each point The neighborhood of is defined as all points that satisfy the following two conditions : , If the neighborhood contains no less than points (for example, setting ), then The points in the neighborhood of the core point are boundary points, and the points that do not satisfy the condition are noise points.
[0084] By the above double-condition clustering mechanism, the density clustering of the whole image disturbance data can effectively identify the pixel set that is densely distributed in the spatial position and similar in the disturbance amplitude. Each clustering group is assigned a unique label to form a "road disturbance clustering region label" map. Each pixel is labeled with its clustering category, and the isolated points that are not clustered are marked as The clustering result is used as the input basis for the next step of candidate boundary point screening processing.
[0085] First, the spatial distance between each pixel in the image and other pixels is calculated by the horizontal and vertical coordinates of the pixel. The purpose of this spatial distance value is to determine whether two pixels are close enough to each other in the image and belong to the physical adjacency relationship. Then, by comparing the difference between the disturbance amplitude values of two pixels, the difference value is converted into a similarity score between zero and one using an exponential function. The disturbance similarity value is used to measure the consistency of two pixels in texture disturbance features. These two results represent the closeness in position and the similarity in features, which are the basis for determining whether two pixels can be classified into the same cluster. In the entire calculation process, each pixel is processed one by one, and the spatial distance is calculated with all the pixels around it. It is determined whether it is within the set pixel range. Then, the disturbance similarity score is calculated for each pixel that meets the spatial adjacency condition. Only the pixels that meet both the spatial closeness and disturbance similarity conditions are kept as the effective neighborhood of the current pixel. Then, the number of points contained in the effective neighborhood of each pixel is counted. If the number reaches the set lower limit, the pixel is determined to be a clustering core point, otherwise it is a boundary point or an isolated point. The entire image pixel repeats this process, and all pixels belonging to the same category are marked with a unified number to achieve automatic identification of the disturbance distribution similar region in space.
[0086] S313: Based on the road disturbance clustering region label, the pixel coordinate points on the entire clustering boundary are screened and integrated in the order of image coordinates to form a point set, and a road settlement boundary candidate point set is obtained;
[0087] Based on the road disturbance clustering region label map, all classified pixel points in the image are traversed, and boundary recognition processing is performed on each clustering region. First, all pixel coordinates corresponding to each clustering label are collected, and then it is judged whether the pixels are at the edge position of the clustering. The judgment method is to check whether there are pixels not belonging to the same clustering label in the four directions above, below, left and right of the pixel. If there are, the pixel is considered to be a boundary pixel of the region. For example, the pixel point is located at the 200th row and the 300th column, belongs to clustering number 3, and if the pixel above is an unclassified point or belongs to clustering number 4, it is determined that the current pixel is a boundary point. The process is repeated in the entire image to filter out all the pixel coordinate points on the boundary, and then the coordinates are combined and sorted according to the row and column order of the image to form an ordered point set. Each element in the set is a pixel position in the image where the disturbance mutation edge exists. The point set is a candidate point set of the road settlement boundary.
[0088] Referring to Figure 5 The acquisition step of the road settlement boundary mutation position set is specifically:
[0089] S411: Based on the road settlement boundary candidate point set, the longitudinal coordinate order of each point in the image is sorted to obtain a road settlement boundary fitting path.
[0090] Based on the road settlement boundary candidate point set, the image coordinates of each boundary point are sorted in ascending order according to the longitudinal coordinate value, i.e. the row number in the image. During the processing, the horizontal coordinates are ignored, and only the longitudinal position is used as the main sorting basis to ensure that all boundary points are arranged from top to bottom in the image. For example, if there are three points at the 300th row, the 305th row and the 295th row, the sorting result should be the 295th row, the 300th row and the 305th row. After sorting, a continuous point sequence is obtained, which is called a road settlement boundary fitting path, and a continuous description of the boundary trend is formed.
[0091] S412: Based on the road settlement boundary fitting path, a three-point group is selected at each position and the adjacent positions before and after the position, the direction vectors between the adjacent two segments in each three-point group are obtained, and the included angle between the two vectors is calculated to generate a road settlement boundary angle sequence.
[0092] Based on the sorted road settlement boundary fitting path, three consecutive points are selected in sequence to form a three-point group, for example, the 10th, 11th and 12th points on the path are selected, and the three points are regarded as constituting two directional vectors, i.e. the first point to the second point is the first segment, and the second point to the third point is the second segment. The bending trend of the boundary is determined by calculating the angle of change of the two directional segments. The directional angle can be calculated by the coordinate difference of two points, for example, the horizontal offset of the first point to the second point is 3 pixels, and the vertical offset is 5 pixels. The horizontal offset of the second point to the third point is -2 pixels, and the vertical offset is 4 pixels. The included angle formed by the two segments can be obtained by calculating the spatial angle difference, for example, the included angle is 45 degrees. The included angle is recorded as an element in the sequence. The three-point window is moved in sequence on the entire path to repeat the operation, and an included angle sequence reflecting the change trend of the boundary is formed.
[0093] S413: Based on the road settlement boundary included angle sequence, the difference between each included angle and the corresponding previous included angle is calculated, the position where the included angle change amplitude exceeds the included angle change reference value is identified, and the corresponding image coordinate point is extracted to obtain a road settlement boundary mutation position set;
[0094] Based on the road settlement boundary included angle sequence, each included angle value is sequentially traversed, and the difference between the current included angle and the previous included angle is calculated, for example, the current included angle is 80 degrees, and the previous included angle is 40 degrees. The difference is 40 degrees. If the set included angle change reference value is 30 degrees, it is considered that the current point position has a mutation feature, and the corresponding image coordinate point is extracted and recorded as a road settlement boundary mutation point. This operation is repeated for the entire included angle sequence. Whenever the included angle change amplitude exceeds the set reference value, it is considered that the boundary line has a significant bend or shape jump at this position. All positions that meet the conditions are sorted in image coordinate order to form a road settlement boundary mutation position set.
[0095] Please refer to Figure 6 The acquisition steps of the road settlement direction path set are as follows:
[0096] S511: Based on the road settlement boundary mutation position set and the road settlement boundary fitting path, the fitting path is divided into multiple continuous path segments according to the coordinates of the mutation positions in the path, the start and end coordinate positions of each path segment are recorded, and the road settlement boundary path segment segmentation result is obtained;
[0097] Based on the identified set of road subsidence boundary mutation positions and the complete boundary fitting path, first locate each mutation position in the fitting path in its coordinate sequence, and then divide the entire path into several continuous path segments according to these mutation points, for example, if there are mutation points at the 50th, 120th and 180th positions in the path, the path will be divided into four continuous path segments from the starting point to the 50th point, the 51st point to the 120th point, the 121st point to the 180th point, and the 181st point to the end point. In the division process, record the image coordinate positions of the starting point and the ending point of each path segment, for example, the starting point is the 30th row and the 100th column, and the ending point is the 70th row and the 110th column. The start and end information of these path segments is indexed according to the coordinate order of the image to form the segmentation result of the road subsidence boundary path segment.
[0098] S512: Based on the road subsidence boundary path segment segmentation result, extract the coordinate information of all points in each path segment, calculate the direction vector between consecutive points, and generate the road subsidence boundary path segment direction vector;
[0099] In each obtained boundary path segment, traverse the coordinates of all points in the segment, calculate the direction vector between any two consecutive points, that is, calculate the horizontal and vertical difference between the two points in the image space, for example, the first point is at the 300th row and the 400th column, and the second point is at the 302nd row and the 405th column. The horizontal offset is 5 and the vertical offset is 2. This direction information represents the local orientation of the current segment at this position. This processing is performed point by point in each path segment, and the direction of all adjacent points in the path segment is extracted to form a set of direction vector data. The direction vector set reflects the spatial trend of each small segment on the path segment.
[0100] S513: Use Hough transform algorithm to extract the trend of the dominant direction in the road subsidence boundary path segment direction vector, and merge the direction of each path segment to obtain a set of road subsidence direction paths;
[0101] After obtaining the direction vector of all consecutive pixel points in the road subsidence boundary path segment, an improved Hough polar coordinate transform is used to extract the dominant direction of the overall trend of each path segment. Unlike the standard method, the direction strength of each direction vector in the path segment is introduced as a weighting factor in this stage, which is applied to the voting stage to make the boundary points with stable direction contribute more to the dominant direction. The specific processing method is as follows:
[0102] For each direction vector, the starting point coordinate is , the direction angle is , and the current voting angle slot is , and the following Hough polar voting formula is used:
[0103] ;
[0104] wherein, is the voting value (unit: pixel) of the direction vector in the parameter space under the angle ; is the image coordinate (unit: pixel) of the start point of the direction vector; is the angle slot in the parameter space, used for discrete enumeration (e.g. one slot per 1°); is the direction consistency weight corresponding to the direction vector, derived from the reciprocal normalized value of the difference between the front and rear directions in the path segment, indicating the strength of the direction stability in the local area, ranging from 0 to 1, and the greater the value, the more stable the direction.
[0105] Direction consistency weight can be calculated from the angle difference between each direction vector and the adjacent two direction vectors, and the smaller the angle difference, the more stable the direction of the point, and the higher the weight, so the stronger the effect in voting. This weighting mechanism effectively avoids the influence of direction deviation caused by local noise or small perturbations in the boundary, enhancing the stability of the dominant direction extraction.
[0106] Let the start point coordinate of a direction vector in the boundary path segment be , , the local direction angle be , and the direction change be minimal within the three points before and after, and the weight be calculated. Now we take the angle slot in the parameter space as an example and substitute it into the formula: , ;
[0107] ;
[0108] times the weight: ;
[0109] The voting intensity of the direction vector on the parameter space grid under the angle is 145.29, and its contribution is weighted with the influence of the stable direction in statistics.
[0110] The above calculation is performed on all direction vectors in the entire path segment, and a voting statistics table is established for each angle slot, and the angle slot with the maximum voting intensity sum is found as the dominant direction of the path segment. All path segments are repeatedly processed as above, and a dominant direction path set arranged in the order of the image space is formed, reflecting the continuous trend and direction evolution of the settling boundary in each segment.
[0111] First, all directional vectors within each road subsidence boundary path are processed one by one. The image coordinates of the starting point of each direction are extracted and combined with a weight value representing directional consistency to measure the directional stability of that point within the local area. Next, multiple angular directions are enumerated, and each directional vector is mapped into a parameter space at different angles. A weighted voting formula is used to calculate the response strength of the corresponding position. The result represents the degree of support for the dominant directional trend of the directional vector at a specific angle. The larger the calculated value, the more likely the directional vector is to be the dominant direction at the current angle. This process is repeated for all points in the path segment, and the total votes for each angle are accumulated in the parameter space. Finally, the direction with the most votes across all angles is counted and considered the dominant direction for that path segment. In this way, the position and directional stability of the boundary points in each path segment are combined to effectively extract the continuous direction trend of the boundary as a whole, which is used to characterize the directional distribution characteristics of the subsidence boundary.
[0112] An automated road settlement detection system is provided, which is used to implement the automated road settlement detection method described above. The system comprises:
[0113] The texture construction module obtains the original grayscale image of the road surface and constructs the road texture grayscale array according to the pixel coordinates in the image;
[0114] The disturbance calculation module extracts the horizontal and vertical gradient components from the road texture grayscale array, determines the main gradient direction of the road texture based on the gradient components, calculates the angle difference between pixels in the main gradient direction, selects the maximum angle difference as the disturbance amplitude of the corresponding pixel, and obtains the road texture direction disturbance amplitude array;
[0115] The cluster extraction module takes the array of disturbance amplitudes in the road texture direction as input data, uses the DBSCAN algorithm to jointly cluster the disturbance intensity values and their spatial positions in the image coordinates, and extracts the coordinates of the cluster edge points as the set of candidate road settlement boundary points;
[0116] The mutation detection module performs linear fitting on the set of candidate points of the road settlement boundary, selects each position in the fitted road settlement boundary and its adjacent positions to form a three-point group, calculates the corresponding angle, identifies the angle mutation position, and obtains the road settlement boundary mutation position set;
[0117] The path modeling module calculates the direction vectors of the continuous path segments between the mutation positions of the road settlement boundary mutation position set, extracts the direction trend of the path separated by the mutation positions, and constructs the road settlement direction path set.
[0118] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for automatic detection of road subsidence, characterized in that: The following steps are involved: S1: Obtain the original grayscale image of the road surface and construct a road texture grayscale array according to the pixel coordinates in the image; S2: extracting the horizontal and vertical gradient components from the road texture grayscale array, determining the main gradient direction of the road texture based on the gradient components, calculating the angle difference between pixels in the main gradient direction, selecting the maximum angle difference as the perturbation amplitude of the corresponding pixel, and obtaining a road texture direction perturbation amplitude array; S3: using the road texture direction disturbance amplitude array as input data, using the DBSCAN algorithm to jointly cluster the disturbance intensity values and their spatial positions in the image coordinates, and extracting the cluster edge point coordinates as a set of candidate road settlement boundary points; S4: performing linear fitting on the set of candidate points of the road settlement boundary, selecting each position and its adjacent positions in the road settlement boundary after fitting to form a three-point group, calculating the corresponding angle, identifying the position where the angle suddenly changes, and obtaining a set of sudden change positions of the road settlement boundary; S5: Calculate the direction vectors of the continuous path segments between the mutation positions of the road settlement boundary mutation position set, extract the direction trend of the path separated by the mutation positions, and construct a road settlement direction path set.
2. The method for automatic detection of road subsidence according to claim 1, characterized in that: The road texture grayscale array includes grayscale value distribution, pixel position index, and image size structure; the road texture direction disturbance amplitude array includes the main gradient direction angle, neighborhood angle difference, and disturbance amplitude value; the road settlement boundary candidate point set includes cluster edge point coordinates, cluster edge connectivity, and candidate point quantity distribution; the road settlement boundary mutation position set includes mutation point position, three-point group angle value, and angle change trend; the road settlement direction path set includes path segment direction vector, path segment sequence structure, and path trend direction.
3. The method for automatic detection of road subsidence according to claim 1, characterized in that: The steps for obtaining the road texture grayscale array are specifically as follows: S111: After obtaining the RGB image of the road area, call each pixel value of the blue channel and the red channel in the image, calculate the pixel ratio of the two channels according to the same row and column coordinates, and arrange all the ratio results in the row and column order of the original image to obtain road channel ratio data; S112: Based on the road channel ratio data, extract the brightness change of the ratio distribution in each image area, detect the local contrast difference between adjacent areas, adjust the image brightness of the area where the ratio is higher than the surrounding average, and generate a road local contrast image; S113: Based on the local road contrast image, grayscale conversion processing is performed on each pixel point, and the pixels are recombined in coordinate order to obtain a road texture grayscale array.
4. The method for automatic detection of road subsidence according to claim 3, characterized in that: The steps for obtaining the road texture direction disturbance amplitude array are specifically as follows: S211: Based on the road texture grayscale array, using the Sobel operator to extract the gradient component of each pixel position in the horizontal and vertical directions respectively, recording its horizontal gradient value and vertical gradient value in the order of image coordinates, and generating road texture gradient component data; S212: Based on the road texture gradient component data, calculating the vertical gradient value of each pixel position and the inverse tangent ratio of the horizontal gradient value, determining the main gradient direction angle of each pixel, and organizing all main gradient directions according to image coordinates to obtain road texture main gradient direction data; S213: Based on the road texture main gradient direction data, calculate the main gradient direction angle difference between each pixel position and the adjacent pixel position, extract the maximum angle difference as the disturbance amplitude of the corresponding pixel, and obtain the road texture direction disturbance amplitude array.
5. The method for automatic detection of road subsidence according to claim 4, characterized in that: The steps for obtaining the road settlement boundary candidate point set are specifically as follows: S311: Calling the road texture direction disturbance amplitude array, extracting the disturbance amplitude value and the corresponding image coordinates of each pixel position, combining the two according to the corresponding relationship to construct a two-dimensional input data set, and obtaining the disturbance amplitude and spatial position joint data; S312: Based on the disturbance amplitude and spatial position joint data, density clustering is performed on the disturbance amplitude similarity and image space adjacency relationship between each point in the data using the DBSCAN algorithm, core points and boundary points in continuous clustered areas are identified, and road disturbance cluster area labels are obtained; S313: Based on the road disturbance cluster region labels, pixel coordinate points on all cluster boundaries are screened, and integrated into a point set in image coordinate order to obtain a road settlement boundary candidate point set.
6. The method for automatic detection of road subsidence according to claim 5, characterized in that: The specific steps for obtaining the road settlement boundary mutation position set are: S411: Based on the set of candidate road subsidence boundary points, sorting them according to the longitudinal coordinate order of each point in the image to obtain a road subsidence boundary fitting path; S412: Based on the road settlement boundary fitting path, each position and its preceding and succeeding adjacent positions in the path are selected to form a three-point group, a direction vector between two adjacent segments in each three-point group is obtained, and the angle between the two segments is calculated to generate a road settlement boundary angle sequence; S413: Based on the road settlement boundary angle sequence, calculate the difference between each angle and the corresponding previous angle, identify the position where the angle change amplitude exceeds the angle change reference value, and extract the corresponding image coordinate point to obtain the road settlement boundary mutation position set.
7. The method for automatic detection of road subsidence according to claim 6, characterized in that: The steps for obtaining the road settlement direction path set are specifically as follows: S511: Based on the set of sudden change positions of the road subsidence boundary and the fitted path of the road subsidence boundary, the fitted path is divided into a plurality of continuous path segments according to the coordinates of the sudden change positions in the path, and the start and end coordinate positions of each path segment are recorded to obtain a road subsidence boundary path segment segmentation result; S512: Based on the segmentation result of the road subsidence boundary path segment, extract the coordinate information of all points in each path segment, calculate the direction vector between consecutive points, and generate the road subsidence boundary path segment direction vector; S513: Using the Hough transform algorithm to extract the dominant direction trend in the direction vector of the road settlement boundary path segment, merging the direction of each path segment, and obtaining a road settlement direction path set.
8. A road settlement automatic detection system, characterized in that: According to the method for automatic detection of road subsidence according to any one of claims 1 to 7, the system comprises: The texture construction module obtains the original grayscale image of the road surface and constructs the road texture grayscale array according to the pixel coordinates in the image; a disturbance calculation module, which extracts the horizontal and vertical gradient components from the road texture grayscale array, determines the main gradient direction of the road texture based on the gradient components, calculates the angle difference between pixels in the main gradient direction, selects the maximum angle difference as the disturbance amplitude of the corresponding pixel, and obtains a road texture direction disturbance amplitude array; A cluster extraction module, which takes the road texture directional disturbance amplitude array as input data, uses the DBSCAN algorithm to jointly cluster the disturbance intensity values and their spatial positions in the image coordinates, and extracts the coordinates of the cluster edge points as a set of candidate road settlement boundary points; A mutation detection module performs linear fitting on the set of candidate points of the road settlement boundary, selects each position and its adjacent positions in the fitted road settlement boundary to form a three-point group, calculates the corresponding angle, identifies the angle mutation position, and obtains a set of road settlement boundary mutation positions; The path modeling module calculates the direction vectors of the continuous path segments between the mutation positions of the road settlement boundary mutation position set, extracts the direction trend of the path separated by the mutation positions, and constructs the road settlement direction path set.
Citation Information
Patent Citations
Pavement settlement identification method, terminal and computer readable storage medium
CN110021008A
Method applied to road settlement detection
CN111336986A