A method and system for automatically detecting highway construction quality
The method and system enhance crack detection accuracy on highway construction surfaces by analyzing grayscale differences and directional consistency to differentiate lane lines from cracks, addressing the issue of inaccurate detection in existing technologies.
Patent Information
- Application Number
- CN202411471841.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-10-22
AI Technical Summary
Existing methods for detecting cracks on highway construction surfaces struggle to accurately distinguish between crack edges and lane line edges due to their similarity, leading to inaccurate detection results.
A method and system that analyze the grayscale differences and directional consistency of edges in road edge images to differentiate between lane lines and cracks, using a combination of grayscale value analysis and angle measurements to determine the abnormality and regularity of edges, thereby identifying crack areas accurately.
Improves the accuracy of crack detection by distinguishing between lane lines and cracks, enhancing the rationality of automatic highway construction quality assessment.
Smart Images

Figure CN119006505B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for automatically detecting highway construction quality. Background Art
[0002] Automatic detection of cracks on the surface of highway construction is very important. Cracks may affect the structural stability of the highway. Automatic detection can detect and locate cracks in time, thereby preventing potential safety hazards and protecting the safety of drivers and pedestrians.
[0003] When the existing method detects cracks on the road surface after highway construction, it uses edge detection technology to identify irregular crack edges. However, since some cracks on the road surface after highway construction are similar to the lane line edges on the road surface, it is difficult to accurately distinguish whether the edge is the edge formed by the crack, resulting in inaccurate crack detection results and unable to reasonably automatically detect the highway construction quality. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a method and system for automatically detecting highway construction quality.
[0005] A method and system for automatically detecting highway construction quality of the present invention adopts the following technical solutions:
[0006] An embodiment of the present invention provides a method for automatically detecting highway construction quality, the method comprising the following steps:
[0007] Acquire images of the road edge where highway construction is completed;
[0008] Obtain the edge region corresponding to each straight edge in the road edge image; divide the edge region to obtain a number of block regions of each edge region; obtain the lane line prior gray value according to the gray value difference between adjacent block regions in the edge region; obtain the abnormality degree of each straight edge in the road edge image according to the difference between the gray value corresponding to the pixel point on the straight edge and the lane line prior gray value;
[0009] The continuous edges in the road edge image are all regarded as suspected crack edges. According to the angle value between two adjacent straight edges in the suspected crack edge, the degree of direction consistency between the two adjacent straight edges in each suspected crack edge is obtained; according to the degree of direction consistency and the straightness of the suspected crack edge, the regularity of each suspected crack edge in the road edge image is obtained;
[0010] According to the abnormality degree of the straight line edge and the regularity of the suspected crack edge where the straight line edge is located, the final abnormality degree of each straight line edge in the road edge image is obtained; according to the size of the final abnormality degree, the crack edges in the road edge image are screened, and the crack area on the road surface is determined through the crack edges.
[0011] Furthermore, the step of obtaining the lane line prior grayscale value according to the grayscale difference between adjacent block areas in the edge area includes the following specific steps:
[0012] For an edge area corresponding to any straight edge in the road edge image, obtain the absolute difference of the grayscale means corresponding to two adjacent block areas in the edge area, obtain the absolute difference of the grayscale value extremes corresponding to the two adjacent block areas, merge the absolute difference of the grayscale means and the absolute difference of the grayscale value extremes, and obtain the grayscale difference index of the two adjacent block areas;
[0013] According to the grayscale difference index of adjacent block areas in the edge area, the comprehensive grayscale change index of each edge area is obtained;
[0014] According to the size of the comprehensive grayscale change index, the lane line prior grayscale value is obtained.
[0015] Furthermore, the step of obtaining a comprehensive grayscale change index of each edge region according to the grayscale difference index of adjacent block regions in the edge region includes the following specific steps:
[0016] For the edge area corresponding to any straight edge in the road edge image, the cumulative value of the grayscale difference index between each block area in the edge area and all the surrounding adjacent block areas is obtained, and the sum of the cumulative values of the grayscale difference indexes corresponding to all the block areas in the edge area is used as the comprehensive grayscale change index of the edge area.
[0017] Furthermore, the step of obtaining the lane line priori grayscale value according to the size of the comprehensive grayscale change index includes the following specific steps:
[0018] The comprehensive grayscale change index of the edge area corresponding to each straight edge in the road edge image is obtained, and the grayscale mean value of the edge area corresponding to the minimum value of the comprehensive grayscale change index is used as the prior grayscale value of the lane line.
[0019] Furthermore, the abnormality degree of each straight edge in the road edge image is obtained according to the difference between the grayscale value corresponding to the pixel point on the straight edge and the prior grayscale value of the lane line, and the specific steps include the following:
[0020] For any straight edge in the road edge image, the absolute difference between the grayscale value corresponding to each pixel on the straight edge and the prior grayscale value of the lane line is obtained, and the average of the absolute differences between the grayscale values corresponding to all pixels on the straight edge and the prior grayscale value of the lane line is used as the initial abnormality degree of the straight edge. The initial abnormality degree is normalized to obtain the abnormality degree of the straight edge.
[0021] Furthermore, the step of obtaining the degree of direction consistency of two adjacent straight edges in each suspected crack edge according to the angle value between two adjacent straight edges in the suspected crack edge includes the following specific steps:
[0022] Any suspected crack edge in the road edge image is recorded as a target suspected crack edge; the inverse proportional value of the minimum angle between two adjacent straight edges in the target suspected crack edge is taken as the degree of direction consistency of the two adjacent straight edges.
[0023] Furthermore, the regularity of each suspected crack edge in the road edge image is obtained according to the degree of direction consistency and the straightness of the suspected crack edge, and the specific steps include the following:
[0024] The ratio of the number of pixels of all straight edges in the target suspected crack edge to the number of pixels in the target suspected crack edge is taken as the straightness of the target suspected crack edge; the cumulative value of the straightness and the degree of directional consistency of all adjacent straight edges in the target suspected crack edge are fused and normalized to obtain the regularity of the target suspected crack edge.
[0025] Furthermore, the final abnormality degree of each straight edge in the road edge image is obtained according to the abnormality degree of the straight edge and the regularity of the suspected crack edge where the straight edge is located, and the specific steps include the following:
[0026] For any straight edge in the road edge image, the abnormality degree of the straight edge and the regularity of the suspected crack edge where the straight edge is located are fused and normalized to obtain the final abnormality degree of the straight edge; the regularity is inversely proportional to the final abnormality degree.
[0027] Furthermore, the specific method for obtaining the edge area is as follows:
[0028] For any straight edge in the road edge image, a straight edge closest to the straight edge is obtained, and a quadrilateral formed by the straight edge and the straight edge closest to the straight edge is used as the edge area corresponding to the straight edge.
[0029] The present invention also proposes a highway construction quality automatic detection system, which includes a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the steps of the aforementioned method.
[0030] The beneficial effect of the technical solution of the present invention is as follows: after acquiring the road edge image of the completed highway construction, the present invention obtains the lane line prior grayscale value by analyzing the grayscale difference of adjacent block areas in the edge area, and then obtains the abnormality degree of each straight edge in the road edge image by analyzing the difference between the grayscale value corresponding to the pixel point on the straight edge and the lane line prior grayscale value, thereby improving the accuracy of recognizing the straight edge formed by cracks on the road surface; and combining the degree of consistency of the directions of two adjacent straight edges in the overall suspected crack edge where the straight edge is located and the straightness of the suspected crack edge, obtains the regularity of the suspected crack edge in the road edge image, and accurately identifies the crack edge in the road edge image by combining the abnormality degree and the regularity, and then determines the crack area, thereby solving the problem that the crack detection results are inaccurate due to the similarity between some cracks on the road surface and the lane line edge on the road surface, thereby improving the rationality of automatic detection of highway construction quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] 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.
[0032] Figure 1 A flowchart of a method for automatically detecting highway construction quality provided by an embodiment of the present invention;
[0033] Figure 2 A road grayscale image of a method for automatically detecting highway construction quality provided by an embodiment of the present invention;
[0034] Figure 3 A road edge image of a method for automatically detecting highway construction quality provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] 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 method and system for automatically detecting highway construction quality according to 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.
[0036] 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.
[0037] The specific scheme of a method and system for automatically detecting highway construction quality provided by the present invention is described in detail below with reference to the accompanying drawings.
[0038] See also Figure 1 , which shows a flowchart of a method for automatically detecting highway construction quality provided by an embodiment of the present invention, the method comprising the following steps:
[0039] Step S001: Acquire an image of the edge of a road after highway construction is completed.
[0040] It should be noted that the main purpose of this embodiment is to determine the edges of cracks in the road edge image after highway construction, so as to better determine the crack area and complete the automatic detection of highway construction quality. Before starting the analysis, relevant data is first obtained.
[0041] Specifically, the road edge image after highway construction is obtained is as follows:
[0042] The road surface is photographed from above by a UAV equipped with a high-resolution CCD camera to obtain an RGB image of the road surface; the RGB image of the road surface is gray-scaled to obtain a road gray-scale image; Canny edge detection is performed on the road gray-scale image to obtain an initial road edge image; and an opening operation is performed on the initial road edge image to obtain a road edge image.
[0043] It should be noted that since the initial image of the road edge contains some small noise or isolated points, the above-mentioned initial image of the road edge is opened to remove the local noise and obtain the road edge image; please refer to Figure 2 , Figure 2 is the road grayscale image of this embodiment; please refer to Figure 3 , Figure 3 is the road edge image of this embodiment; performing an opening operation on the initial road edge image to obtain the road edge image is an existing morphological method, which will not be repeated in this embodiment.
[0044] At this point, the road edge image of the completed highway construction is obtained.
[0045] Step S002, obtaining the edge area corresponding to each straight edge in the road edge image; dividing the edge area to obtain a number of block areas of each edge area; obtaining the lane line prior gray value according to the gray value difference between adjacent block areas in the edge area; obtaining the abnormality degree of each straight edge in the road edge image according to the difference between the gray value corresponding to the pixel point on the straight edge and the lane line prior gray value.
[0046] It should be noted that the main purpose of this embodiment is to determine the edges formed by cracks in the road edge image after highway construction is completed, so as to better determine the crack area and complete the automatic detection of highway construction quality. In order to facilitate better subsequent analysis, it is first necessary to obtain the straight edges in the road edge image and the edge area formed by the straight edges.
[0047] Specifically, several straight line edges in the road edge image are obtained as follows:
[0048] The edges in the road edge image are subjected to Hough line detection to obtain several straight line edges in the road edge image.
[0049] It should be noted that the existing method of performing Hough line detection on the edges in the road edge image to obtain a number of straight line edges in the road edge image is Hough line detection, which will not be repeated in this embodiment.
[0050] Furthermore, the edge area corresponding to each straight edge in the road edge image is obtained as follows:
[0051] For any straight edge in the road edge image, a straight edge closest to the straight edge is obtained, and a quadrilateral formed by the straight edge and the straight edge closest to the straight edge is used as the edge area corresponding to the straight edge.
[0052] It should be noted that a straight edge is a line segment. When this embodiment obtains a straight edge with the closest straight edge distance, the midpoint of the straight edge is selected, and then the perpendicular distance between the midpoint and the adjacent straight edge is obtained. The adjacent straight edge determined by the shortest perpendicular distance is used as the straight edge with the closest straight edge distance.
[0053] It should be noted that, in order to facilitate a better analysis of the grayscale changes in the edge area later, the edge area needs to be divided into small areas for local analysis.
[0054] Specifically, the edge area is divided to obtain a number of sub-areas of each edge area, as follows:
[0055] For the edge area corresponding to any straight edge in the road edge image, the edge area is divided into several The block area, is a preset block ratio coefficient, and the block ratio coefficient is specifically 3.
[0056] It should be noted that the normal block size of the edge area is , if the remaining area is not The area is not used as a block area in this embodiment.
[0057] It should be noted that since the color of the lane line is artificially colored, generally white or yellow, the grayscale distribution in its area is relatively uniform, and the overall grayscale value does not change much. However, the crack is naturally formed, and the grayscale distribution in its area is relatively discrete, and the overall grayscale value changes greatly. Therefore, by analyzing the grayscale changes of adjacent block areas in the edge area, the grayscale difference index of the adjacent block areas is obtained. The larger the grayscale difference index, the more likely the current edge area is to be a crack area.
[0058] Specifically, according to the grayscale difference between adjacent block areas in the edge area, the prior grayscale value of the lane line is obtained, including the following steps:
[0059] First, according to the grayscale difference between adjacent block areas in the edge area, a grayscale difference index between adjacent block areas in each edge area is obtained.
[0060] Secondly, according to the grayscale difference index of adjacent block areas in the edge area, the comprehensive grayscale change index of each edge area is obtained.
[0061] Finally, according to the size of the comprehensive grayscale change index, the lane line prior grayscale value is obtained.
[0062] Preferably, in one embodiment of the present invention, according to the grayscale difference between adjacent sub-block areas in the edge area, a grayscale difference index between adjacent sub-block areas in each edge area is obtained, which is specifically as follows:
[0063] For the edge area corresponding to any straight edge in the road edge image, obtain the absolute difference of the grayscale means corresponding to the two adjacent block areas in the edge area, obtain the absolute difference of the grayscale value extremes corresponding to the two adjacent block areas, fuse the absolute difference of the grayscale means and the absolute difference of the grayscale value extremes to obtain the grayscale difference index of the two adjacent block areas.
[0064] As a specific example, the specific method for obtaining the grayscale difference index is as follows:
[0065] The edge region corresponding to any straight edge in the road edge image is recorded as the target edge region.
[0066]
[0067] In the formula, The target edge area The grayscale mean corresponding to each block area; The target edge area The adjacent block area The grayscale mean corresponding to each block area; The target edge area The extreme difference of the gray value corresponding to the pixel point in each block area; The target edge area The adjacent block area The extreme difference of the gray value corresponding to the pixel point in each block area; To take the absolute value; In the target edge area The block area and the adjacent Grayscale difference index of each block area.
[0068] It should be noted that since the color of the lane line is artificially colored, generally white or yellow, the grayscale distribution in its area is relatively uniform, and the overall grayscale value does not change much. However, the crack is naturally formed, and the grayscale distribution in its area is relatively discrete, and the overall grayscale value changes greatly. Therefore, the above formula analyzes the grayscale changes of adjacent block areas in the edge area to obtain the grayscale difference index of adjacent block areas. It reflects the absolute difference between the grayscale means of two adjacent block areas. It reflects the absolute difference between the grayscale values of two adjacent block areas. The larger the grayscale difference index is, the more likely the current edge area is a crack area.
[0069] It should be noted that the above-mentioned grayscale difference between two adjacent block areas in an edge area is obtained. By analyzing the grayscale differences of all adjacent block areas in the same edge area, the comprehensive grayscale change index of the edge area is obtained. The larger the comprehensive grayscale change index of the edge area is, the more likely the current edge area is to be a crack area.
[0070] Preferably, in one embodiment of the present invention, a comprehensive grayscale change index of each edge region is obtained according to the grayscale difference index of adjacent block regions in the edge region, as follows:
[0071] For the edge area corresponding to any straight edge in the road edge image, the cumulative value of the grayscale difference index between each block area in the edge area and all the surrounding adjacent block areas is obtained, and the sum of the cumulative values of the grayscale difference indexes corresponding to all the block areas in the edge area is used as the comprehensive grayscale change index of the edge area.
[0072] As a specific example, the specific method for obtaining the comprehensive grayscale change index is as follows:
[0073]
[0074] In the formula, is the number of block regions in the target edge region; The target edge area The accumulated value of the grayscale difference index between a block area and all the surrounding adjacent block areas; It is the comprehensive grayscale change index of the target edge area.
[0075] It should be noted that the grayscale distribution of the lane line area is relatively uniform, and the overall grayscale value does not change much, while the grayscale distribution of the area where cracks are formed is relatively discrete, and the overall grayscale value changes greatly. The above steps have analyzed the grayscale differences between adjacent block areas in an edge area. By analyzing the grayscale differences of all adjacent block areas in the same edge area, the comprehensive grayscale change index of the entire edge area is obtained. The larger the comprehensive grayscale change index, the more likely the current edge area is to be a crack area.
[0076] It should be noted that the above-mentioned comprehensive grayscale change index of the edge area is obtained. Ideally, the comprehensive grayscale change index of the lane line area should be very small, with basically no change. Therefore, by selecting the edge area with the smallest comprehensive grayscale change index as the lane line reference area, the key lane line prior grayscale value is obtained.
[0077] Specifically, according to the size of the comprehensive grayscale change index, the lane line prior grayscale value is obtained, as follows:
[0078] The comprehensive grayscale change index of the edge area corresponding to each straight edge in the road edge image is obtained, and the grayscale mean value of the edge area corresponding to the minimum value of the comprehensive grayscale change index is used as the prior grayscale value of the lane line.
[0079] It should be noted that the lane line prior grayscale value obtained above is combined with the lane line prior grayscale value to analyze the abnormality of the straight edge in the road edge image. When the grayscale value corresponding to the pixel point on the straight edge is not much different from the lane line prior grayscale value, it means that the straight edge is more likely to be the edge of the lane line. Conversely, the straight edge is more likely to be a straight edge formed by a crack, and the degree of abnormality is greater.
[0080] Preferably, in one embodiment of the present invention, the abnormality degree of each straight edge in the road edge image is obtained according to the difference between the grayscale value corresponding to the pixel point on the straight edge and the prior grayscale value of the lane line, as follows:
[0081] For any straight edge in the road edge image, the absolute difference between the grayscale value corresponding to each pixel on the straight edge and the prior grayscale value of the lane line is obtained, and the average of the absolute differences between the grayscale values corresponding to all pixels on the straight edge and the prior grayscale value of the lane line is used as the initial abnormality degree of the straight edge. The initial abnormality degree is normalized to obtain the abnormality degree of the straight edge.
[0082] As a specific example, the specific method for obtaining the abnormality degree is as follows:
[0083]
[0084] In the formula, is the road edge image The number of pixels on the edge of a straight line; is the road edge image On the straight edge The gray value corresponding to each pixel; is the lane line prior grayscale value; To take the absolute value; is a linear normalization function used for normalization; is the road edge image The degree of abnormality of a straight line edge.
[0085] It should be noted that when the grayscale value corresponding to the pixel point on the straight edge is not much different from the prior grayscale value of the lane line, it means that the straight edge is more likely to be the edge of the lane line and the smaller its abnormality; conversely, the more likely the straight edge is to be a straight edge formed by a crack, the greater the abnormality; the above formula obtains the abnormality of the straight edge by analyzing the difference between the grayscale values corresponding to all pixels on the straight edge and the prior grayscale value of the lane line. The greater the abnormality, the more likely the straight edge is to be a straight edge formed by a crack.
[0086] At this point, the abnormality degree of each straight edge in the road edge image is obtained.
[0087] Step S003: Take all continuous edges in the road edge image as suspected crack edges, and obtain the degree of directional consistency of two adjacent straight edges in each suspected crack edge based on the angle value between two adjacent straight edges in the suspected crack edge; obtain the regularity of each suspected crack edge in the road edge image based on the degree of directional consistency and the straightness of the suspected crack edge.
[0088] It should be noted that the above analysis only obtains the abnormality of a straight line edge by analyzing the change in the grayscale value corresponding to the pixel point on a single straight line edge. Since the grayscale of the straight line edge formed by some cracks does not change much compared with the prior grayscale value of the lane line, it is difficult to accurately determine whether the straight line edge is abnormal. Therefore, it is also necessary to conduct an overall analysis in combination with the edge where the straight line edge is located to make the crack detection result more accurate.
[0089] It should be further explained that there may be multiple straight edges on the same edge in the road edge image. If the directions of these straight edges are consistent, it means that the edge where the straight edge is located is more likely to be a lane line edge. Therefore, by analyzing the angle changes of adjacent straight edges on the edge where the straight edge is located, the degree of directional consistency of adjacent straight edges in the edge is obtained. The higher the degree of directional consistency, the more likely the current edge is to be a lane line edge.
[0090] Preferably, in one embodiment of the present invention, continuous edges in the road edge image are all taken as suspected crack edges, and the degree of direction consistency of two adjacent straight edges in each suspected crack edge is obtained according to the angle value between the two adjacent straight edges in the suspected crack edge, as follows:
[0091] Any suspected crack edge in the road edge image is recorded as a target suspected crack edge; the inverse proportional value of the minimum angle between two adjacent straight edges in the target suspected crack edge is taken as the degree of direction consistency of the two adjacent straight edges.
[0092] As a specific example, the specific method for obtaining the degree of direction consistency is as follows:
[0093]
[0094] In the formula, The first The angle between the edge of a straight line and the horizontal line; The method for obtaining is as follows: along one side of the target suspected crack edge, obtain the The adjacent straight edges of the straight edges of the The angle between the adjacent straight line edges of a straight line edge and the horizontal line is recorded as ; To take the absolute value; is an exponential function with a natural constant as the base. The model shows the inverse proportional relationship. is the input of the model; The first The degree of consistency between the directions of a straight line edge and the corresponding adjacent straight line edges.
[0095] It should be noted that there may be multiple straight edges on the same suspected crack edge. If the directions of adjacent straight edges are consistent, it means that the suspected crack edge where the straight edge is located is more likely to be a lane line edge. Therefore, the above formula analyzes the angle value of two adjacent straight edges to obtain the degree of consistency in the directions of the two adjacent straight edges. The higher the degree of consistency in the directions, the more likely the current suspected crack edge is to be a lane line edge.
[0096] It should be noted that the above obtains the degree of directional consistency of two adjacent straight edges in the suspected crack edge. If the degree of directional consistency of all straight edges in the suspected crack edge is high and the proportion of straight edges is also high, then the regularity of the suspected crack edge is high and it appears as a straight line. The current suspected crack edge is more likely to be the lane line edge.
[0097] Preferably, in one embodiment of the present invention, the regularity of each suspected crack edge in the road edge image is obtained according to the degree of directional consistency and the straightness of the suspected crack edge, as follows:
[0098] The ratio of the number of pixels of all straight edges in the target suspected crack edge to the number of pixels in the target suspected crack edge is taken as the straightness of the target suspected crack edge; the cumulative value of the straightness and the degree of directional consistency of all adjacent straight edges in the target suspected crack edge are fused and normalized to obtain the regularity of the target suspected crack edge.
[0099] As a specific example, the specific method for obtaining the regularity is as follows:
[0100]
[0101] In the formula, is the number of straight edges in the target suspected crack edge; The first The degree of consistency between the direction of a straight line edge and the corresponding adjacent straight line edge; is the number of all straight edge pixels in the target suspected crack edge; is the number of pixels in the edge of the target suspected crack; is the softmax function, used for normalization; is the regularity of the edge of the target suspected crack.
[0102] It should be noted that if the direction consistency of all straight edges in the suspected crack edge is high and the proportion of straight edges is also high, the regularity of the suspected crack edge is high and presents a straight line. The current suspected crack edge is more likely to be the lane line edge. Therefore, the above formula analyzes the direction consistency of all adjacent straight edges in the target suspected crack edge and the straightness of the suspected crack edge to obtain the regularity of the target suspected crack edge. It reflects the straightness of the edge of the target suspected crack. The higher the regularity, the more likely the edge of the target suspected crack is the edge of the lane line.
[0103] At this point, the regularity of each suspected crack edge in the road edge image is obtained.
[0104] Step S004: according to the abnormality degree of the straight line edge and the regularity of the suspected crack edge where the straight line edge is located, the final abnormality degree of each straight line edge in the road edge image is obtained; according to the size of the final abnormality degree, the crack edges in the road edge image are screened, and the crack area of the road surface is determined through the crack edges.
[0105] It should be noted that the above analysis separately analyzes the abnormality degree of each straight edge in the road edge image and the regularity of each suspected crack edge in the road edge image. By combining the abnormality degree of the straight edge and the regularity of the suspected crack edge where the straight edge is located, the final abnormality degree of each straight edge in the road edge image is comprehensively obtained.
[0106] Preferably, in one embodiment of the present invention, the final abnormality degree of each straight edge in the road edge image is obtained according to the abnormality degree of the straight edge and the regularity of the suspected crack edge where the straight edge is located, as follows:
[0107] For any straight edge in the road edge image, the abnormality degree of the straight edge and the regularity of the suspected crack edge where the straight edge is located are fused and normalized to obtain the final abnormality degree of the straight edge; the regularity is inversely proportional to the final abnormality degree.
[0108] As a specific example, the specific method for obtaining the final abnormality degree is as follows:
[0109]
[0110] In the formula, is the road edge image The degree of abnormality of the edge of a straight line; is the road edge image The regularity of the edge of the suspected crack where the straight edge is located; It is a preset hyperparameter, the purpose of which is to prevent the denominator from being 0; is a linear normalization function used for normalization; is the road edge image The final degree of abnormality of a straight line edge.
[0111] It should be noted that the greater the abnormality of the straight edge in the road edge image, the more likely it is that the straight edge is formed by a crack, and its final abnormality should also be greater; at the same time, combined with the regularity of the suspected crack edge where the straight edge is located, if the regularity of the suspected crack edge itself is small, it means that the more abnormal the straight edge in the suspected crack edge is, the more likely it is that a crack is formed.
[0112] It should be noted that the final abnormality degree of each straight edge in the road edge image is obtained above, and the crack edge of the road surface is determined by setting a suitable threshold to obtain the crack area.
[0113] Specifically, according to the magnitude of the final abnormality, the crack edges in the road edge image are screened, and the crack area on the road surface is determined through the crack edges, as follows:
[0114] A first threshold is preset. This embodiment is described with the first threshold being 0.7. A straight line edge whose final abnormality is greater than the first threshold is regarded as a crack straight line edge, otherwise it is not regarded as a crack straight line edge. The suspected crack edge where the crack straight line edge is located is regarded as a crack edge. In the road edge image, the grayscale values of the edges other than the crack edge are set to 0 to obtain a crack edge image. The area formed by the crack edge in the crack edge image is regarded as the crack area on the road surface.
[0115] Through the above steps, a method for automatic detection of highway construction quality is completed.
[0116] Another embodiment of the present invention provides a highway construction quality automatic detection system, the system comprising a memory and a processor, the processor executing the computer program stored in the memory, performing the following operations:
[0117] Obtain a road edge image of a highway after construction; obtain an edge area corresponding to each straight edge in the road edge image; divide the edge area to obtain a number of block areas of each edge area; obtain a priori grayscale value of the lane line according to the grayscale difference between adjacent block areas in the edge area; obtain the abnormality of each straight edge in the road edge image according to the difference between the grayscale value corresponding to the pixel point on the straight edge and the prior grayscale value of the lane line; take the continuous edges in the road edge image as suspected crack edges, and obtain the degree of direction consistency of the two adjacent straight edges in each suspected crack edge according to the angle value between the two adjacent straight edges in the suspected crack edge; obtain the regularity of each suspected crack edge in the road edge image according to the degree of direction consistency and the straightness of the suspected crack edge; obtain the final abnormality of each straight edge in the road edge image according to the abnormality of the straight edge and the regularity of the suspected crack edge where the straight edge is located; screen the crack edges in the road edge image according to the size of the final abnormality, and determine the crack area on the road surface through the crack edges.
[0118] 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 automatically detecting highway construction quality, characterized in that: The method comprises the following steps: Acquire images of the road edge where highway construction is completed; Obtain the edge region corresponding to each straight edge in the road edge image; divide the edge region to obtain a number of block regions of each edge region; obtain the lane line prior gray value according to the gray value difference between adjacent block regions in the edge region; obtain the abnormality degree of each straight edge in the road edge image according to the difference between the gray value corresponding to the pixel point on the straight edge and the lane line prior gray value; The continuous edges in the road edge image are all regarded as suspected crack edges. According to the angle value between two adjacent straight edges in the suspected crack edge, the degree of direction consistency between the two adjacent straight edges in each suspected crack edge is obtained; according to the degree of direction consistency and the straightness of the suspected crack edge, the regularity of each suspected crack edge in the road edge image is obtained; According to the abnormality degree of the straight line edge and the regularity of the suspected crack edge where the straight line edge is located, the final abnormality degree of each straight line edge in the road edge image is obtained; according to the size of the final abnormality degree, the crack edges in the road edge image are screened, and the crack area on the road surface is determined through the crack edges; The specific steps of obtaining the lane line prior grayscale value according to the grayscale difference between adjacent block areas in the edge area are as follows: For an edge area corresponding to any straight edge in the road edge image, obtain the absolute difference of the grayscale means corresponding to two adjacent block areas in the edge area, obtain the absolute difference of the grayscale value extremes corresponding to the two adjacent block areas, merge the absolute difference of the grayscale means and the absolute difference of the grayscale value extremes, and obtain the grayscale difference index of the two adjacent block areas; According to the grayscale difference index of adjacent block areas in the edge area, the comprehensive grayscale change index of each edge area is obtained; According to the size of the comprehensive grayscale change index, the lane line prior grayscale value is obtained; The specific steps of obtaining the lane line prior grayscale value according to the size of the comprehensive grayscale change index are as follows: Obtain the comprehensive grayscale change index of the edge area corresponding to each straight edge in the road edge image, and use the grayscale mean of the edge area corresponding to the minimum value of the comprehensive grayscale change index as the prior grayscale value of the lane line; The specific steps of obtaining the abnormality degree of each straight edge in the road edge image according to the difference between the grayscale value corresponding to the pixel point on the straight edge and the prior grayscale value of the lane line are as follows: For any straight edge in the road edge image, the absolute difference between the grayscale value corresponding to each pixel on the straight edge and the prior grayscale value of the lane line is obtained, and the average of the absolute differences between the grayscale values corresponding to all pixels on the straight edge and the prior grayscale value of the lane line is used as the initial abnormality degree of the straight edge. The initial abnormality degree is normalized to obtain the abnormality degree of the straight edge.
2. The method for automatically detecting highway construction quality according to claim 1, characterized in that: The step of obtaining the comprehensive grayscale change index of each edge region according to the grayscale difference index of adjacent block regions within the edge region includes the following specific steps: For the edge area corresponding to any straight edge in the road edge image, the cumulative value of the grayscale difference index between each block area in the edge area and all the surrounding adjacent block areas is obtained, and the sum of the cumulative values of the grayscale difference indexes corresponding to all the block areas in the edge area is used as the comprehensive grayscale change index of the edge area.
3. The method for automatically detecting highway construction quality according to claim 1, characterized in that: The step of obtaining the degree of direction consistency of two adjacent straight edges in each suspected crack edge according to the angle value of two adjacent straight edges in the suspected crack edge includes the following specific steps: Any suspected crack edge in the road edge image is recorded as a target suspected crack edge; the inverse proportional value of the minimum angle between two adjacent straight edges in the target suspected crack edge is taken as the degree of direction consistency of the two adjacent straight edges.
4. A method for automatically detecting highway construction quality according to claim 3, characterized in that: The method of obtaining the regularity of each suspected crack edge in the road edge image according to the degree of directional consistency and the straightness of the suspected crack edge includes the following specific steps: The ratio of the number of pixels of all straight edges in the target suspected crack edge to the number of pixels in the target suspected crack edge is taken as the straightness of the target suspected crack edge; the cumulative value of the straightness and the degree of directional consistency of all adjacent straight edges in the target suspected crack edge are fused and normalized to obtain the regularity of the target suspected crack edge.
5. The method for automatically detecting highway construction quality according to claim 1, characterized in that: The method of obtaining the final abnormality degree of each straight edge in the road edge image according to the abnormality degree of the straight edge and the regularity of the suspected crack edge where the straight edge is located includes the following specific steps: For any straight edge in the road edge image, the abnormality degree of the straight edge and the regularity of the suspected crack edge where the straight edge is located are fused and normalized to obtain the final abnormality degree of the straight edge; the regularity is inversely proportional to the final abnormality degree.
6. A method for automatically detecting highway construction quality according to claim 1, characterized in that: The specific method for obtaining the edge area is as follows: For any straight edge in the road edge image, a straight edge closest to the straight edge is obtained, and a quadrilateral formed by the straight edge and the straight edge closest to the straight edge is used as the edge area corresponding to the straight edge.
7. A highway construction quality automatic detection system, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method for automatically detecting highway construction quality as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Road surface defect detection method and system based on machine vision
CN116740072A
Road construction quality detection method and system based on artificial intelligence
CN117173184A
Road engineering construction quality real-time monitoring method
CN118396986A