Road disease duplicate removal method based on computer vision
Through multi-parameter comprehensive indicators, the misjudgment problem of repeated disease detection is solved, efficient road disease deduplication is achieved, and detection accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202510487019.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-11
AI Technical Summary
The existing road disease detection system based on deep learning is prone to misjudgment of repeated disease images during inspections, resulting in repeated detection and unnecessary maintenance work.
Multi-parameter comprehensive index is used to determine the similarity of the image, including clarity, contrast, resolution, angle and confidence parameters. By calculating the difference value of the comprehensive index and the threshold range, whether the disease is the same disease is determined, and the cutting steps of the disease image are combined to improve accuracy.
This greatly improves the accuracy of repeated inspections, avoids unnecessary maintenance work, and improves the detection effect and efficiency.
Smart Images

Figure CN120298724A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for removing duplicate disease images, and particularly to a method for removing duplicates of road diseases based on computer vision. Background Art
[0002] The discovery of road diseases is a crucial part of road maintenance. The workload of traditional manual road disease detection is huge and prone to errors. With the rapid development of deep learning technology, it has gradually been applied to the automatic identification and detection of road diseases to improve the accuracy and efficiency of road disease discovery. However, in actual applications, it is found that although the road disease system based on deep learning technology can accurately and efficiently identify road diseases, during road disease inspections, the same road diseases will be repeatedly collected by different inspection vehicles or the same inspection vehicle at different times. Over time, a large number of duplicate diseases will be generated. Submitting duplicate diseases to maintenance personnel will result in duplicate maintenance work, which greatly affects the construction plans and progress of maintenance personnel and reduces the efficiency of road maintenance. To prevent the generation of duplicate disease reminders, after detecting a disease image, the system needs to compare the disease image with previously detected disease images to determine whether it is a newly emerged road disease or a different image of the same disease detected previously. To detect whether a disease image is an image of the same disease, the existing method is to compare the images by comparing the similarity of a single index of the images to detect whether the two images are of the same disease. Due to the influence of environmental factors such as the angle and brightness during the shooting of disease images, this single-index comparison method is prone to misjudgment, resulting in the failure of duplicate detection. Summary of the Invention
[0003] To solve the technical problem of poor duplicate detection effect of the above single index, the present invention provides a method for removing duplicates of road diseases based on computer vision that uses a multi-parameter comprehensive index to determine the similarity of graphics to eliminate duplicate diseases and prevent duplicate disease reminders.
[0004] The method for removing duplicates of road diseases based on computer vision of the present invention includes the following steps; Step S1, obtain existing diseases with the same disease type and location as the road disease to be detected, denoted as potential duplicate diseases. If there are no potential duplicate diseases, determine that the road disease to be detected is a newly emerged road disease; otherwise, continue to determine whether each potential duplicate disease is duplicate with the road disease to be detected through the following steps; Step S2, respectively obtain the clarity parameter S1, contrast parameter S2, resolution parameter S3, angle parameter S4, and confidence parameter S5 of the disease to be detected and the potential duplicate diseases; Step S3, respectively obtain the comprehensive index P of the disease to be detected and the potential duplicate diseases according to the following formula; P = a1*S1 + a2*S2 + a3*S3 + a4*S4 + a5*S5; Among them, a1, a2, a3, a4, and a5 are the weight coefficients of the clarity parameter S1, the contrast parameter S2, the resolution parameter S3, the angle parameter S4, and the confidence parameter S5 respectively, and a1 + a2 + a3 + a4 + a5 = 1; Step S4: Obtain the comprehensive index difference △P between the disease to be detected and the potential repeated disease. If the comprehensive index difference between the two is within the threshold range, it is determined that the disease to be detected and the potential repeated disease are the same disease; otherwise, it is determined that the disease to be detected is a new road disease.
[0005] The advantage of this computer vision-based road disease duplicate removal method is that it combines the clarity parameter, contrast parameter, resolution parameter, angle parameter, and confidence parameter of the disease image to obtain the comprehensive indexes of the disease to be detected and the potential repeated disease, and determines whether the road disease to be detected and the potential repeated disease are different images of the same disease by comparing the difference between the two comprehensive indexes and the preset threshold range, so as to achieve the duplicate removal of road diseases and prevent the generation of repeated road disease reminders. Compared with the existing detection methods that use a single parameter to determine the repetition of road diseases, this road disease duplicate removal method greatly improves the accuracy and detection effect of repeated detection through the setting of multiple parameters such as clarity and contrast and their weight coefficients, and avoids unnecessary maintenance work.
[0006] Furthermore, for the computer vision-based road disease duplicate removal method of the present invention, before step S2, there is also a step of cropping the disease part in the disease to be detected and the potential repeated disease.
[0007] Cropping the disease part from the disease image before duplicate removal judgment can greatly improve the speed and accuracy of subsequent duplicate removal judgment.
[0008] Furthermore, for the computer vision-based road disease duplicate removal method of the present invention, the clarity parameter S1 is obtained by a clarity evaluation method based on a strong edge histogram, including the following steps; Generate a strong edge width histogram of the image; Obtain the clarity parameter S1 through the following expression; ; where w i is the width of each strong edge, w o is the minimum strong edge width, w e is the maximum strong edge width, d(w i )is the distance factor of the strong edge with width w i ,p(w i )is the strong edge probability of width w i ; where p(w i )and d(wi are obtained respectively by the following formulas; p(w i ) = n i / n; ; where w m is the strong edge width with the maximum probability, where n is the total number of strong edges, and n i represents the number of strong edges with width w i .
[0009] The clarity of the road disease images obtained by the inspection vehicle during driving is often not very high. Therefore, when removing duplicates, it is necessary to compare the clarity of road diseases. This clarity evaluation method based on the strong edge histogram obtains the strong edge probability of each strong edge width through the strong edge width histogram, and by setting the distance factor, enhances the distance factor of the strong edge width close to w m , weakens the distance factor of the strong edges at both ends of the histogram, and thus makes the obtained clarity parameter more reliable, thereby improving the credibility of the clarity parameter.
[0010] Furthermore, for the road disease duplicate removal method based on computer vision of the present invention, the contrast parameter S2 is obtained based on the normalized histogram, and includes the following steps; Obtain the normalized histogram of the picture by the following formula; ; where r k is the k-th level gray scale, n k is the number of pixels with gray scale value r k in the image, and M and N are the width and height of the image respectively; Obtain the mean value of the normalized histogram by the following formula; ; Obtain the variance of the normalized histogram by the following formula; ; Obtain the contrast parameter S2 by the formula S2 = 1 - δ.
[0011] Furthermore, for the road disease duplicate removal method based on computer vision of the present invention, the resolution parameter S3 is obtained by the formula S3 = min{1, (w / 100)*(h / 100)}, where w is the image width and h is the image height.
[0012] Furthermore, for the road disease duplicate removal method based on computer vision of the present invention, the angle parameter is obtained by the following method; Obtain the inclination angle of the disease by the formula θ = arctan(h / w), where w is the image width and h is the image height; Obtain the angle parameter S4 of the image by the formula S4 = 1 - |θ| / (π / 2).
[0013] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it specifically according to the content of the specification, the following uses the embodiments of the present invention to describe it in detail. Description of the Drawings
[0014] Figure 1 is a flowchart of a method for removing duplicate road diseases based on computer vision. Detailed Embodiments
[0015] The following combines the drawings and embodiments to further describe the detailed embodiments of the present invention in detail. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.
[0016] Embodiment 1: Refer to Figure 1 , the method for removing duplicate road diseases based on computer vision in this embodiment includes the following steps; Step S1, obtain existing diseases with the same disease type and location as the road disease to be detected, and record them as potential duplicate diseases. If there are no potential duplicate diseases, it is determined that the road disease to be detected is a new road disease. Otherwise, continue to judge whether each potential duplicate disease is the same as the road disease to be detected through the following steps; Step S2, respectively obtain the clarity parameter S1, contrast parameter S2, resolution parameter S3, angle parameter S4, and confidence parameter S5 of the disease to be detected and the potential duplicate diseases; Step S3, respectively obtain the comprehensive index P of the disease to be detected and the potential duplicate diseases according to the following formula; P = a1*S1 + a2*S2 + a3*S3 + a4*S4 + a5*S5; Among them, a1, a2, a3, a4, and a5 are the weight coefficients of the clarity parameter S1, contrast parameter S2, resolution parameter S3, angle parameter S4, and confidence parameter S5 respectively, and a1 + a2 + a3 + a4 + a5 = 1; Step S4, obtain the difference in comprehensive index ΔP between the disease to be detected and the potential duplicate disease. If the difference in comprehensive index between the two is within the threshold range, it is determined that the disease to be detected and the potential duplicate disease are the same disease. Otherwise, it is determined that the disease to be detected is a new road disease.
[0017] The advantages of the computer vision-based road disease duplicate removal method are as follows. It combines the clarity parameter, contrast parameter, resolution parameter, angle parameter, and confidence parameter of the disease pictures to obtain the comprehensive indicators of the diseases to be detected and potential duplicate diseases. By comparing the difference between the comprehensive indicators of the two and the preset threshold range, it determines whether the road disease to be detected and the potential duplicate disease are different images of the same disease, thus realizing the duplicate removal of road diseases and preventing the generation of duplicate road disease reminders. Compared with the existing detection methods that use a single parameter to determine the duplication of road diseases, this road disease duplicate removal method greatly improves the accuracy and detection effect of duplicate detection through the setting of multiple parameters such as clarity and contrast and their weight coefficients, and avoids unnecessary maintenance work.
[0018] Among them, the computer vision-based road disease detection method uses an in-vehicle intelligent inspection device and a road disease detection model trained based on YOLOv8 to perform real-time analysis on the collected road surface pictures, determine whether there are diseases on the current road surface and their disease types, and uses a GPS hardware module to timely obtain the GPS coordinate information of the current road surface diseases for subsequent disease reminder and duplicate removal.
[0019] Among them, the types of road surface diseases include cracking, block cracking, longitudinal cracking, transverse cracking, subsidence, rutting, waviness and heaving, potholes, looseness, bleeding, patching, etc.
[0020] In step S1, the specific method for obtaining the existing diseases with the same disease type and location as the road disease to be detected is described as follows.
[0021] According to the disease type ID and its GPS coordinate information of the road disease to be detected, query the disease database and conduct a preliminary comparison. If there is no existing disease in the disease database with the same disease type ID and GPS coordinates, it is determined that the road disease to be detected is a new road disease, and parameters such as its disease type ID, GPS coordinate information, disease location information (x, y, w, h), and disease confidence are written into the disease database; if there is an existing disease in the disease database with the same disease type ID and GPS coordinates, the diseased parts in the two pictures can be cropped out through relevant program modules, and multi-dimensional similarity comparison is performed on the pictures of the road disease to be detected and the potential duplicate disease through steps S2~S4 to determine whether they are duplicate road diseases.
[0022] In step S2, the clarity parameter S1 can be obtained through a clarity evaluation method based on a strong edge histogram, the contrast parameter S2 can be obtained through a contrast parameter evaluation method based on the image gray normalization histogram, the resolution parameter S3 and the angle parameter S4 can be obtained through the disease location information of the image, and the confidence parameter S5 of the disease is output by the computer vision-based road disease detection method.
[0023] In step S3, each weight coefficient can be manually set by an operator or trained through a model.
[0024] Preferably, before step S2, there is also a step of cropping the disease part in the disease to be detected and potential duplicate diseases.
[0025] Cropping the disease part from the disease image before duplicate removal judgment can greatly improve the speed and accuracy of subsequent duplicate removal judgment.
[0026] Preferably, the clarity parameter S1 is obtained through a clarity evaluation method based on a strong edge histogram, including the following steps; Generate a strong edge width histogram of the image; Obtain the clarity parameter S1 through the following expression; ; where w i is the width of each strong edge, w o is the minimum strong edge width, w e is the maximum strong edge width, d(w i ) is the distance factor of the strong edge with width w i , and p(w i ) is the strong edge probability of width w i ; where p(w i ) and d(w i ) are obtained through the following formulas respectively; p(w i ) = n i / n; ; where w m is the strong edge width with the maximum probability, where n is the total number of strong edges, and n i represents the number of strong edges with width w i ;
[0027] The clarity of the road disease images obtained by the inspection vehicle during driving is often not very high. Therefore, when removing duplicates, it is necessary to compare the clarity of the road diseases. This clarity evaluation method based on a strong edge histogram obtains the strong edge probability of each strong edge width through the strong edge width histogram, and through the setting of the distance factor, enhances the distance factor of the strong edges close to the width w m , weakens the distance factor of the strong edges at both ends of the histogram, and thus makes the obtained clarity parameter more reliable, thereby improving the credibility of the clarity parameter.
[0028] Among them, the strong edge width histogram can calculate the image gradient through operators such as Sobel and Canny, and screen strong edge pixels through threshold setting to achieve strong edge detection. For the detected strong edges, count their diffusion widths to generate the strong edge width histogram. In this embodiment, the image gradient is obtained through the sobel operator, as follows.
[0029] For the image f, use the Sobel operator to obtain its gradient images G x and G y ; , ; Then use the set threshold to perform binary processing on the gradient image. The threshold is as follows: , ; Among them, M and N are the width and height of the image respectively. After that, perform binary processing on the horizontal gradient map G x to obtain the horizontal gradient binary image B x , and perform binary processing on the vertical gradient G y to obtain the horizontal gradient binary image B y . The formula is as follows: ,
[0030] Since the width of the strong edge is not fixed, it is necessary to count the distribution of strong edges w i with different widths. The probability p(w i ) = n i / n; i / n; Considering that after noise and invalid edge information are blurred, too large and too small strong edge widths will be generated in the histogram, thus affecting its true evaluation effect. Therefore, it is necessary to enhance the influence of the peak region of the histogram on the result and weaken the contribution of both ends of the histogram to the result. So introduce the distance factor d(w i ); Finally, by introducing the distance factor, the expression of the clarity evaluation value is: .
[0031] Preferably, the contrast parameter S2 is obtained based on the normalized histogram, including the following steps; Obtain the normalized histogram of the picture from the following formula; ; Among them, r k is the k-th level gray scale, and n k is the number of pixels with gray scale value r kThe number of pixels, where M and N are the width and height of the image respectively; Obtain the mean value of the normalized histogram by the following formula; ; Obtain the variance of the normalized histogram by the following formula; ; Obtain the contrast parameter S2 by the formula S2 = 1 - δ.
[0032] Preferably, the resolution parameter S3 is obtained by the formula S3 = min{1, (w / 100)*(h / 100)}, where w is the width of the image and h is the height of the image.
[0033] In the above formula, 100 is the set standard resolution 100*100; Preferably, the angle parameter is obtained by the following method; Obtain the inclination angle of the disease by the formula θ = arctan(h / w), where w is the width of the image and h is the height of the image; Obtain the angle parameter S4 of the image by the formula S4 = 1 - |θ| / (π / 2).
[0034] The above is only the preferred embodiment of the present invention, which is used to assist those skilled in the art to implement the corresponding technical solutions, and does not limit the protection scope of the present invention. The protection scope of the present invention is defined by the appended claims. It should be noted that for those of ordinary skill in the art, based on the technical solutions of the present invention, several equivalent improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention. At the same time, it should be understood that although this specification is described according to the above embodiments, not each embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions of each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for removing duplicate road diseases based on computer vision, where the road diseases are road disease images obtained by a road disease detection method based on computer vision, and the method is characterized in that: The method for removing duplicate road diseases based on computer vision includes the following steps; Step S1: Obtain existing diseases with the same disease type and location as the road disease to be detected, denoted as potential duplicate diseases. If there are no potential duplicate diseases, determine that the road disease to be detected is a new road disease. Otherwise, continue to determine whether each potential duplicate disease is the same as the road disease to be detected through the following steps; Step S2: Obtain the clarity parameter S1, contrast parameter S2, resolution parameter S3, angle parameter S4, and confidence parameter S5 of the disease to be detected and the potential duplicate diseases respectively; Step S3: Obtain the comprehensive index P of the disease to be detected and the potential duplicate diseases respectively according to the following formula: P = a1*S1 + a2*S2 + a3*S3 + a4*S4 + a5*S5; Wherein, a1, a2, a3, a4, and a5 are the weight coefficients of the clarity parameter S1, contrast parameter S2, resolution parameter S3, angle parameter S4, and confidence parameter S5 respectively, and a1 + a2 + a3 + a4 + a5 = 1; Step S4: Obtain the difference in comprehensive index ΔP between the disease to be detected and the potential duplicate disease. If the difference in comprehensive index between the two is within the threshold range, determine that the disease to be detected and the potential duplicate disease are the same disease. Otherwise, determine that the disease to be detected is a new road disease.
2. The method for removing duplicate road diseases based on computer vision according to claim 1, wherein: Before step S2, there is also a step of cropping the disease part in the disease to be detected and the potential duplicate diseases.
3. The method for removing duplicate road diseases based on computer vision according to claim 1, wherein: The clarity parameter S1 is obtained through a clarity evaluation method based on a strong edge histogram, including the following steps; Generate the strong edge width histogram of the image; Obtain the clarity parameter S1 through the following expression; ; Among them, w i is the width of each strong edge, w o is the minimum strong edge width, w e is the maximum strong edge width, d(w i ) is the distance factor of the strong edge with width w i , and p(w i ) is the strong edge probability of width w i ; where p(w i ), and d(w i ) are obtained respectively by the following formulas; p(w i )=n i / n; ; Among them, w m is the width of the strong edge with the maximum probability, where n is the total number of strong edges, and n i represents the number of strong edges with width w i .
4. The method for removing duplicate road diseases based on computer vision according to claim 1, characterized in that: The contrast parameter S2 is obtained based on the normalized histogram, including the following steps; Obtain the normalized histogram of the picture according to the following formula; ; where r k is the k-th gray level, and n k is the number of pixels with gray level r k in the image, and M and N are the width and height of the image, respectively; Obtain the mean of the normalized histogram according to the following formula; ; Obtain the variance of the normalized histogram according to the following formula; ; Obtain the contrast parameter S2 from the formula S2 = 1 - δ.
5. The method for removing duplicate road diseases based on computer vision according to claim 1, characterized in that: The resolution parameter S3 is obtained from the formula S3 = min{1, (w / 100)*(h / 100)}, where w is the image width and h is the image height.
6. The method for removing duplicate road diseases based on computer vision according to claim 1, characterized in that: The angle parameter is obtained through the following method; Obtain the tilt angle of the disease from the formula θ = arctan(h / w), where w is the image width and h is the image height; Obtain the angle parameter S4 of the image from the formula S4 = 1 - |θ| / (π / 2).
Citation Information
Cited By
Cable bridge intelligent inspection method and system based on unmanned aerial vehicle multi-mode perception
CN121187313A