A method and device for detecting cracks in highway
Through multiple clustering and feature analysis, combined with texture differences and grayscale characteristics, the problem of unclear differences between road surface dirt and cracks is solved, and the accuracy of highway crack detection is improved.
Patent Information
- Application Number
- CN202411163093.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing pavement crack detection methods are similar to the crack grayscale of the pavement surface, resulting in error introduction during clustering, and the identification results are not accurate enough.
Through multiple clustering, different clustering parameters are used to analyze texture differences to obtain suspected crack attribute values, combine grayscale features and contour chimerization degree, correct the degree of conformity between crack characteristics, and screen out the highway crack areas.
Effectively distinguish between dirty and crack areas of the road surface, improve the accuracy of crack detection, and avoid detection errors under dirt interference.
Smart Images

Figure CN118691609B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image processing, and in particular to a method and device for detecting cracks in a highway. Background Art
[0002] Cracks are a type of highway pavement disease. If not repaired in time, it may cause problems such as loosening and collapse of the pavement, affecting traffic safety and smooth traffic. Therefore, inspections for pavement cracks are very necessary.
[0003] A commonly used pavement crack detection method is to collect highway pavement images and use clustering algorithms, such as K-Means clustering, to segment the pavement images to obtain crack areas. However, since some pavement dirt directly attached to the cracks may have a similar grayscale level as the inside of the cracks, these pavement dirt may be classified into the same cluster as the real cracks during the clustering process, which in turn causes some edge contours of the real crack clusters to expand and widen, thereby introducing errors in the crack identification process, resulting in inaccurate crack detection results using direct clustering methods. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a method and device for detecting cracks in a highway.
[0005] A highway crack detection method and device of the present invention adopts the following technical solutions:
[0006] An embodiment of the present invention provides a method for detecting cracks on a highway, the method comprising the following steps:
[0007] The highway image is clustered several times to obtain several clustering result images, each clustering uses different clustering parameters, and each clustering result image contains several clustering areas;
[0008] For each cluster region in each cluster result image, the suspected crack attribute value of each cluster region in each cluster result image is obtained according to the texture difference between each cluster region and the cluster region in other cluster result images and adjacent to the cluster region; in the cluster result image with the largest average value of the suspected crack attribute value, the suspected crack region is screened out from all cluster regions according to the suspected crack attribute value;
[0009] The crack grayscale characteristic factor of the suspected crack area is obtained according to the grayscale difference, average grayscale value and suspected crack attribute value of the suspected crack area; the crack feature conformity of the suspected crack area is obtained based on the crack grayscale characteristic factor and the degree of fit of the contour lines on both sides of the long axis of the suspected crack area; the crack feature conformity is corrected according to the short axis distribution of the suspected crack area to obtain the corrected crack feature conformity of the suspected crack area; and the crack area of the highway is screened out from all the suspected crack areas according to the corrected crack feature conformity.
[0010] Preferably, the specific steps for obtaining the suspected crack attribute value are as follows:
[0011] For the kth cluster region in any clustering result image, the cluster regions in other clustering result images that are adjacent to the kth cluster region are recorded as the adjacent cluster regions of the kth cluster region;
[0012] In the k-th cluster area, the LBP texture value differences between all pixels and all neighboring pixels of all pixels are calculated, which is recorded as the texture distribution of the k-th cluster area;
[0013] In the neighboring clustering area of the kth clustering area, the LBP texture value differences between all pixels and all neighboring pixels of the pixel are also calculated, which is recorded as the texture distribution in the neighboring clustering area of the kth clustering area;
[0014] Obtaining a suspected crack attribute value of the kth cluster region according to the difference in texture distribution between the kth cluster region and the adjacent cluster regions of the kth cluster region;
[0015] The suspected crack attribute value is negatively correlated with the difference in texture distribution.
[0016] Preferably, the several clusterings use a K-Means clustering algorithm, and the clustering parameter is a K value in the K-Means clustering algorithm.
[0017] Preferably, the method of screening out suspected crack regions from all cluster regions according to the suspected crack attribute values in the cluster result image with the largest average value of the suspected crack attribute values comprises the following specific steps:
[0018] The average values of the suspected crack attribute values of all clustering areas in each clustering result image are calculated respectively, and the clustering result image with the largest average value is recorded as the target image. In the target image, the clustering areas with suspected crack attribute values greater than the first preset threshold are recorded as suspected crack areas.
[0019] Preferably, the step of obtaining the crack grayscale characteristic factor of the suspected crack region according to the grayscale difference of the suspected crack region, the average grayscale value and the suspected crack attribute value of the suspected crack region comprises the following specific steps:
[0020] The average difference between the grayscale values of all pixels in the suspected crack area and the average grayscale values of the neighboring pixels of all pixels is taken as the grayscale difference of the suspected crack area. The crack grayscale characteristic factor is negatively correlated with the average grayscale value and the average grayscale difference of the suspected crack area, respectively, and the crack grayscale characteristic factor is positively correlated with the suspected crack attribute value.
[0021] Preferably, the method of obtaining the degree of conformity of crack characteristics of the suspected crack region based on the crack grayscale characteristic factor and the degree of fit of the contour lines on both sides of the long axis of the suspected crack region comprises the following specific steps:
[0022] The line segment between the two farthest pixel points on the contour line of the suspected crack area is taken as the major axis of the suspected crack area; the degree of fit of the contour lines on both sides of the major axis is obtained according to the distribution difference of the inflection points between the contour lines on both sides of the major axis of the suspected crack area; the degree of crack feature conformity is positively correlated with the crack grayscale feature factor and the degree of fit, respectively.
[0023] Preferably, the method of correcting the crack characteristic conformity according to the minor axis distribution of the suspected crack region to obtain the corrected crack characteristic conformity of the suspected crack region includes the following specific steps:
[0024] Obtaining equal points on the long axis of the suspected crack region, obtaining a straight line passing through each equal point and perpendicular to the long axis, and using a line segment formed by two intersection points of the straight line and the contour line of the suspected crack region as each short axis of the suspected crack region;
[0025] The corrected crack characteristic conformity is obtained according to the ratio of the major axis length of the suspected crack area to the average of all minor axis lengths and the crack characteristic conformity;
[0026] The corrected crack characteristic conformity is positively correlated with the ratio and the crack characteristic conformity, respectively.
[0027] Preferably, the step of obtaining the degree of fit of the contour lines on both sides of the long axis according to the distribution difference of the inflection points between the contour lines on both sides of the long axis of the suspected crack region comprises the following specific steps:
[0028] For the mth inflection point on the contour line on either side of the major axis, along the clockwise direction, the angle between the vector from the previous inflection point of the mth inflection point to the mth inflection point and the vector from the mth inflection point to the next inflection point is defined as the characteristic angle of the mth inflection point;
[0029] On the contour line on either side of the long axis, the difference in characteristic angles of all adjacent inflection points is recorded as the inflection point distribution feature of the contour line on either side of the long axis; the degree of chimerism is obtained based on the difference in inflection point distribution features of the contour lines on both sides of the long axis; the degree of chimerism is negatively correlated with the difference in inflection point distribution features.
[0030] Preferably, the method of selecting the highway crack area from all suspected crack areas according to the corrected crack feature conformity degree includes the following specific steps:
[0031] The suspected crack area with the highest degree of conformity to the corrected crack characteristics is taken as the highway crack area.
[0032] An embodiment of the present invention also provides a highway crack detection device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and also including a camera connected to the processor for capturing highway images. When the processor executes the computer program, the steps of the above-mentioned highway crack detection method are implemented.
[0033] The beneficial effects of the technical solution of the present invention are:
[0034] The present invention analyzes the texture difference of clustering areas under different clustering parameters on the highway image to obtain the suspected crack attribute value of each clustering area. The suspected crack attribute value can describe the difference between the road dirt and crack area in multiple clustering, and then screen out the suspected crack area based on the suspected crack attribute value, so as to achieve the purpose of preliminarily distinguishing the road dirt and crack area. Then, the present invention obtains the crack feature conformity degree according to the chimeric features of the contours on both sides of the long axis of the suspected crack area based on the grayscale difference distribution characteristics of the suspected crack area. The crack feature conformity degree further analyzes the morphological characteristics of the real crack area and further describes the difference between the crack area and the dirty area. Then, the crack feature conformity degree is corrected by using the distribution morphology of the short axis of the suspected crack area to obtain the corrected crack feature conformity degree. The corrected crack feature conformity degree can describe whether the chimeric degree of the two pairs of side edges of the crack is obvious under different crack thicknesses or cracking degrees. Then, the highway crack area obtained based on the corrected crack feature conformity degree is more accurate, avoiding the problem that the detection result of cracks is not accurate enough when the clustering method is directly used under the interference of dirt. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A flowchart of the steps of a highway crack detection method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a highway crack detection method and device proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0038] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0039] The specific scheme of a highway crack detection method and device provided by the present invention is described in detail below with reference to the accompanying drawings.
[0040] Embodiment 1:
[0041] See also Figure 1 , which shows a flowchart of a method for detecting cracks in a highway provided by Embodiment 1 of the present invention, the method comprising the following steps:
[0042] Step S001: clustering the highway image several times to obtain several clustering result images respectively, using different clustering parameters for each clustering, and each clustering result image contains several clustering regions.
[0043] The highway image is collected. In this embodiment, the highway image is a grayscale image. In other embodiments, if the collected highway image is not a grayscale image, it needs to be converted into a grayscale image by grayscale processing.
[0044] This embodiment uses a clustering method to segment crack regions from highway images. Before clustering, it is considered that some road dirt directly attached to cracks may have a similar grayscale level as the inside of the cracks, which may cause these road dirt to be classified into the same cluster as the real cracks during the clustering process, thereby causing some edge contours of the real crack cluster to expand and widen, thereby introducing errors in the crack identification process. This phenomenon is analyzed. Although some road dirt is similar to the overall grayscale level of road cracks, the grayscale characteristics inside the road dirt are more disordered, that is, the grayscale uniformity inside is worse than that of road cracks. Therefore, road dirt attached to the edge of the crack is more likely to be separated in multiple clusterings, and even the road dirt itself will be divided into multiple clusters. That is, in the process of multiple clustering using different clustering parameters, the clustering results of road dirt and crack regions are quite different. Therefore, based on this analysis, the crack region can be accurately segmented through the clustering results under different clustering parameters.
[0045] Before accurately segmenting the crack area, the clustering process of the highway image under different clustering parameters includes:
[0046] The clustering algorithm used in this embodiment is the K-Means clustering algorithm. The clustering parameter in the K-Means clustering algorithm is the K value of the clustering algorithm (indicating the number of clusters included in the clustering result).
[0047] Several K values are set. In this embodiment, the K values are set to 5, 6, 7, ..., 14, which are 10 K values in total. In other embodiments, other numbers or values of K values can be set. This embodiment does not limit the number of K values and their values.
[0048] Based on each K value, the highway image is clustered once using the K-Means clustering algorithm, and the clustering result obtained contains K cluster clusters. In this embodiment, each cluster cluster is a connected domain on the highway image, so in this embodiment, the connected domain corresponding to each cluster cluster is called a clustering region, that is, K clustering regions are obtained, and the clustering result is called a clustering result image, that is, the K-Means clustering algorithm obtains a clustering result image under each K value, and the clustering result image contains K clustering regions; 10 K values correspond to 10 clustering result images. When K=5, the obtained clustering result image contains 5 clustering regions; when K=6, the obtained clustering result image contains 6 clustering regions.
[0049] In other embodiments, the K-Means clustering algorithm can be replaced by a mean shift clustering algorithm. The clustering parameter of the mean shift clustering algorithm is the radius of the circular window of the algorithm. Similarly, multiple clustering parameters are set, and a clustering result image is obtained under each clustering parameter. Each clustering result image contains several clustering areas.
[0050] Step S002: for each cluster region in each cluster result image, obtain the suspected crack attribute value of each cluster region in each cluster result image according to the texture difference between each cluster region and cluster regions in other cluster result images that are adjacent to each cluster region.
[0051] The suspected crack attribute value of each cluster region in each cluster result image is used to describe the texture distribution characteristics of each cluster region in each cluster result image.
[0052] As mentioned above: the grayscale features inside the road dirt are more disordered, and the grayscale uniformity is worse than that of the road cracks. Therefore, the road dirt attached to the edge of the crack is more likely to be separated in multiple clustering. In the process of multiple clustering using different clustering parameters, the clustering results of the road dirt and the crack area are quite different. The above-mentioned suspected crack attribute value can describe the difference between the road dirt and the crack area in multiple clustering. This embodiment uses the size of the above-mentioned suspected crack attribute value to distinguish the road dirt from the crack area.
[0053] Before distinguishing the road dirt and crack areas, the method for obtaining the suspected crack attribute value of each cluster area includes:
[0054] For the kth cluster region in any clustering result image, the cluster regions in all other clustering result images that are adjacent to the kth cluster region are recorded as the adjacent cluster regions of the kth cluster region;
[0055] In the k-th cluster area, the LBP texture value differences between all pixels and all neighboring pixels of all pixels are calculated, which is recorded as the texture distribution of the k-th cluster area;
[0056] In the neighboring clustering area of the kth clustering area, the LBP texture value differences between all pixels and all neighboring pixels of the pixel are also calculated, which is recorded as the texture distribution in the neighboring clustering area of the kth clustering area;
[0057] The suspected crack attribute value of the kth cluster region is obtained according to the difference in texture distribution between the kth cluster region and the adjacent cluster regions of the kth cluster region.
[0058] The suspected crack attribute value of the kth cluster area is negatively correlated with the difference in texture distribution.
[0059] The above process takes the kth cluster region as an example. Based on the LBP texture distribution of the kth cluster region, the LBP texture difference of the cluster regions adjacent to the kth cluster region in other cluster result images is considered. When the difference in texture distribution is smaller, it means that the similarity between the kth cluster region and the adjacent cluster region is better, which means that the stability of the kth cluster region in the clustering results of different K values is better, which means that the kth cluster region is more likely to be a suspected crack region.
[0060] As an example, a method for obtaining a cluster region that is adjacent to the kth cluster region includes: taking the Euclidean distance between the cluster centers of any two cluster regions as the distance between any two cluster regions, and selecting a cluster region with the smallest distance to the kth cluster region in each of the remaining cluster result images as the adjacent cluster region.
[0061] Similarly, the suspected crack attribute value of each clustering area in each clustering result image is obtained.
[0062] Step S003: In the clustering result image with the largest average value of the suspected crack attribute value, select the suspected crack area from all clustering areas according to the suspected crack attribute value.
[0063] The above-mentioned multiple clustering is performed and the suspected crack attribute value of each cluster area is calculated to describe the difference between the road surface dirt and crack areas in the multiple clustering. The size of the suspected crack attribute value can distinguish the road surface dirt and crack areas.
[0064] The specific process is:
[0065] The average values of the suspected crack attribute values of all clustered regions in each clustering result image are calculated respectively, and the clustering result image with the largest average value is recorded as the target image. In the target image, the clustered regions with suspected crack attribute values greater than the first threshold th1 are recorded as suspected crack regions. This embodiment is described by taking th1=0.68 as an example, and other values may be set in other embodiments, which are not specifically limited in this embodiment.
[0066] The obtained suspected crack area represents the area most likely to be the crack area, and other clustering areas outside the suspected crack area are interference areas such as dirty road surface.
[0067] Step S004: obtaining a crack grayscale characteristic factor of the suspected crack region according to the grayscale difference, the average grayscale value and the suspected crack attribute value of the suspected crack region.
[0068] The suspected crack areas obtained above only exclude most of the dirty road areas, but there is still a part of the road dirt that is not obviously different from the crack area in texture. It is difficult to screen out all the dirty road areas through the above-mentioned suspected crack attribute value and the size of the first threshold th1. Therefore, this embodiment then analyzes the grayscale features of the suspected crack areas to further screen out the dirty road areas.
[0069] Taking into account that there is a certain depth inside the real crack, the interior of the real crack area will appear dark and uniform grayscale features. Therefore, on the basis of the suspected crack attribute value, the crack grayscale characteristic factor of each suspected crack area is obtained according to the average grayscale value and grayscale difference of the suspected crack area to further accurately and completely describe the grayscale characteristics of the suspected crack area.
[0070] As an example, the steps of obtaining the crack grayscale characteristic factor of the suspected crack area include:
[0071] The average difference between the grayscale values of all pixels in the suspected crack area and the average grayscale values of the neighboring pixels of all pixels is taken as the average grayscale difference of the suspected crack area. The crack grayscale characteristic factor is negatively correlated with the average grayscale value and the average grayscale difference of the suspected crack area, respectively, and the crack grayscale characteristic factor is positively correlated with the suspected crack attribute value.
[0072] Step S005, obtaining the crack feature conformity of the suspected crack area based on the crack grayscale feature factor and the degree of fit of the contour lines on both sides of the long axis of the suspected crack area; correcting the crack feature conformity according to the short axis distribution of the suspected crack area to obtain the corrected crack feature conformity of the suspected crack area.
[0073] (1) Considering that the edge contour lines on both sides of the pavement crack have a highly chimeric feature, this implementation uses the chimeric degree of the contour lines on both sides of the long axis of the suspected crack area to analyze the morphology of the contour lines of the suspected crack area based on the crack grayscale characteristic factor to obtain the degree of crack feature conformity of the suspected crack area.
[0074] As an example, a method for obtaining the degree of conformity of crack characteristics in a suspected crack area includes:
[0075] The line segment between the two farthest pixel points on the contour line of the suspected crack area is taken as the major axis of the suspected crack area; the degree of fit of the contour lines on both sides of the major axis is obtained according to the distribution difference of the inflection points between the contour lines on both sides of the major axis of the suspected crack area; the degree of crack feature conformity is positively correlated with the crack grayscale feature factor and the degree of fit, respectively.
[0076] The greater the degree of consistency of the crack characteristics of the suspected crack area, the more similar the two pairs of side edges corresponding to the suspected crack area are or the more they can be embedded together, and the more likely it is a crack area.
[0077] As an example, a method for obtaining the degree of fit of the contour lines on both sides of the major axis includes:
[0078] For the mth inflection point on the contour line on either side of the major axis, along the clockwise direction, the angle between the vector from the previous inflection point of the mth inflection point to the mth inflection point and the vector from the mth inflection point to the next inflection point is defined as the characteristic angle of the mth inflection point.
[0079] On the contour line on either side of the long axis, the difference in characteristic angles of all adjacent inflection points is recorded as the inflection point distribution feature of the contour line on either side of the long axis; the degree of chimerism is obtained based on the difference in inflection point distribution features of the contour lines on both sides of the long axis; the degree of chimerism is negatively correlated with the difference in inflection point distribution features.
[0080] (2) Considering that the thinner the crack width is, the more recent the crack has collapsed or the smaller the crack opening is, the more obvious the high degree of fit between the two opposite edges of the crack should be. The crack width (minor axis) feature can be used to correct the degree of conformity of the crack features.
[0081] The specific method is: according to the minor axis distribution of the suspected crack area, the crack characteristic conformity degree is corrected to obtain the corrected crack characteristic conformity degree of the suspected crack area.
[0082] As an example, the process of obtaining the corrected crack feature conformity of the suspected crack area includes:
[0083] Obtain equal points on the long axis of the suspected crack area, for example, obtain 10 equal points on the long axis, and these 10 equal points divide the long axis into 11 sections of the same length; other numbers of equal points can be set in other embodiments, and this embodiment does not specifically limit it.
[0084] A straight line passing through each equally divided point and perpendicular to the major axis is obtained, and a line segment formed by two intersection points of the straight line and the contour line of the suspected crack area is used as each minor axis of the suspected crack area; if there are 10 equally divided points, 10 minor axes are obtained accordingly.
[0085] The corrected crack characteristic compliance is obtained based on the ratio of the major axis length of the suspected crack area to the mean of all minor axis lengths and the crack characteristic compliance. The corrected crack characteristic compliance is positively correlated with the ratio and the crack characteristic compliance.
[0086] In the above process, the narrower the gap width in the suspected crack area is, the more it means that the crack corresponding to the suspected crack area has just collapsed or the degree of crack opening is small, which means that the feature of the high degree of fit between the two opposite side edges of the suspected crack area should be more obvious, which further means that the reliability of the crack feature conformity degree in the suspected crack area is higher, and the crack feature conformity degree parameter of the suspected crack area is adjusted to be larger, otherwise it is adjusted to be smaller.
[0087] Step S006: Screen out highway crack areas from all suspected crack areas based on the conformity of the corrected crack features.
[0088] Because the greater the degree of conformity of the corrected crack features, the more the suspected crack region conforms to the features of the crack (including grayscale features and contour morphology features), the present embodiment uses the suspected crack region with the greatest degree of conformity of the corrected crack features as the highway crack region.
[0089] In other embodiments, the following method can be used to obtain the highway crack area: for all the corrected crack feature conformity levels of all suspected crack areas, considering that the corrected crack feature conformity level corresponding to the highway crack area is obviously different from the corrected crack feature conformity level of other dirty areas, the Otsu threshold segmentation algorithm is used to divide all the corrected crack feature conformity levels into two parts, and the suspected crack area corresponding to the part with the largest average value is taken as the highway crack area.
[0090] Embodiment 2:
[0091] This embodiment provides a highway crack detection device, including a high-resolution camera for collecting highway images. The camera is installed on a road inspection vehicle, with the camera lens pointing vertically downward, and collects highway images every 1 second. In addition, the device also includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The camera and the processor are connected by a data cable. When the processor executes the computer program, steps S001 to S006 in the above-mentioned highway crack detection method are implemented.
[0092] Embodiment three:
[0093] As an optional example, the calculation formula for the suspected crack attribute value of the kth cluster area is as follows:
[0094]
[0095] in, represents the suspected crack attribute value of the kth cluster area; represents the LBP texture value of the x-th pixel in the k-th cluster area (the LBP texture value is existing knowledge and will not be elaborated on here); Represents the mean LBP texture value of the eight neighborhood pixels of the xth pixel in the kth cluster area; Represents the total number of pixels in the kth cluster area. Represents the texture distribution of the kth cluster area.
[0096] Represents the number of pixels in the jth neighboring cluster area of the kth cluster area; Indicates the number of neighboring cluster regions of the kth cluster region; Represents the LBP texture value of the y-th pixel in the j-th adjacent cluster area of the k-th cluster area; Represents the mean LBP texture value of the eight neighboring pixels of the yth pixel in the jth neighboring cluster area; Represents the texture distribution in the neighboring cluster areas of the kth cluster area.
[0097] Represents an exponential function with a natural constant as its base.
[0098] Indicates the difference in texture distribution between the kth cluster area and the adjacent cluster area of the kth cluster area. The smaller the value, the better the similarity between the kth cluster area and its adjacent cluster area, the better the stability of the kth cluster area in the clustering results of different K values, and the higher the possibility that the kth cluster area is a suspected crack area. The bigger.
[0099] As an optional example, the calculation formula of the crack grayscale characteristic factor is:
[0100]
[0101] in, Represents the crack grayscale characteristic factor of the i-th suspected crack area; represents the suspected crack attribute value of the i-th suspected crack area; Indicates the first suspected crack area in the i-th The gray value of each pixel; Indicates the first suspected crack area in the i-th The grayscale mean of the eight neighboring pixels of a pixel; Represents the total number of pixels in the i-th suspected crack area; Represents the mean grayscale value of all pixels in the i-th suspected crack area.
[0102] It represents the grayscale difference in the suspected crack area. The smaller the value is, the better the grayscale uniformity inside the i-th suspected crack area is. This means that the degree of trust in judging the possibility that the i-th suspected crack area satisfies the dark and uniform grayscale characteristics inside the crack based on the grayscale mean of the i-th suspected crack area is higher, and the probability of crack in the i-th suspected crack area is higher. represents the linear normalization function.
[0103] As an optional example, the calculation formula for the degree of compliance of crack characteristics is as follows:
[0104]
[0105] Indicates the degree of conformity of the crack characteristics of the i-th suspected crack area; Represents the crack grayscale characteristic factor of the i-th suspected crack area;
[0106] Indicates the degree of fit of the contour lines on both sides of the long axis of the i-th suspected crack area.
[0107] in, represents the number of inflection points on the left contour line of the major axis in the i-th suspected crack area; It represents the characteristic angle of the mth inflection point on the left contour line of the long axis in the i-th suspected crack area; It represents the characteristic angle of the m+1th inflection point on the left contour line of the long axis in the i-th suspected crack area.
[0108] represents the number of inflection points on the contour line on the right side of the long axis in the i-th suspected crack area; It represents the characteristic angle of the nth inflection point on the right side contour line of the long axis in the i-th suspected crack area; It represents the characteristic angle of the n+1th inflection point on the right side contour line of the long axis in the i-th suspected crack area.
[0109] Respectively represent the inflection point distribution characteristics of the contour lines on both sides of the major axis; It indicates the difference in the inflection point distribution characteristics of the contour lines on both sides of the major axis. The smaller the value is, the more similar the contours on both sides of the i-th suspected crack area are, the higher the degree of fit of the contours on both sides of the i-th suspected crack area is, and the greater the probability of cracks in the i-th suspected crack area is.
[0110] As an example, the method for obtaining the above inflection point is:
[0111] The contour line of the ith suspected crack area is rotated so that the long axis of the suspected crack area is rotated to be horizontal. At this time, the extreme point on the contour line above or below the long axis is used as the inflection point.
[0112] As an optional example, the calculation formula for the corrected crack feature conformity degree of the i-th suspected crack area is as follows:
[0113]
[0114] Indicates the conformity degree of the corrected crack characteristics of the i-th suspected crack area, Indicates the degree of conformity of the crack characteristics of the i-th suspected crack area; represents the length of the major axis of the i-th suspected crack area; The length of the u-th minor axis of the ith suspected crack area; Represents the number of short axes of the i-th suspected crack area.
[0115] It represents the ratio of the major axis length of the i-th suspected crack area to the mean of all minor axis lengths.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting cracks in a highway, characterized in that: The method comprises the following steps: The highway image is clustered several times to obtain several clustering result images, each clustering uses different clustering parameters, and each clustering result image contains several clustering areas; For each cluster region in each cluster result image, the suspected crack attribute value of each cluster region in each cluster result image is obtained according to the texture difference between each cluster region and the cluster region in other cluster result images and adjacent to the cluster region; in the cluster result image with the largest average value of the suspected crack attribute value, the suspected crack region is screened out from all cluster regions according to the suspected crack attribute value; Obtain a crack grayscale characteristic factor of the suspected crack region according to the grayscale difference, average grayscale value and suspected crack attribute value of the suspected crack region; obtain a crack feature conformity degree of the suspected crack region based on the crack grayscale characteristic factor and the degree of fit of contour lines on both sides of the long axis of the suspected crack region; correct the crack feature conformity degree according to the short axis distribution of the suspected crack region to obtain a corrected crack feature conformity degree of the suspected crack region; and screen out highway crack regions from all suspected crack regions according to the corrected crack feature conformity degree; The method of obtaining the crack grayscale characteristic factor of the suspected crack region according to the grayscale difference of the suspected crack region, the average grayscale value and the suspected crack attribute value of the suspected crack region includes the following specific steps: The average difference between the grayscale values of all pixels in the suspected crack area and the average grayscale values of all neighboring pixels of the pixels is taken as the grayscale difference of the suspected crack area. The crack grayscale characteristic factor is negatively correlated with the average grayscale value and the average grayscale difference of the suspected crack area, respectively, and the crack grayscale characteristic factor is positively correlated with the suspected crack attribute value. The method of obtaining the degree of conformity of the crack characteristics of the suspected crack region based on the crack grayscale characteristic factor and the degree of fit of the contour lines on both sides of the long axis of the suspected crack region includes the following specific steps: The line segment between the two farthest pixel points on the contour line of the suspected crack area is used as the long axis of the suspected crack area; the degree of fit of the contour lines on both sides of the long axis is obtained according to the distribution difference of the inflection points between the contour lines on both sides of the long axis of the suspected crack area; the degree of crack feature conformity is positively correlated with the crack grayscale feature factor and the degree of fit, respectively; The method of correcting the crack characteristic conformity according to the minor axis distribution of the suspected crack region to obtain the corrected crack characteristic conformity of the suspected crack region includes the following specific steps: A number of equally divided points are obtained on the long axis of the suspected crack region, and a straight line passing through each equally divided point and perpendicular to the long axis is obtained, and a line segment formed by two intersection points of the straight line and the contour line of the suspected crack region is used as each short axis of the suspected crack region; The corrected crack characteristic conformity is obtained according to the ratio of the major axis length of the suspected crack area to the average of all minor axis lengths and the crack characteristic conformity; The corrected crack characteristic conformity is positively correlated with the ratio and the crack characteristic conformity, respectively.
2. A highway crack detection method according to claim 1, characterized in that: The specific steps for obtaining the suspected crack attribute value are as follows: For the kth cluster region in any clustering result image, the cluster regions in other clustering result images that are adjacent to the kth cluster region are recorded as the adjacent cluster regions of the kth cluster region; In the k-th cluster area, the LBP texture value differences between all pixels and all neighboring pixels of all pixels are calculated, which is recorded as the texture distribution of the k-th cluster area; In the neighboring clustering area of the kth clustering area, the LBP texture value differences between all pixels and all neighboring pixels of the pixel are also calculated, which is recorded as the texture distribution in the neighboring clustering area of the kth clustering area; Obtaining a suspected crack attribute value of the kth cluster region according to the difference in texture distribution between the kth cluster region and the adjacent cluster regions of the kth cluster region; The suspected crack attribute value is negatively correlated with the difference in texture distribution.
3. A highway crack detection method according to claim 1, characterized in that: The several clusterings use the K-Means clustering algorithm, and the clustering parameter is the K value in the K-Means clustering algorithm.
4. A highway crack detection method according to claim 1, characterized in that: The specific steps of screening out suspected crack regions from all cluster regions according to the suspected crack attribute values in the cluster result image with the largest average value of the suspected crack attribute values are as follows: The average values of the suspected crack attribute values of all clustering areas in each clustering result image are calculated respectively, and the clustering result image with the largest average value is recorded as the target image. In the target image, the clustering areas with suspected crack attribute values greater than the first preset threshold are recorded as suspected crack areas.
5. A highway crack detection method according to claim 1, characterized in that: The step of obtaining the degree of fit of the contour lines on both sides of the long axis according to the distribution difference of the inflection points between the contour lines on both sides of the long axis of the suspected crack region includes the following specific steps: For the mth inflection point on the contour line on either side of the major axis, along the clockwise direction, the angle between the vector from the previous inflection point of the mth inflection point to the mth inflection point and the vector from the mth inflection point to the next inflection point is defined as the characteristic angle of the mth inflection point; On the contour line on either side of the long axis, the difference in characteristic angles of all adjacent inflection points is recorded as the inflection point distribution feature of the contour line on either side of the long axis; the degree of chimerism is obtained based on the difference in inflection point distribution features of the contour lines on both sides of the long axis; the degree of chimerism is negatively correlated with the difference in inflection point distribution features.
6. A highway crack detection method according to claim 1, characterized in that: The specific steps of selecting the highway crack area from all suspected crack areas according to the corrected crack feature conformity are as follows: The suspected crack area with the highest degree of conformity to the corrected crack characteristics is taken as the highway crack area.
7. A highway crack detection device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and also comprising a camera connected to the processor for collecting highway images, characterized in that: When the processor executes the computer program, the steps of a highway crack detection method as described in any one of claims 1 to 6 are implemented.
