A method and system for rapid detection of highway quality for traffic engineering
By segmenting and gamma value calculation of road surface images in highway quality detection, the image is adjusted to reduce the impact of shadows, the problem of uneven light caused by tree shadows is solved, and the accuracy of crack detection is improved.
Patent Information
- Application Number
- CN202411561748.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-05
AI Technical Summary
In highway quality inspection, trees shadows lead to uneven lighting on the road surface, affecting the accuracy of crack detection. It is difficult for the existing technology to effectively solve this problem.
By segmenting the road surface image into crack areas and background areas, the importance and comprehensive impact of cracks are determined, and the morphological refinement algorithm and area growth algorithm are used to extract the skeleton lines, calculate the gamma value and perform image adjustments, and reduce shadows to identify cracks. The impact of
It improves the accuracy of road quality inspection, reduces the impact of tree shadows on crack detection, and enhances the ability to identify road cracks.
Smart Images

Figure CN119067974B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for rapid detection of highway quality for traffic engineering. Background Art
[0002] Rapid detection of highway quality is an important part of ensuring road safety and extending the service life of roads. Highway quality issues usually involve multiple aspects such as highway design, construction, materials, maintenance and environmental factors. When problems such as pavement damage, unstable roadbed, drainage, etc. occur, regular highway inspections and assessments are carried out to identify potential problems, and regular maintenance and repairs can improve the quality and safety of highway projects and ensure the long-term performance and durability of highways. Pavement damage on highways may cause cracks, potholes, peeling, etc. When inspecting pavement damage, a vehicle-mounted detection system is usually used, that is, a high-speed camera system installed on a vehicle is used to collect pavement images in real time during normal driving of the vehicle. The pavement damage is analyzed through the collected pavement images, but the collected images will be affected by the shadows of trees on both sides of the highway, resulting in uneven illumination of the pavement, resulting in shadow parts in the image, which will affect the judgment of pavement cracks in the image. The growth of trees in different sections of the road is different, and the shadow areas formed on the pavement are also different.
[0003] Related technologies often enhance images to facilitate crack detection. However, the presence of shadows in the image affects the image enhancement results, which in turn affects the accuracy of crack judgment. Therefore, a rapid road quality detection method for traffic engineering is urgently needed to solve the above problems. Summary of the invention
[0004] In order to adjust the light and dark areas in the road image, reduce the influence of tree shadows on road crack detection, and improve the accuracy of road quality detection, the purpose of the present invention is to provide a road quality rapid detection method and system for traffic engineering. The technical scheme adopted is as follows:
[0005] In a first aspect, the present invention provides a method for rapid detection of road quality for traffic engineering, the method comprising:
[0006] Segment the road surface image into crack area and background area;
[0007] Determining the importance of the crack according to the area of the crack in the road surface image and the area of the minimum circumscribed rectangle of the crack in the road surface image;
[0008] According to the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance, the importance of the crack is corrected to obtain the corrected importance of the crack, wherein the method for obtaining the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance comprises: extracting the skeleton line of the crack in the road surface image by using a morphological thinning algorithm, intersecting the vertical line through each pixel point on the skeleton line with the crack boundary in the road surface image at two upper and lower points, the distance between the upper and lower points being the width of the crack in the road surface image corresponding to the pixel point on the skeleton line, and the vertical line being perpendicular to the horizontal line of the road surface image; merging the pixel points on the skeleton line by using a regional growing algorithm, thereby dividing the skeleton line into a plurality of skeleton segments; calculating the mean of all widths in the skeleton segment to obtain the width of the skeleton segment; taking the skeleton segment with a width greater than a width threshold as a wide skeleton segment; calculating the length of the wide skeleton segment and the distance between the two wide skeleton segments with the shortest distance;
[0009] Based on the crack correction importance, determining the degree of influence of uneven illumination on crack pixels;
[0010] Based on the influence of uneven illumination on crack pixel points, the grayscale change speed and grayscale stability of the grayscale value change sequence, the comprehensive influence of the crack is determined, wherein the method for determining the grayscale change speed and grayscale stability of the grayscale value change sequence includes: expanding the crack area in the road surface image to obtain an extended area, wherein the extended area is the difference area between the crack area after expansion and the crack area before expansion; dividing the extended area into a plurality of blocks with the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack; calculating the mean of the grayscale values of the pixel points in the blocks to obtain the grayscale values of the blocks, and constructing a grayscale value change sequence of the crack in the road surface image along the main extension direction; determining a grayscale change curve based on the grayscale value change sequence, wherein the horizontal axis of the grayscale change curve represents the sequence number and the vertical axis represents the grayscale value; the peaks and troughs of the grayscale change curve divide the grayscale change curve into a plurality of segments, determining the slope and the number of peaks of the segments, and obtaining the grayscale change speed and grayscale stability of the grayscale value change sequence;
[0011] Determining a gamma value of the road surface image based on the comprehensive impact degree of the cracks;
[0012] adjusting the road surface image based on a gamma value of the road surface image;
[0013] The road surface quality is detected based on the adjusted road surface image.
[0014] In some embodiments, the importance of a crack is determined according to the following formula:
[0015]
[0016] In the formula, represents the importance of the ath crack in the road image, represents the number of pixels on the ath crack in the road image, It represents the area of the minimum circumscribed rectangle of the ath crack in the road surface image, and a represents the number of cracks in the road surface image.
[0017] In some embodiments, the importance of the crack is corrected according to the following formula to obtain the crack correction importance:
[0018]
[0019] In the formula, represents the crack correction importance of the a-th crack in the road surface image, represents the importance of the a-th crack in the road image, n represents the number of wide skeleton segments of the a-th crack in the road image, represents the length of the i-th wide skeleton segment on the a-th crack in the road surface image, It represents the distance between the i-th wide skeleton segment on the a-th crack in the road surface image and its nearest wide skeleton segment, a represents the number of cracks in the road surface image, and i represents the number of the wide skeleton segment on the a-th crack in the road surface image.
[0020] In some embodiments, the degree of influence of uneven illumination on crack pixels is determined according to the following formula:
[0021]
[0022] In the formula, Indicates the degree of influence of uneven illumination of the jth pixel on the skeleton line of the ath crack in the road surface image on the crack pixel. represents the importance of crack correction for the ath crack in the road image, m represents the number of pixels on the skeleton line of the ath crack in the road image, b represents the number of pixels in the overlapping area between the perpendicular line of the jth pixel on the skeleton line of the ath crack in the road image and the ath crack, It represents the minimum angle between the gradient direction of the t-th pixel point on the perpendicular line of the j-th pixel point on the skeleton line of the a-th crack in the road surface image and the direction of the perpendicular line of the j-th pixel point, the perpendicular line of the j-th pixel point is perpendicular to the horizontal line of the road surface image, j represents the serial number of the pixel point on the skeleton line of the a-th crack in the road surface image, and t represents the serial number of the pixel point on the perpendicular line of the j-th pixel point on the skeleton line of the a-th crack in the road surface image.
[0023] In some embodiments, the comprehensive impact degree of the crack is determined according to the following formula:
[0024]
[0025] In the formula, represents the comprehensive impact of the a-th crack in the pavement image, q represents the number of gray value change sequences corresponding to the extension area of the a-th crack in the pavement image, It represents the number of peaks in the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image. It represents the average value of the absolute values of the slopes of all segments of the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image.
[0026] In some embodiments, the gamma value of the road surface image is determined according to the following formula:
[0027]
[0028] In the formula, represents the gamma value of the road image, S represents the number of cracks in the road image, Y represents the normalized value of the mean grayscale value of all pixels in the extended area of the ath crack in the road image, a represents the number of cracks in the road image, Represents the normalization function.
[0029] In some embodiments, the crack area in the road surface image is expanded to obtain an expanded area, specifically:
[0030] The crack region in the road surface image is expanded by using a rectangle of 8×8 as a structural element to obtain an expanded region.
[0031] In some embodiments, the main extension direction of the crack is determined by taking the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack, and the extended area is divided into multiple blocks of a size of 5×5. The segmentation rules include: when dividing the blocks, if the blocks contain pixel points that are not the same extended area as the current extended area, the pixel points in the current extended area are counted.
[0032] In some embodiments, the road surface image is segmented into a crack area and a background area by using a Mask R-CNN neural network.
[0033] In a second aspect, an embodiment of the present application provides a highway quality rapid detection system for traffic engineering, the system comprising:
[0034] A region segmentation module is used to segment the road surface image into a crack region and a background region;
[0035] A first determination module, configured to determine the importance of a crack according to the area of the crack in the road surface image and the area of the minimum circumscribed rectangle of the crack in the road surface image;
[0036] The second determination module is used to correct the importance of the crack according to the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance, so as to obtain the corrected importance of the crack, wherein the method for obtaining the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance comprises: extracting the skeleton line of the crack in the road surface image by using a morphological thinning algorithm, intersecting the vertical line through each pixel point on the skeleton line with the crack boundary in the road surface image at two upper and lower points, the distance between the upper and lower points being the width of the crack in the road surface image corresponding to the pixel point on the skeleton line, and the vertical line being perpendicular to the horizontal line of the road surface image; merging the pixel points on the skeleton line by using a regional growing algorithm, so as to divide the skeleton line into a plurality of skeleton segments; calculating the mean of all widths in the skeleton segment to obtain the width of the skeleton segment; taking the skeleton segment with a width greater than a width threshold as a wide skeleton segment; calculating the length of the wide skeleton segment and the distance between the two wide skeleton segments with the shortest distance;
[0037] A third determination module is used to determine the influence degree of uneven illumination on crack pixel points based on the crack correction importance;
[0038] The fourth determination module is used to determine the comprehensive impact degree of the crack based on the impact degree of uneven illumination on the crack pixel points, the grayscale change speed and grayscale stability of the grayscale value change sequence, wherein the method for determining the grayscale change speed and grayscale stability of the grayscale value change sequence includes: expanding the crack area in the road surface image to obtain an extended area, wherein the extended area is the difference area between the crack area after expansion and the crack area before expansion; dividing the extended area into a plurality of blocks with the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack; calculating the mean of the grayscale values of the pixel points in the blocks to obtain the grayscale values of the blocks, and constructing a grayscale value change sequence of the crack in the road surface image along the main extension direction; determining a grayscale change curve based on the grayscale value change sequence, wherein the horizontal axis of the grayscale change curve represents the sequence number and the vertical axis represents the grayscale value; the peaks and troughs of the grayscale change curve divide the grayscale change curve into a plurality of segments, determining the slope and the number of peaks of the segments, and obtaining the grayscale change speed and grayscale stability of the grayscale value change sequence;
[0039] a fifth determination module, configured to determine a gamma value of the road surface image based on the comprehensive impact degree of the cracks;
[0040] An adjustment module, configured to adjust the road surface image based on a gamma value of the road surface image;
[0041] The detection module is used for detecting the road surface quality based on the adjusted road surface image.
[0042] The present invention has the following beneficial effects:
[0043] The present invention provides a method for rapid detection of highway quality for traffic engineering. The method first divides a road surface image into a crack area and a background area, so as to facilitate subsequent processing of the crack area of the road surface image; determines the importance of the crack according to the area of the crack in the road surface image and the area of the minimum circumscribed rectangle of the crack in the road surface image, thereby preliminarily determining the degree of influence of the crack on the road surface; corrects the importance of the crack according to the length of the wide skeleton segment of the crack and the distance between the two shortest wide skeleton segments to obtain the corrected importance of the crack, and corrects the importance of the crack according to the distribution of the crack branches to accurately grasp the degree of influence of the crack on the road surface; determines the degree of influence of uneven illumination on crack pixels based on the corrected importance of the crack, and deeply considers the influence of uneven illumination on the crack pixels. The influence of the shadow formed by the road surface on the gradient direction of the pixel point at the crack; based on the influence of uneven illumination on the crack pixel point, the grayscale change speed and grayscale stability of the grayscale value change sequence, the comprehensive influence of the crack is determined, and the overall influence of uneven illumination on the crack in the road surface image is fully understood to eliminate the influence of different gray levels at different positions in the crack area on crack identification; based on the comprehensive influence of the crack, the gamma value of the road surface image is determined; based on the gamma value of the road surface image, the road surface image is adjusted, and the shadow part of the crack in the road surface image is adjusted according to the gamma value of the road surface image, so that the road surface image presents more crack details and reduces the influence of the shadow part on crack identification; based on the adjusted road surface image, the road surface quality is detected to obtain more accurate crack detection results. This method can adjust the light and dark areas in the road surface image, reduce the influence of tree shadows on road surface crack detection, and thus improve the accuracy of road surface quality detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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.
[0045] Figure 1 A method flow chart of a method for rapid detection of highway quality for traffic engineering provided by one embodiment of the present invention;
[0046] Figure 2 A schematic diagram of the structure of a highway quality rapid detection system for traffic engineering provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] 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.
[0049] In a first aspect, the present invention provides a method for rapid detection of road quality for traffic engineering, see Figure 1 , the method comprising:
[0050] Step 101, segmenting the road surface image into a crack area and a background area.
[0051] The crack area contains information about the degree of pavement fragmentation and crack dispersion, which facilitates the subsequent processing of the crack area in the pavement image.
[0052] In some embodiments, the road surface image is segmented into a crack area and a background area by using a Mask R-CNN neural network.
[0053] When the road surface image is segmented by Mask R-CNN (Mask Region-based Convolutional Neural Network), the labeling process of the training set is: single-channel semantic label, the corresponding position pixel belongs to the background area is labeled as 0, and the connected domain belonging to the crack area is labeled as 1. The task of this network is classification, so the loss function used is the cross entropy loss function.
[0054] In some embodiments, the number of crack areas in each road surface image may be one or more.
[0055] In some embodiments, before step 101, the method may further include acquiring road surface images, and the specific acquisition method includes: installing a camera and a GPS positioning system on the vehicle, and equipping it with a computer, planning a driving route according to the road surface area that needs to be detected, ensuring that the route covers all road sections that need to be detected and abides by traffic regulations, so that the vehicle travels along the predetermined route, and at the same time turning on the camera to shoot video, synchronizing the collected video with the GPS data to ensure that each frame of the road surface image in the video can accurately correspond to the corresponding position on the map, the computer is used to store video data obtained at any time, and after the driving is completed, all collected videos are transmitted to the server for subsequent processing and analysis.
[0056] Due to the interference of shadows, there may be certain errors in the segmented crack area, and the details of the crack area are blurred. Therefore, the crack area needs to be subsequently processed and re-segmented.
[0057] Cracks on the road surface are mainly caused by excessive traffic load, poor construction quality or climate change. Cracks often extend in one or more directions. Different cracks have different areas and lengths, and their impact on the road surface is also different. The more extended and larger the area of the crack, the greater the impact on the road surface. At the same time, the more serious the impact of uneven lighting will be, and the more it needs to use a smaller gamma value to adjust its brightness. Therefore, step 102 is introduced.
[0058] Step 102: Determine the importance of the crack according to the area of the crack in the road surface image and the area of the minimum circumscribed rectangle of the crack in the road surface image.
[0059] Determining the importance of cracks can preliminarily determine the extent of the cracks' impact on the road surface. The more branches a crack has, the more material dispersion and fragmentation it causes on the road surface, which further weakens the overall structure and stability of the road surface. The greater the impact on the road surface, the greater the importance of the crack.
[0060] In some embodiments, step 102 is implemented according to the following formula:
[0061]
[0062] In the formula, Indicates the importance of the ath crack in the road surface image, which can reflect the impact of the crack on the road surface. It represents the number of pixels on the ath crack in the road surface image, which can reflect the area of the crack. It represents the area of the smallest circumscribed rectangle of the ath crack in the road surface image, that is, the area of the smallest circumscribed rectangle that can contain the crack, which can indirectly reflect the area and extension of the crack. Not zero, a represents the number of cracks in the road surface image. It can represent the number of crack branches. When the crack areas are the same, The larger the crack is, the more branches there are, and the greater the impact on the road surface. The bigger it is.
[0063] In the entire crack, the width of the crack and the degree of dispersion of the branches it contains on the crack trunk will also affect the degree of damage to the road surface caused by the crack. The wider the crack width is and the more concentrated the branches dispersed on both sides of the crack are on the crack, the greater the expansion of the crack, the lower the bearing capacity and durability of the road surface will be, and the greater the damage to the road surface will be. Therefore, it is necessary to correct the importance according to the distribution of the crack branches.
[0064] Step 103: Correct the importance of the crack according to the length of the wide skeleton segment of the crack and the distance between two wide skeleton segments with the shortest distance, to obtain the corrected importance of the crack.
[0065] The method for obtaining the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance includes: (1) extracting the skeleton line of the crack in the pavement image by using a morphological thinning algorithm, and intersecting the vertical line through each pixel point on the skeleton line with the crack boundary in the pavement image at two upper and lower points. The distance between the upper and lower points is the width of the crack corresponding to the pixel point on the skeleton line in the pavement image, and the vertical line is perpendicular to the horizontal line of the pavement image. (2) merging the pixel points on the skeleton line by using a regional growing algorithm, so as to divide the skeleton line into multiple skeleton segments. (3) calculating the mean of all widths in the skeleton segment to obtain the width of the skeleton segment. (4) taking the skeleton segment with a width greater than the width threshold as the wide skeleton segment. (5) calculating the length of the wide skeleton segment and the distance between the two wide skeleton segments with the shortest distance.
[0066] The length of the wide skeleton segment of the crack and the distance between the two shortest wide skeleton segments can reflect the distribution of crack branches. The importance of the crack is corrected according to the distribution of crack branches to accurately grasp the impact of the crack on the road surface.
[0067] In some embodiments, step 103 is implemented according to the following formula:
[0068]
[0069] In the formula, The crack correction importance of the ath crack in the road surface image is the result of correcting the importance of the crack according to the distribution of the crack branches. represents the importance of the a-th crack in the road surface image, and n represents the number of wide skeleton segments of the a-th crack in the road surface image, which can reflect the number of crack branches. It represents the length of the i-th wide skeleton segment on the a-th crack in the road surface image, which can reflect the extension of the crack branch. The larger it is, the longer the branch is and the stronger the extension of the crack on the road surface is. represents the distance between the i-th wide skeleton segment on the a-th crack in the road surface image and its nearest wide skeleton segment, is not zero, It can reflect the compactness of the crack branches. The smaller it is, the closer the distance between the i-th wide skeleton segment on the a-th crack and its nearest wide skeleton segment is, indicating that the crack branches are more compact. a represents the number of cracks in the pavement image, and i represents the number of wide skeleton segments on the a-th crack in the pavement image. It can reflect the distribution of the i-th wide skeleton segment on the a-th crack. The larger the i-th wide skeleton segment on the a-th crack, the more concentrated the distribution of the wide skeleton segment, the more concentrated the crack branches, the greater the impact on the road surface, and the greater the importance of the corrected crack, that is, The bigger.
[0070] Under normal circumstances, the gradient direction of each pixel in the crack area is perpendicular to the skeleton line of the crack, but the crack on the road surface is affected by uneven lighting, and the gradient direction of the pixel will change. Therefore, the influence of the shadow formed by uneven lighting on the road surface on the gradient direction of the pixel at the crack is considered in depth, and step 104 is introduced to determine the influence of uneven lighting on the crack pixel.
[0071] Step 104: Determine the influence of uneven illumination on crack pixels based on the crack correction importance.
[0072] In some embodiments, step 104 is implemented according to the following formula:
[0073]
[0074] In the formula, It indicates the influence of uneven illumination of the jth pixel on the skeleton line of the ath crack in the road surface image on the crack pixel, and reflects the influence of the shadow formed by uneven illumination on the road surface on the gradient direction of the pixel at the crack. represents the importance of crack correction for the a-th crack in the pavement image, m represents the number of pixels on the skeleton line of the a-th crack in the pavement image, reflecting the extension of the skeleton line, b represents the number of pixels in the overlapping area between the perpendicular line of the j-th pixel on the skeleton line of the a-th crack in the pavement image and the a-th crack, reflecting the extension of the crack in the direction of the perpendicular line of the j-th pixel. The larger the b, the greater the extension of the crack in the direction of the perpendicular line of the j-th pixel. It represents the minimum angle between the gradient direction of the t-th pixel on the vertical line of the j-th pixel on the skeleton line of the a-th crack in the road surface image and the vertical line direction of the j-th pixel. The vertical line of the j-th pixel is perpendicular to the horizontal line of the road surface image. It reflects the influence of uneven illumination on the a-th crack in the road surface image. j represents the serial number of the pixel point on the skeleton line of the a-th crack in the road surface image. t represents the serial number of the pixel point on the vertical line of the j-th pixel point on the skeleton line of the a-th crack in the road surface image. Reflects the degree to which the a-th crack in the road surface image is affected by uneven illumination. The larger it is, the greater the impact of uneven illumination on the a-th crack in the road surface image is, and the greater the impact of uneven illumination on the crack pixel point on the j-th pixel on the skeleton line of the a-th crack in the road surface image is.
[0075] Due to the uneven illumination, the road surface image has cross-distribution of normal parts and shadow parts, and the shadow parts also show a lower grayscale value, which affects the recognition of the crack area and makes the recognition of the crack inaccurate. In the shadow parts, due to the different distribution of leaves and branches, the shadow degrees of different shadow parts are different, that is, the degree of grayness is different. The denser the leaves are, the stronger the ability to block sunlight, forming a darker shadow part on the road surface, that is, a strong shadow part. In places where the leaves are sparse, sunlight is more likely to penetrate the leaves and the gaps between the leaves, and the shadow formed on the road surface is lighter, that is, a weak shadow part. Taking the above situation into consideration, step 104 is introduced to solve the above problem.
[0076] Step 105 , determining the comprehensive impact degree of the crack based on the impact degree of the uneven illumination on the crack pixel point, the grayscale change speed and grayscale stability of the grayscale value change sequence.
[0077] Determine the comprehensive impact of cracks and fully understand the overall impact of uneven illumination on cracks in pavement images, so as to eliminate the influence of different gray levels at different locations in the crack area on crack identification.
[0078] Among them, the method for determining the grayscale change speed and grayscale stability of the grayscale value change sequence includes: (1) expanding the crack area in the road surface image to obtain an extended area, which is the difference area between the crack area after expansion and the crack area before expansion. The extended area can reflect the grayscale change near the crack. (2) Taking the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack, the extended area is divided into multiple blocks, so as to determine the grayscale change of the crack by block. (3) Calculating the mean of the grayscale value of the pixel points in the block to obtain the grayscale value of the block, constructing the grayscale value change sequence of the crack in the road surface image along the main extension direction, so as to determine the grayscale change of the crack along the main extension direction. (4) Based on the grayscale value change sequence, determine the grayscale change curve, the horizontal axis of the grayscale change curve represents the sequence number, and the vertical axis represents the grayscale value. (5) The peaks and troughs of the grayscale change curve are divided into multiple segments. The slope and number of peaks of the segments are determined to obtain the grayscale change speed and grayscale stability of the grayscale value change sequence, which is convenient for the subsequent determination of the overall impact of uneven illumination on cracks in the pavement image. The curve between a continuous peak and trough is a segment.
[0079] It should be noted that the larger the segment slope is, the faster the grayscale change speed in the grayscale value change sequence is; the more the number of peaks is, the worse the grayscale stability in the grayscale value change sequence is.
[0080] In some embodiments, the crack area in the road surface image is expanded to obtain an expanded area, specifically:
[0081] The crack area in the road surface image is expanded by using a rectangle of size 8×8 as a structural element to obtain an expanded area.
[0082] In some embodiments, the main extension direction of the crack is determined by taking the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack, and dividing the extended area into multiple blocks of a size of 5×5. The segmentation rules include: when dividing the blocks, if the blocks contain pixel points that are not the same extended area as the current extended area, the pixel points in the current extended area are counted.
[0083] In some embodiments, step 105 is implemented according to the following formula:
[0084]
[0085] In the formula, It represents the comprehensive impact of the a-th crack in the pavement image, reflecting the influence of different gray levels at different positions in the crack area on crack identification. q represents the number of gray value change sequences corresponding to the extended area of the a-th crack in the pavement image. It indicates the number of peaks in the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image, reflecting the grayscale stability in the grayscale value change sequence. The more peaks there are, The larger it is, the more grayscale changes there are in the grayscale value change sequence, and the worse the grayscale stability is. It represents the average value of the absolute values of the slopes of all segments of the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image. The larger the value, the faster the grayscale change speed in the grayscale value change sequence is, and the more unstable it is, which means that the normal area and the shadow area in the crack expansion area are more unevenly distributed, and the greater the impact of uneven lighting on the crack. The bigger it is.
[0086] Step 106: Determine the gamma value of the road surface image based on the comprehensive impact degree of the cracks.
[0087] The gamma value of the road surface image is determined to facilitate subsequent adjustment of the road surface image by the gamma value.
[0088] In some embodiments, step 106 is implemented according to the following formula:
[0089]
[0090] In the formula, represents the gamma value of the road image, S represents the number of cracks in the road image. The larger the S is, the more serious the road damage is. Y represents the normalized value of the mean grayscale value of all pixels in the extended area of the ath crack in the road image. The smaller Y is, the darker the pixels in the extended area are, the more they belong to the shadow part, and the more they need to be brightened. a represents the number of cracks in the road image. Represents the normalization function. Indicates the degree to which the a-th crack in the road surface image needs to be brightened. The larger the The smaller it is, the more it is necessary to adjust the brightness of the road image. When it is less than 1, the lower grayscale value parts in the road surface image will be stretched, and the higher grayscale value parts will be compressed, so that the shadow parts in the road surface image will be brightened and the brighter parts will be darkened, so that the light and dark conditions in various parts of the crack area will tend to be consistent, thereby improving the accuracy of road quality detection.
[0091] Step 107: adjusting the road surface image based on the gamma value of the road surface image.
[0092] The shadow part of the crack in the pavement image is adjusted according to the gamma value of the pavement image so that the pavement image presents more crack details and reduces the influence of the shadow part on crack identification, which facilitates better subsequent analysis of pavement quality.
[0093] In some embodiments, the road surface image is brightness adjusted using a gamma correction algorithm.
[0094] Step 108 , detecting the road surface quality based on the adjusted road surface image to obtain a more accurate crack detection result.
[0095] In summary, the highway quality rapid detection method for traffic engineering provided by the present invention can adjust the light and dark areas in the road surface image, reduce the influence of tree shadows on road surface crack detection, and thus improve the accuracy of road surface quality detection.
[0096] In the second aspect, the present application embodiment provides a highway quality rapid detection system for traffic engineering, see Figure 2 , the system comprises:
[0097] The region segmentation module 201 is used to segment the road surface image into a crack region and a background region.
[0098] The first determination module 202 is used to determine the importance of the crack according to the area of the crack in the road surface image and the area of the minimum circumscribed rectangle of the crack in the road surface image.
[0099] The second determination module 203 is used to correct the importance of the crack according to the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance, and obtain the corrected importance of the crack, wherein the method for obtaining the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance includes: extracting the skeleton line of the crack in the road surface image by using a morphological thinning algorithm, intersecting the vertical line through each pixel point on the skeleton line with the crack boundary in the road surface image at two upper and lower points, the distance between the upper and lower points is the width of the crack corresponding to the pixel point on the skeleton line in the road surface image, and the vertical line is perpendicular to the horizontal line of the road surface image. By using a regional growing algorithm, the pixel points on the skeleton line are merged, so that the skeleton line is divided into multiple skeleton segments. The mean of all widths in the skeleton segment is calculated to obtain the width of the skeleton segment. The skeleton segment with a width greater than the width threshold is regarded as a wide skeleton segment. The length of the wide skeleton segment and the distance between the two wide skeleton segments with the shortest distance are calculated.
[0100] The third determination module 204 is used to determine the influence of uneven illumination on crack pixels based on the importance of crack correction.
[0101] The fourth determination module 205 is used to determine the comprehensive impact of the crack based on the impact of uneven illumination on the crack pixel points, the grayscale change speed and grayscale stability of the grayscale value change sequence, wherein the grayscale change speed and grayscale stability of the grayscale value change sequence are determined by: expanding the crack area in the road surface image to obtain an extended area, where the extended area is the difference area between the crack area after expansion and the crack area before expansion. Taking the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack, the extended area is divided into a plurality of blocks. The mean of the grayscale values of the pixels in the blocks is calculated to obtain the grayscale values of the blocks, and the grayscale value change sequence of the crack in the road surface image along the main extension direction is constructed. Based on the grayscale value change sequence, a grayscale change curve is determined, wherein the horizontal axis of the grayscale change curve represents the sequence number and the vertical axis represents the grayscale value. The peaks and troughs of the grayscale change curve divide the grayscale change curve into a plurality of segments, determine the slope of the segment and the number of peaks, and obtain the grayscale change speed and grayscale stability of the grayscale value change sequence.
[0102] The fifth determination module 206 is used to determine the gamma value of the road surface image based on the comprehensive impact degree of the cracks.
[0103] The adjustment module 207 is used to adjust the road surface image based on the gamma value of the road surface image.
[0104] The detection module 208 is used to detect the road quality based on the adjusted road surface image.
[0105] In some embodiments, the importance of a crack is determined according to the following formula:
[0106]
[0107] In the formula, represents the importance of the ath crack in the road image, represents the number of pixels on the ath crack in the road image, It represents the area of the minimum circumscribed rectangle of the ath crack in the road surface image, and a represents the number of cracks in the road surface image.
[0108] In some embodiments, the importance of the crack is corrected according to the following formula to obtain the corrected importance of the crack:
[0109]
[0110] In the formula, represents the crack correction importance of the a-th crack in the road surface image, represents the importance of the a-th crack in the road image, n represents the number of wide skeleton segments of the a-th crack in the road image, represents the length of the i-th wide skeleton segment on the a-th crack in the road surface image, It represents the distance between the i-th wide skeleton segment on the a-th crack in the road surface image and its nearest wide skeleton segment, a represents the number of cracks in the road surface image, and i represents the number of the wide skeleton segment on the a-th crack in the road surface image.
[0111] In some embodiments, the degree of influence of uneven illumination on crack pixels is determined according to the following formula:
[0112]
[0113] In the formula, Indicates the degree of influence of uneven illumination of the jth pixel on the skeleton line of the ath crack in the road surface image on the crack pixel. represents the importance of crack correction for the ath crack in the road image, m represents the number of pixels on the skeleton line of the ath crack in the road image, b represents the number of pixels in the overlapping area between the perpendicular line of the jth pixel on the skeleton line of the ath crack in the road image and the ath crack, It represents the minimum angle between the gradient direction of the t-th pixel on the vertical line of the j-th pixel on the skeleton line of the a-th crack in the road surface image and the direction of the vertical line of the j-th pixel, the vertical line of the j-th pixel is perpendicular to the horizontal line of the road surface image, j represents the serial number of the pixel on the skeleton line of the a-th crack in the road surface image, and t represents the serial number of the pixel on the vertical line of the j-th pixel on the skeleton line of the a-th crack in the road surface image.
[0114] In some embodiments, the comprehensive impact degree of the crack is determined according to the following formula:
[0115]
[0116] In the formula, represents the comprehensive impact of the a-th crack in the pavement image, q represents the number of gray value change sequences corresponding to the extension area of the a-th crack in the pavement image, It represents the number of peaks in the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image. It represents the average value of the absolute values of the slopes of all segments of the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image.
[0117] In some embodiments, the gamma value of the road surface image is determined according to the following formula:
[0118]
[0119] In the formula, represents the gamma value of the road image, S represents the number of cracks in the road image, Y represents the normalized value of the mean grayscale value of all pixels in the extended area of the ath crack in the road image, a represents the number of cracks in the road image, Represents the normalization function.
[0120] In some embodiments, the crack area in the road surface image is expanded to obtain an expanded area, specifically:
[0121] The crack area in the road surface image is expanded by using a rectangle of size 8×8 as a structural element to obtain an expanded area.
[0122] In some embodiments, the main extension direction of the crack is determined by taking the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack, and dividing the extended area into multiple blocks of a size of 5×5. The segmentation rules include: when dividing the blocks, if the blocks contain pixel points that are not the same extended area as the current extended area, the pixel points in the current extended area are counted.
[0123] In some embodiments, the road surface image is segmented into a crack area and a background area by using a Mask R-CNN neural network.
[0124] In summary, the highway quality rapid detection system for traffic engineering provided by the present invention can adjust the light and dark areas in the road surface image, reduce the influence of tree shadows on road surface crack detection, and thus improve the accuracy of road surface quality detection.
[0125] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0126] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for rapid detection of highway quality for traffic engineering, characterized in that: The method comprises: Segment the road surface image into crack area and background area; Determining the importance of the crack according to the area of the crack in the road surface image and the area of the minimum circumscribed rectangle of the crack in the road surface image; According to the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance, the importance of the crack is corrected to obtain the corrected importance of the crack, wherein the method for obtaining the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance comprises: extracting the skeleton line of the crack in the road surface image by using a morphological thinning algorithm, intersecting the vertical line through each pixel point on the skeleton line with the crack boundary in the road surface image at two upper and lower points, the distance between the upper and lower points being the width of the crack in the road surface image corresponding to the pixel point on the skeleton line, and the vertical line being perpendicular to the horizontal line of the road surface image; merging the pixel points on the skeleton line by using a regional growing algorithm, thereby dividing the skeleton line into a plurality of skeleton segments; calculating the mean of all widths in the skeleton segment to obtain the width of the skeleton segment; taking the skeleton segment with a width greater than a width threshold as a wide skeleton segment; calculating the length of the wide skeleton segment and the distance between the two wide skeleton segments with the shortest distance; Based on the crack correction importance, determining the degree of influence of uneven illumination on crack pixels; Based on the influence of uneven illumination on crack pixel points, the grayscale change speed and grayscale stability of the grayscale value change sequence, the comprehensive influence of the crack is determined, wherein the method for determining the grayscale change speed and grayscale stability of the grayscale value change sequence includes: expanding the crack area in the road surface image to obtain an extended area, wherein the extended area is the difference area between the crack area after expansion and the crack area before expansion; dividing the extended area into a plurality of blocks with the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack; calculating the mean of the grayscale values of the pixel points in the blocks to obtain the grayscale values of the blocks, and constructing a grayscale value change sequence of the crack in the road surface image along the main extension direction; determining a grayscale change curve based on the grayscale value change sequence, wherein the horizontal axis of the grayscale change curve represents the sequence number and the vertical axis represents the grayscale value; the peaks and troughs of the grayscale change curve divide the grayscale change curve into a plurality of segments, determining the slope and the number of peaks of the segments, and obtaining the grayscale change speed and grayscale stability of the grayscale value change sequence; Determining a gamma value of the road surface image based on the comprehensive impact degree of the cracks; adjusting the road surface image based on a gamma value of the road surface image; The road surface quality is detected based on the adjusted road surface image.
2. A method for rapid detection of highway quality for traffic engineering according to claim 1, characterized in that: The importance of a crack is determined according to the following formula: In the formula, represents the importance of the ath crack in the road image, represents the number of pixels on the ath crack in the road image, It represents the area of the minimum circumscribed rectangle of the ath crack in the road surface image, and a represents the number of cracks in the road surface image.
3. A method for rapid detection of highway quality for traffic engineering according to claim 1, characterized in that: According to the following formula, the importance of the crack is corrected to obtain the corrected importance of the crack: In the formula, represents the crack correction importance of the a-th crack in the road surface image, represents the importance of the a-th crack in the road image, n represents the number of wide skeleton segments of the a-th crack in the road image, represents the length of the i-th wide skeleton segment on the a-th crack in the road surface image, It represents the distance between the i-th wide skeleton segment on the a-th crack in the road surface image and its nearest wide skeleton segment, a represents the number of cracks in the road surface image, and i represents the number of the wide skeleton segment on the a-th crack in the road surface image.
4. A method for rapid detection of highway quality for traffic engineering according to claim 3, characterized in that: The influence of uneven illumination on crack pixels is determined according to the following formula: In the formula, Indicates the degree of influence of uneven illumination of the jth pixel on the skeleton line of the ath crack in the road surface image on the crack pixel. represents the importance of crack correction for the ath crack in the road image, m represents the number of pixels on the skeleton line of the ath crack in the road image, b represents the number of pixels in the overlapping area between the perpendicular line of the jth pixel on the skeleton line of the ath crack in the road image and the ath crack, It represents the minimum angle between the gradient direction of the t-th pixel point on the perpendicular line of the j-th pixel point on the skeleton line of the a-th crack in the road surface image and the direction of the perpendicular line of the j-th pixel point, the perpendicular line of the j-th pixel point is perpendicular to the horizontal line of the road surface image, j represents the serial number of the pixel point on the skeleton line of the a-th crack in the road surface image, and t represents the serial number of the pixel point on the perpendicular line of the j-th pixel point on the skeleton line of the a-th crack in the road surface image.
5. A method for rapid detection of highway quality for traffic engineering according to claim 4, characterized in that: The comprehensive impact of cracks is determined according to the following formula: In the formula, represents the comprehensive impact of the a-th crack in the pavement image, q represents the number of gray value change sequences corresponding to the extension area of the a-th crack in the pavement image, It represents the number of peaks in the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image. It represents the average value of the absolute values of the slopes of all segments of the grayscale change curve corresponding to the kth grayscale value change sequence in the extension area of the ath crack in the road surface image.
6. A method for rapid detection of highway quality for traffic engineering according to claim 5, characterized in that: The gamma value of the road surface image is determined according to the following formula: In the formula, represents the gamma value of the road image, S represents the number of cracks in the road image, Y represents the normalized value of the mean grayscale value of all pixels in the extended area of the ath crack in the road image, a represents the number of cracks in the road image, Represents the normalization function.
7. A method for rapid detection of highway quality for traffic engineering according to claim 1, characterized in that: The crack area in the road surface image is expanded to obtain an expanded area, specifically: The crack region in the road surface image is expanded by using a rectangle of 8×8 as a structural element to obtain an expanded region.
8. A method for rapid detection of highway quality for traffic engineering according to claim 1, characterized in that: Taking the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack, the extended area is divided into multiple blocks with a block size of 5×5. The segmentation rules include: when dividing the blocks, if the block contains pixel points that are not the same extended area as the current extended area, the pixel points in the current extended area are counted.
9. A method for rapid detection of highway quality for traffic engineering according to claim 1, characterized in that: The road surface image is segmented into crack area and background area through the Mask R-CNN neural network.
10. A highway quality rapid detection system for traffic engineering, characterized in that: The system comprises: A region segmentation module is used to segment the road surface image into a crack region and a background region; A first determination module, configured to determine the importance of a crack according to the area of the crack in the road surface image and the area of the minimum circumscribed rectangle of the crack in the road surface image; The second determination module is used to correct the importance of the crack according to the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance, so as to obtain the corrected importance of the crack, wherein the method for obtaining the length of the wide skeleton segment of the crack and the distance between the two wide skeleton segments with the shortest distance comprises: extracting the skeleton line of the crack in the road surface image by using a morphological thinning algorithm, intersecting the vertical line through each pixel point on the skeleton line with the crack boundary in the road surface image at two upper and lower points, the distance between the upper and lower points being the width of the crack in the road surface image corresponding to the pixel point on the skeleton line, and the vertical line being perpendicular to the horizontal line of the road surface image; merging the pixel points on the skeleton line by using a regional growing algorithm, so as to divide the skeleton line into a plurality of skeleton segments; calculating the mean of all widths in the skeleton segment to obtain the width of the skeleton segment; taking the skeleton segment with a width greater than a width threshold as a wide skeleton segment; calculating the length of the wide skeleton segment and the distance between the two wide skeleton segments with the shortest distance; A third determination module is used to determine the influence degree of uneven illumination on crack pixel points based on the crack correction importance; The fourth determination module is used to determine the comprehensive impact degree of the crack based on the impact degree of uneven illumination on the crack pixel points, the grayscale change speed and grayscale stability of the grayscale value change sequence, wherein the method for determining the grayscale change speed and grayscale stability of the grayscale value change sequence includes: expanding the crack area in the road surface image to obtain an extended area, wherein the extended area is the difference area between the crack area after expansion and the crack area before expansion; dividing the extended area into a plurality of blocks with the long side direction of the minimum circumscribed rectangle of the crack in the road surface image as the main extension direction of the crack; calculating the mean of the grayscale values of the pixel points in the blocks to obtain the grayscale values of the blocks, and constructing a grayscale value change sequence of the crack in the road surface image along the main extension direction; determining a grayscale change curve based on the grayscale value change sequence, wherein the horizontal axis of the grayscale change curve represents the sequence number and the vertical axis represents the grayscale value; the peaks and troughs of the grayscale change curve divide the grayscale change curve into a plurality of segments, determining the slope and the number of peaks of the segments, and obtaining the grayscale change speed and grayscale stability of the grayscale value change sequence; a fifth determination module, configured to determine a gamma value of the road surface image based on the comprehensive impact degree of the cracks; An adjustment module, configured to adjust the road surface image based on a gamma value of the road surface image; The detection module is used for detecting the road surface quality based on the adjusted road surface image.