Road damage image scale matching method based on average gray gradient
By using a method based on average grayscale gradient, we collected and processed road damage image data on site, calculated the damage recovery coefficient, and used instance segmentation technology to identify the damaged area. This solved the problem of inconsistent scales of road damage images and improved detection accuracy and repair efficiency.
Patent Information
- Application Number
- CN202210244888.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-03-14
AI Technical Summary
In the existing technology, during the collection of road damage image datasets, factors such as wind speed and friction lead to inconsistent image damage scales, resulting in errors in material usage during subsequent repairs and low manual inspection efficiency.
By collecting contour reference grayscale image data samples on site, calculating the grayscale gradient average, marking the disease information, obtaining the grayscale gradient average of the image sample to be restored, calculating the disease area recovery coefficient, using instance segmentation technology to identify the diseased area, and processing the diseased area according to the recovery coefficient.
It reduces the repair error of road damage detection results, reduces the workload of staff, and improves the accuracy and efficiency of detection.
Smart Images

Figure CN114596457B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic damage detection, and in particular to a road damage image scale matching method based on average grayscale gradient. Background Art
[0002] In recent years, with the rapid development of my country's road transport industry, the construction cost of road transport infrastructure has gradually increased, the coverage area has expanded, and the situation has become increasingly complex. Due to weather conditions, vehicle traffic, and road quality issues, various surface defects such as transverse and longitudinal cracks, network cracks, and cracks appear on the surface, shortening the service life of the road surface. Manual detection of road defects results in a significant waste of manpower and resources, is overly dependent on individual expertise, and has poor real-time performance.
[0003] With the continuous development of deep learning in recent years, deep learning-based road damage detection algorithms have been applied in production practices. During the acquisition of road damage image datasets, due to force majeure factors such as wind speed, friction, gravity, and road bumps, the camera height may vary to a certain extent as the vehicle travels. This can lead to inconsistencies in the scale, such as area, of road damage between different images in the same dataset, resulting in errors in the amount of material used for subsequent repairs. This present invention proposes a solution to the problem of scale matching of road damage images. Summary of the Invention
[0004] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provides a road damage image scale matching method based on average grayscale gradient.
[0005] In order to solve the above technical problems, the present invention proposes a road damage image scale matching method based on average grayscale gradient, the method comprising:
[0006] S110, collecting a set of contour reference grayscale image data samples {X} on-site, calculating the grayscale gradient average of {X}, and marking the disease information of each image in {X};
[0007] S120, obtaining other grayscale image data sample sets to be restored in the same section of road, recording the data sample set after sample cleaning as {T}, and calculating the grayscale gradient average of each image in {T};
[0008] S130, comparing the grayscale gradient average of each image in {T} with the grayscale gradient average of {X} to obtain the disease area recovery coefficient of each image in {T};
[0009] S140, using instance segmentation technology to detect {T} and mark road damage information;
[0010] S150 , processing the road damage area information of each picture in {T} according to the damage area restoration coefficient of each picture in {T}.
[0011] Furthermore, the on-site collection of the contour reference grayscale image data sample set {X} in step S110, the calculation of the grayscale gradient average of {X}, and the marking of the disease information of each image in {X} specifically include:
[0012] S1101, collect n road damage grayscale image data with the number of pixels w*h taken by a camera at a fixed height, denoted as {X}. The current image is denoted as X i , where i∈{1,2…n}. Measure the total area of road damage in each road damage image in {X} and record the total area of damage in the i-th sample data as s i , so the actual disease area set S True ={s1,s2…s n}, the total area is recorded as A trueAll ;
[0013] S1102, copy {X} and record it as {X′}. Binarize each grayscale image in {X′} and set the threshold to t, where t∈{1,2…254}. The grayscale value of pixels in the image with a grayscale value greater than or equal to t is set to 255, and the grayscale value of pixels in the image with a grayscale value less than t is set to 0. Let the pixel in the ath row and bth column of the image be p a,b , the gray value is g a,b , where a∈{2,3…h-1}, b∈{2,3…w-1}. For pixel p a,b , remember p a,b The grayscale gradient value is
[0014]
[0015] Traverse all p in the image a,b , get the gray gradient average of the current image
[0016]
[0017] Calculate the total gray gradient average of {X′}
[0018]
[0019] Since {X′} and {X} have no difference in the image, the total gray gradient average of {X′} can be regarded as the total gray gradient average of {X};
[0020] S1103, mark the pixel area of each diseased image data in {X} on the computer, and the total area of the diseased pixel points of the i-th data sample is recorded as s i ′. The area of the diseased pixels of n data samples is recorded as set S comp ={s′1,s′2…s′ n}, the total diseased area of {X} is recorded as A compAll .
[0021] Furthermore, in step S120, a set of other grayscale image data samples to be restored in the same section of road is obtained, and the set of data samples after sample cleaning is recorded as {T}. The grayscale gradient average value of each image in {T} is calculated, specifically including:
[0022] S1201, collect a set of grayscale image data samples of other road damage to be restored on the same highway, clean the set of samples to be restored, filter out data samples with large external interference and discard them, and record the cleaned data sample set as {T}, and the total number of samples as n′;
[0023] S1202, copy {T} and record it as {T'}. Binarize each grayscale image in {T'} and record the current image as T' i′ , where i′∈{1,2…n′}. , the grayscale value of pixels with grayscale values greater than or equal to t in the image is set to 255, and the grayscale value of pixels with grayscale values less than t in the image is set to 0. For pixel e a,b , remember e a,b Grayscale gradient value
[0024]
[0025] Traverse all e in the image a,b , get the gray gradient average of the current image
[0026]
[0027] Let {T}’s gray gradient average value set C = {y″1,y″2…y″ n Since there is no difference between {T′} and {T} in the image, the total grayscale gradient average of {T′} can be regarded as the total grayscale gradient average of {T}.
[0028] Furthermore, the grayscale gradient average value of each image in {T} is compared with the grayscale gradient average value of {X} in step S130 to obtain the disease area recovery coefficient of each image in {T}, which specifically includes:
[0029] Let the recovery coefficient of the i′th data sample in {T′} be
[0030]
[0031] Then let the set of restitution coefficients of {T′} be F={μ1,μ2…μ n′}, since there is no difference between {T′} and {T} in the image, the set of restoration coefficients of {T′} is the same as that of {T}.
[0032] Furthermore, the example segmentation technology described in step S140 is used to detect {T} and mark road damage information, specifically including:
[0033] S1401, using an existing instance segmentation algorithm, identifying the location and area of the road damage area in each data sample in {T};
[0034] S1402, let T′ i′ There is q i′ diseased areas, and the area of the kth diseased area of the i′th data sample in {T} is s″ i′,k , where k∈{1,2…q i′}. Let the total diseased area of the i′th data sample in {T} be The total area of the diseased pixel points of the data samples in {T} is
[0035] Furthermore, the step S150 of processing the road damage area information of each picture in {T} based on the damage area restoration coefficient of each picture in {T} specifically includes:
[0036] For the kth diseased area of the i′th data sample in {T}, its actual area
[0037]
[0038] Therefore, the actual disease area set of each disease area of all data samples in {T} is obtained by calculation using the formula
[0039] The beneficial effects of the present invention are as follows: the present invention provides a road damage image scale matching method based on average grayscale gradient, wherein the method collects a set of grayscale image data samples of equal height reference in the field as a standard reference set and calculates its grayscale gradient average value; obtains a set of grayscale image data samples to be restored in the same section of road, cleans the samples and calculates the grayscale gradient average value of each image therein; calculates the damage area recovery coefficient for each image in the set to be restored; utilizes an instance segmentation algorithm to identify the damage area information in the set to be restored, and processes the data samples in the set to be restored based on the damage area recovery coefficient. This invention facilitates post-processing of road traffic damage detection results, reduces the error caused by carrying supplementary materials during actual repair work, and reduces the workload of staff. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The present invention will be further described below with reference to the accompanying drawings and examples.
[0041] Figure 1 This is a flow chart of a road damage image scale matching method based on average grayscale gradient provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0043] Example 1
[0044] like Figure 1 As shown, this embodiment 1 provides a road damage image scale matching method based on average grayscale gradient, and the method includes: proposing a solution to the road damage image scale matching problem.
[0045] Specifically, the method includes:
[0046] S110: Collect a set of contour reference grayscale image data samples {X} on-site, calculate the grayscale gradient average of {X}, and mark the disease information of each image in {X}.
[0047] Specifically, a set of reference grayscale image data samples of the same height is collected on site, and the total area of the diseased area in all data samples of the reference set is recorded as A. trueAll ; The total gray gradient average value y′ of the reference set is calculated by formula (1)(2)(3); the total pixel point disease area A of the reference set is obtained by computer annotation compAll .
[0048] S120: Obtain other grayscale image data sample sets to be restored in the same section of road, record the data sample set after sample cleaning as {T}, and calculate the grayscale gradient average value of each image in {T} using formulas (4) and (5).
[0049] Specifically, a set of grayscale image data samples to be restored in the same section of road is collected by field photography, and the set to be restored is cleaned; and a set C of grayscale gradient average values of each data sample in the set to be restored is obtained by calculation.
[0050] S130: Compare the grayscale gradient average value of each image in {T} with the grayscale gradient average value of {X} to obtain the disease area recovery coefficient of each image in {T}.
[0051] Specifically, the recovery coefficient set F of each data sample in the set to be recovered is calculated using formula (6).
[0052] S140: Use instance segmentation technology to detect {T} and mark road damage information.
[0053] Specifically, {T} is input into the existing instance segmentation model, and the location and area of the road damage area in each data sample in {T} are output, and the total area set S of the diseased pixel points in the data samples in {T} is output. beComp .
[0054] S150: Processing the road damage area information of each picture in {T} according to the damage area restoration coefficient of each picture in {T}.
[0055] Specifically, through S beComp , F, A trueAll , A compAll The actual area set S of each diseased area in {T} is calculated using formula (7): final .
[0056] In summary, the present invention provides a road damage image scale matching method based on average grayscale gradient. The method collects a set of grayscale image data samples of equal height reference in the field as a standard reference set and calculates its grayscale gradient average value. The method also obtains a set of grayscale image data samples to be restored from the same section of road, cleans the samples, and calculates the grayscale gradient average value for each image therein. The method also calculates the damage area recovery coefficient for each image in the set to be restored. The method utilizes an instance segmentation algorithm to identify the damage area information in the set to be restored and processes the data samples in the set to be restored based on the damage area recovery coefficient. This invention facilitates post-processing of road traffic damage detection results, reduces the error caused by carrying supplementary materials during actual repair work, and reduces the workload of personnel.
[0057] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of this invention. The technical scope of this invention is not limited to the contents of the specification and must be determined according to the scope of the claims.
Claims
1. A road damage image scale matching method based on average grayscale gradient, characterized by: The following steps are involved: S110, collecting a set of contour reference grayscale image data samples {X} on-site, calculating the grayscale gradient average of {X}, and marking the disease information of each image in {X}; S120, obtaining other grayscale image data sample sets to be restored in the same section of road, recording the data sample set after sample cleaning as {T}, copying {T} and recording it as {T′}; calculating the grayscale gradient average of each image in {T}; S130, comparing the grayscale gradient average of each image in {T} with the grayscale gradient average of {X} to obtain the disease area restoration coefficient of each image in {T}; S140, using instance segmentation technology to detect {T} and mark road damage information; including: S1401 uses an existing instance segmentation algorithm to identify the location and area of the road damage area in each data sample in {T}; S1402 Set T′ i′ There is q i′ diseased areas, and the area of the kth diseased area of the i′th data sample in {T} is s″ i′,k , where k∈{1,2…q i′ }; record the total disease area of the i′th data sample in {T} The total area of the diseased pixel points of the data samples in {T} is S150, processing the road damage area information of each image in {T} according to the damage area restoration coefficient of each image in {T}; including: For the kth diseased area of the i′th data sample in {T}, its actual area Therefore, the formula is used to calculate the actual disease area set of each disease area of all data samples in {T} 2. The road damage image scale matching method based on average grayscale gradient according to claim 1, characterized in that: Step S110 includes: S1101 collects n road damage grayscale image data with pixel number w*h taken by a camera at a fixed height, denoted as {X}; the current image is denoted as X i , where i∈{1,2…n}; the total area of the disease in each road disease grayscale image data in {X} is measured on the spot, and the disease area of the i-th road disease grayscale image data is recorded as s i , so the total disease area set S True ={s1,s2…s n }, the total area is recorded as A trueAll ; S1102 copies {X} and records it as {X′}; perform binarization on each grayscale image in {X′}, set the threshold to t, where t∈{1,2…254}; set the grayscale value of pixels in the image with grayscale values greater than or equal to t to 255, and set the grayscale value of pixels in the image with grayscale values less than t to 0; set the pixel point in the ath row and bth column in the image to p a,b , the gray value is g a,b , where a∈{2,3…h-1}, b∈{2,3…w-1}; for pixel p a,b , remember p a,b The grayscale gradient value is Traverse all p in the image a,b , get the gray gradient average of the current image Calculate the total gray gradient average of {X′} Since {X′} and {X} have no difference in the image, the total gray gradient average of {X′} can be regarded as the total gray gradient average of {X}; S1103: Mark the pixel area of each road disease grayscale image data in {X} on the computer, and the total area of the diseased pixel points in the i-th road disease grayscale image data is recorded as s′ i The total area of the diseased pixels of n road disease grayscale image data is recorded as set S comp ={s′1,s′2…s′ n }, the total diseased area of {X} is recorded as A compAll .
3. The road damage image scale matching method based on average grayscale gradient according to claim 1, characterized in that: Step S120 includes: S1201 collects grayscale image data sample sets of other road damage samples to be restored on the same highway, cleans the sample set to be restored, and filters out data samples with large external interference and discards them. The cleaned data sample set is denoted as {T}, and the total number of samples is n′; S1202 copies {T} and records it as {T′}; performs binarization on each grayscale image in {T′} and records the current image as T′ i′ , where i′∈{1,2…n′}, the grayscale value of the pixel in the image whose grayscale value is greater than or equal to t is set to 255, and the grayscale value of the pixel in the image whose grayscale value is less than t is set to 0; for pixel e a,b , remember e a,b Grayscale gradient value Traverse all e in the image a,b , get the gray gradient average of the current image Let {T}’s gray gradient average value set C = {y″1,y″2…y″ n Since there is no difference between {T′} and {T} in the image, the total grayscale gradient average of {T′} can be regarded as the total grayscale gradient average of {T}.
4. The road damage image scale matching method based on average grayscale gradient according to claim 1, characterized in that: Step S130 includes: Let the recovery coefficient of the i′th data sample in {T′} be Then let the set of restitution coefficients of {T′} be F={μ1,μ2…μ n′ }, since there is no difference between {T′} and {T} in the image, the set of restoration coefficients of {T′} is the same as that of {T}.
Citation Information
Patent Citations
Pavement disease edge detection method and device
CN106874882A
Image three-color segmentation-based smoke concentration identification method
CN108550159A