CN116091495B - Accurate detection method for road diseases - Google Patents
Accurate detection method for road diseases Download PDFInfo
- Publication number
- CN116091495B CN116091495B CN202310362065.XA CN202310362065A CN116091495B CN 116091495 B CN116091495 B CN 116091495B CN 202310362065 A CN202310362065 A CN 202310362065A CN 116091495 B CN116091495 B CN 116091495B
- Authority
- CN
- China
- Prior art keywords
- sub
- area
- region
- edge
- areas
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 201000010099 disease Diseases 0.000 title claims abstract description 24
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 title claims abstract description 24
- 238000001514 detection method Methods 0.000 title claims abstract description 18
- 238000000354 decomposition reaction Methods 0.000 claims abstract description 57
- 238000000034 method Methods 0.000 claims abstract description 56
- 230000011218 segmentation Effects 0.000 claims description 18
- 230000007547 defect Effects 0.000 claims description 16
- 238000003708 edge detection Methods 0.000 claims description 6
- 108700007698 Genetic Terminator Regions Proteins 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 7
- 230000008569 process Effects 0.000 description 14
- 238000003709 image segmentation Methods 0.000 description 12
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000018109 developmental process Effects 0.000 description 3
- 238000003672 processing method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000002035 prolonged effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/761—Proximity, similarity or dissimilarity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/588—Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to a road disease accurate detection method, which comprises the following steps: the method comprises the steps of obtaining a road gray image, carrying out multiple decomposition on the road gray image, obtaining similarity between sub-areas of the same father node after each decomposition, carrying out sub-area combination according to the similarity, obtaining combination necessity between the sub-areas of different father nodes, carrying out sub-area combination according to the combination necessity, setting a decomposition cut-off condition, obtaining a stop sub-area according to the decomposition cut-off condition, obtaining a suspected crack area according to the stop sub-area, obtaining cracks according to edges in the suspected crack area, and realizing accurate detection of road crack diseases. The method has better dividing effect on the road gray image, the obtained crack disease area is more accurate, and the algorithm operation efficiency is high.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a road disease accurate detection method.
Background
The good transportation environment is an important precondition for the rapid development of cities, and in the modern economic development process, the transportation condition becomes an important factor for restricting the development of a region. Because the speed of the automobile running on the expressway is high, the impact on the expressway is large, so that the expressway needs to be maintained regularly, road surface diseases are found out in time and repaired, the road surface health of the expressway is ensured, and the service life is prolonged. The most common pavement damage is cracks generated on the pavement, and the safety of the pavement is greatly affected.
The method for detecting pavement diseases mainly comprises the steps of shooting pavement images by a machine vision method, and dividing and identifying the anomalies generated on the pavement to obtain anomaly areas. The existing image segmentation algorithm is more, wherein the region splitting and merging algorithm has a good image segmentation effect, and abnormal regions in the image can be clearly segmented. However, when the algorithm is used for image segmentation, all sub-areas are obtained by continuously splitting from the whole image, and then foreground areas are combined to obtain a foreground target to be segmented, so that the extraction of the target is realized. The algorithm needs to be iterated for a plurality of times, the calculated amount is large, and the boundary of the region can be possibly damaged by splitting, so that the image segmentation effect is not ideal.
Disclosure of Invention
The invention provides a precise detection method for road diseases, which aims to solve the existing problems.
The invention relates to a precise detection method for road diseases, which adopts the following technical scheme:
the embodiment of the invention provides a precise detection method for road diseases, which comprises the following steps:
acquiring a road gray level image; decomposing the road gray level image for a plurality of times to obtain a plurality of subareas;
after each decomposition, acquiring the similarity between every two adjacent sub-areas of the same father node according to the gray value of the pixel point in the sub-area, combining the two sub-areas with the maximum similarity of the same father node into a sub-area, and combining the other two sub-areas of the same father node into a sub-area; performing edge detection on each sub-area, acquiring edges in each sub-area, taking any edge point on the edges in the sub-area as a target edge point, and acquiring a reference line of the target edge point; acquiring the edge trend of each sub-area according to the length of the reference line of each edge point on the edge of each sub-area; acquiring the minimum circumscribed rectangle of the edge in each sub-area, acquiring the merging necessity of adjacent sub-areas of different father nodes according to the edge trend of the sub-area and the minimum circumscribed rectangle of the edge in the sub-area, and taking the sub-area as a terminator area when the merging necessity of one sub-area and all sub-areas which are adjacent and not belonging to the same father node is smaller than or equal to a first preset threshold value; merging two adjacent child areas of different father nodes with merging necessity larger than a first preset threshold value into a child area as a decomposition child area; when the number of the pixel points contained in the decomposition sub-area is smaller than a second preset threshold value, taking the decomposition sub-area as a terminator area, otherwise, decomposing the decomposition sub-area again;
taking the terminator region with the number of the contained pixel points being greater than or equal to a second preset threshold value as a suspected crack region; and acquiring cracks according to the edges in the suspected crack areas, and realizing accurate detection of road crack defects.
Preferably, the step of obtaining the similarity between every two adjacent sub-areas of the same parent node according to the gray value of the pixel point in the sub-area includes the following specific steps:
the sub-region decomposed from the same region is used as the sub-region of the same father node, any father node is used as the target father node, and when the a-th sub-region and the b-th sub-region of the target father node are adjacent, the similarity of the a-th sub-region and the b-th sub-region of the target father node is obtainedThe method comprises the following steps:
wherein the method comprises the steps ofSimilarity of the a-th sub-region and the b-th sub-region of the target father node; />The average value of gray values of all pixel points in the a-th sub-area of the target father node; />All images in child region b of target father nodeThe average value of gray values of the pixels; />A, a target father node is the a sub-area of the a-th>Gray values of the individual pixels; />Is the b th sub-area of the target father node>Gray values of the individual pixels; />The number of pixel points in each sub-region under the target father node;is an exponential function with a natural constant as a base; />As a function of the minimum value; />As a function of the maximum value.
Preferably, the step of obtaining the reference line of the target edge point includes the following specific steps:
and (3) taking the passing target edge point as a tangent line of the edge, taking the passing target edge point as a perpendicular line of the tangent line of the target edge point, acquiring the edge point closest to the target edge point on the perpendicular line, and taking the connecting line from the closest edge point to the target edge point as a reference line of the target edge point.
Preferably, the step of obtaining the edge trend of each sub-area according to the length of the reference line of each edge point on the edge of each sub-area includes the following specific steps:
wherein,,edge trend for the c-th sub-region; />The number of edge points in the c-th sub-region; />The length of the reference line which is the jth edge point in the c-th sub-area; />The length of the reference line for the (j+1) th edge point in the (c) th sub-region; />The length of the reference line for the (j+2) th edge point in the (c) th sub-region; />As a function of the maximum value.
Preferably, the acquiring the merging necessity of the adjacent sub-areas of different father nodes according to the edge trend of the sub-area and the minimum circumscribed rectangle of the edge in the sub-area comprises the following specific steps:
when the c-th sub-area and the d-th sub-area are adjacent but do not belong to the same parent node, the merging necessity of the c-th sub-area and the d-th sub-areaThe method comprises the following steps:
wherein,,representing the merging necessity of the c-th sub-region and the d-th sub-region, wherein the c-th sub-region and the d-th sub-region are adjacent but do not belong to the same parent node; />For the edge trend of the c-th sub-area, < >>Edge trend for the d-th sub-region; />A slope of a line between a centroid of a smallest bounding rectangle for an edge in the c-th sub-region and a centroid of a smallest bounding rectangle for an edge in the d-th sub-region; />Slope of longer side of minimum bounding rectangle for edge in the c-th sub-area; />Slope of longer side of minimum bounding rectangle for edge in the d-th sub-area; />Is an absolute value symbol; />Is an exponential function with a base of natural constant.
Preferably, the step of obtaining the crack region according to the edge in the suspected crack region includes the following specific steps:
and (3) performing edge detection on the suspected crack region, performing Hough space straight line detection on the detected edge, taking the suspected crack region as a lane line region if two parallel straight lines are obtained, taking the suspected crack region as a crack region if the detected straight lines are not parallel, and performing threshold segmentation on the crack region to obtain the crack.
The technical scheme of the invention has the beneficial effects that: when the image is segmented by the existing quadtree decomposition method, the defect area is damaged by multiple segmentation iterations, and the finally obtained defect area is probably not a complete area, so that the sub-areas are segmented and combined according to the similarity among the sub-areas in the process of decomposing by the quadtree decomposition method, and therefore, a plurality of irrelevant areas are removed in the process of each segmentation. When the region merging is carried out, the subregions under the same father node are required to be merged, and the subregions under different father nodes are required to be merged, so that the loss of a defect region during image segmentation is avoided, the segmented region is a complete disease region, whether the downward segmentation is required to be continued or not is judged by setting a decomposition cut-off condition, and the operation time of an algorithm is greatly reduced by merging while segmenting; when the method and the device are used for carrying out region merging, the influence of road textures per se is eliminated according to the characteristics of the cracks, so that the obtained region can accurately and completely represent the cracks or the lane lines of the road after continuous segmentation and merging, and further, the accurate crack region is obtained by distinguishing the cracks from the lane lines, so that the loss of the crack region during image segmentation is avoided, and the road gray level image segmentation effect is better.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart showing the steps of a method for accurately detecting road diseases according to the present invention;
FIG. 2 is an exploded view of the quad-tree of the present invention;
FIG. 3 is a schematic diagram of a crack shape according to the present invention;
fig. 4 is a reference line schematic diagram of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the road disease accurate detection method according to the invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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.
The specific scheme of the accurate road disease detection method provided by the invention is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for accurately detecting a road disease according to an embodiment of the invention is shown, the method includes the following steps:
s001, acquiring a road surface image, and preprocessing the road surface image.
It should be noted that, the main purpose of the embodiment of the present invention is to segment the road surface image, so that the image of the expressway needs to be acquired.
In the embodiment of the invention, the vehicle-mounted camera is used for shooting road conditions, wherein the vehicle-mounted camera is a high-definition CCD camera, and the shot image is used as a road surface image. In order to facilitate subsequent processing, the road surface image is subjected to graying processing to obtain a road gray image. In the embodiment of the present invention, the adopted graying processing method is an average graying method, which is a known technology, and the embodiment of the present invention is not described in detail, and in other embodiments, an operator may select the graying processing method according to actual implementation situations.
Thus, a road gradation image is obtained.
S002, decomposing the road gray level image to obtain a subarea.
It should be noted that the main purpose of the embodiments of the present invention is to divide the damaged area of the road surface. The image segmentation is to divide the image into a plurality of specific areas with unique properties and extract the interested target, and the area merging method is to merge two adjacent areas meeting the merging standard into one area according to a certain merging standard on a plurality of small areas obtained by a certain initialization segmentation method until all the adjacent areas meeting the merging standard are merged. After the image is segmented, the over-segmentation phenomenon may exist in the result, and the adjacent areas can be further combined according to the combination criterion by utilizing the area combination method, so that the over-segmentation problem is solved. The quadtree decomposition method can segment the image well, but in the process of segmentation, whether the image is decomposed downwards is judged according to the relation between the neighborhoods, and the more the image is decomposed, the greater the degree of decomposition of the details of the image is, the more the details possibly lost in the process of merging are, so that when the image is decomposed, the obtaining of proper decomposition conditions is very necessary. In the embodiment of the invention, crack defects on a road surface are to be segmented, texture information such as lane lines and the like also exist on the road surface, and the texture information can influence the judgment of segmentation cut-off conditions when a road gray level image is segmented, so that the embodiment of the invention removes the influence of the lane lines in the decomposition process according to the difference of the crack defects and the lane line characteristics. Meanwhile, as the gray level change of the pavement is single, the algorithm is excessively segmented in the actual decomposition process due to the fact that the similarity among a plurality of neighborhoods is large when the pavement is decomposed, so that proper cut-off conditions are needed to be obtained according to the texture features in the image.
It should be further noted that, the quadtree decomposition is to equally divide the image into four equal sub-areas, equally divide the sub-areas into four equal sub-areas again, recursively reduce the above steps until the tree level satisfies the cut-off condition, and stop dividing the image, and a schematic diagram of decomposing the road gray image by using the quadtree is shown in fig. 2. When the quadtree decomposition is carried out, each decomposition is carried out by equally dividing one region to obtain four sub-regions with the same size. In the embodiment of the invention, a crack defect area is called as a foreground area, when the quadtree decomposition is carried out, the subareas obtained by each division are judged, whether the subareas continue to decompose downwards is determined according to the similarity of the subareas and other subareas, meanwhile, abnormal subareas are obtained, and the foreground area, namely the crack defect area, can be obtained by carrying out inter-area combination on the abnormal subareas.
In the embodiment of the invention, the road gray image is decomposed for the first time by using a quadtree decomposition method to obtain 4 sub-areas.
So far, a sub-region is acquired.
S003, obtaining the similarity between the subregions of the same father node, and merging the subregions according to the similarity.
It should be noted that when dividing the road gray scale by the quadtree decomposition method, the sub-regions obtained by each decomposition will distribute different image detail information, in the process of continuing the downward decomposition, the details in the image will be decomposed in each sub-region, in order to reduce the process of decomposing the road gray scale image, in the embodiment of the invention, whether the sub-regions continue to decompose is determined according to the change relationship between the sub-regions in the result of each decomposition, if the sub-regions obtained by multiple decomposition have more image details and obvious differences from the sub-regions under the same father node, then the sub-regions do not need to continue the downward decomposition because the sub-regions already contain abundant texture information, and the integrity of the texture information will be destroyed by continuing the downward decomposition. By analyzing the texture information contained in each sub-region, each reserved sub-region (i.e. the sub-region which is not decomposed downwards any more) is finally obtained to contain abundant detail information, so that the road gray image segmentation is more accurate. The quadtree decomposition method may divide the real disease area into a plurality of small blocks, resulting in missed detection, because the shape and size of the disease are related to the road gray image resolution, and if the real disease area is divided into a plurality of small blocks, the subsequent algorithm may not recognize the disease as a whole. Therefore, in the embodiment of the invention, after each decomposition of the road gray image by using the quadtree decomposition method, the sub-regions are combined and divided according to the obtained similarity between the sub-regions.
In the embodiment of the present invention, four equal sub-areas obtained by dividing the same area are referred to as sub-areas of the same parent node, for example, step S002 decomposes the road gray image for the first time by using a quadtree decomposition method to obtain 4 sub-areas, where the 4 sub-areas are the same parent node, and the parent node is the road gray image. If the 4 sub-regions are decomposed for the second time, 16 smaller sub-regions are obtained, wherein each 4 of the 16 smaller sub-regions are the same father node, and the 4 sub-regions before the second decomposition are respectively corresponding to each other.
Taking any father node which is decomposed last time as a target father node, calculating the similarity between every two adjacent sub-areas of the target father node, for example, the similarity between the (a) th sub-area and the (b) th sub-area of the target father node are adjacentThe method comprises the following steps:
wherein the method comprises the steps ofSimilarity of the a-th sub-region and the b-th sub-region of the target father node; />The average value of gray values of all pixel points in the a-th sub-area of the target father node; />The average value of gray values of all pixel points in the b-th sub-area of the target father node; />A, a target father node is the a sub-area of the a-th>Gray values of the individual pixels; />Is the b th sub-area of the target father node>Gray values of the individual pixels; />The number of pixel points in each sub-region under the target father node;is an exponential function with a natural constant as a base; />As a function of the minimum value; />Is a maximum function;representing the average gray scale difference value of the two sub-regions, the more similar the two sub-regions are when the average gray scale difference value of the two sub-regions is smaller; />A, a target father node is the a sub-area of the a-th>Difference between gray value of each pixel point and average gray value,/and the like>Is the b th sub-area of the target father node>When the difference between the gray value of each pixel point and the average gray value is utilized to divide each time by using the quadtree decomposition method, the number of the pixels contained in all the subareas obtained by dividing the same area is the same, namely the number of the pixels contained in all the subareas of the target father node is the same, so that the difference between the corresponding pixels of the two subareas of the target father node and the average gray value is compared to reflect the twoIn order to avoid the situation that the numerator is larger than the denominator during comparison under the gray level change condition of pixel points in the sub-region, the embodiment of the invention utilizesSelect->And->Smaller values are used as molecules, withSelect->And->The larger value is taken as denominator whenThe larger, i.e. the closer to 1, the more similar the ith pixel point of the a-th sub-area and the corresponding pixel point in the b-th sub-area of the target father node are, when +>The larger, i.e., the closer to 1, the more similar the a-th and b-th child regions of the target parent node are.
Similarly, the similarity between every two adjacent sub-areas of the same father node is obtained, the two sub-areas with the largest similarity are combined into one sub-area, and the other two sub-areas are combined into one sub-area. It should be noted that, each time the quadtree decomposition method is divided, one region is divided into four sub-regions, and two sub-regions with the greatest similarity among the four sub-regions may be regions with crack defects or regions with no defects, so that two adjacent sub-regions with the greatest similarity are combined, and the loss of the defect region can be avoided by combining the other two sub-regions.
Thus, the merging of the sub-areas of the same father node is realized.
S004, acquiring the merging necessity among the subregions of different father nodes, and merging the subregions according to the merging necessity.
It should be noted that, in step S003, the sub-areas under the same parent node are merged to avoid the loss of the defect area, but in the process of decomposing the sub-areas downwards for many times, the same crack defect area is necessarily divided, at this time, the sub-areas under different parent nodes are further required to be judged, and whether the sub-areas of different parent nodes need to be merged is determined according to the judging result. In the decomposition process, influence factors such as lane lines exist, so that the influence factors such as the lane lines are removed when the sub-areas of different father nodes are combined, and repeated segmentation of the areas is avoided. The sub-areas of different father nodes need to consider the position relation of the sub-areas and the pixel change in the sub-areas when the sub-areas are combined, and as the influence factors such as lane lines exist, the sub-areas of different father nodes need to be combined according to the similarity degree between the sub-areas and the texture change between the two sub-areas.
In the embodiment of the invention, the canny edge detection is carried out on each sub-area in the road gray image obtained after the combination in the step S003, and the edge in each sub-area is obtained.
The edges in the sub-areas may be edges of cracks, and may be edges of a lane line or a texture of the road itself. The texture characteristics of the crack and the road are similar, and when the quadtree is decomposed, the crack may be divided into different sub-areas, the crack is extensible, the extensibility of the edge of the crack is reflected in the trend of the crack, the texture of the road is tiny and overlapped with the crack, so that the sub-areas of different father nodes can be combined according to the distribution of the edge in the different sub-areas, and the integrity of the crack is ensured. Since the crack is usually a central region and the two ends will become finer and finer, referring to fig. 3, when the two sub-regions divide the same crack, the crack edge detected in space is continuous although in different sub-regions, and the trend of the smallest circumscribed rectangle of the edge is the same as that of the edge, it can be determined whether the two sub-regions need to be merged by analyzing the trend of the edge in the two sub-regions of different parent nodes.
In the embodiment of the present invention, the pixel points on the edges in each sub-area are referred to as edge points, any one edge point on the edges in the sub-area is used as a target edge point, the target edge point is used as a tangent line of the edge, the target edge point is used as a tangent line of the target edge point, the target edge point is used as a straight line perpendicular to the tangent line of the target edge point, the edge point closest to the target edge point on the straight line is obtained, and the line from the edge point to the target edge point is used as a reference line of the target edge point, and the reference line schematic diagram is shown in fig. 4. And similarly, acquiring a reference line of each edge point on the edge in each sub-area.
Acquiring edge profiles of each sub-region based on reference lines of each edge point on the edge in each sub-region, e.g. edge profile of the c-th sub-regionThe method comprises the following steps:
wherein,,edge trend for the c-th sub-region; />The number of edge points in the c-th sub-region; />The length of the reference line which is the jth edge point in the c-th sub-area; />The length of the reference line for the (j+1) th edge point in the (c) th sub-region; />The length of the reference line for the (j+2) th edge point in the (c) th sub-region; />As a function of the maximum value,is indicated at->And->The middle is larger and is used for preventing the denominator from being 0; />The difference in the lengths of the reference lines representing the two consecutive edge points of the c-th sub-region, since the crack is continuously varied and the length of the reference line of the edge point on the corresponding crack is also continuously varied, when the edge in the sub-region is a crack or a lane line>Approaching 1.
And acquiring the minimum circumscribed rectangle of the edge in each sub-area. If the road gray image is decomposed for the first time by the quadtree decomposition method, all the sub-regions in the road gray image are the same parent node, and at this time, the sub-regions are decomposed for the second time directly by the quadtree decomposition method without calculating the necessity of merging. Otherwise, for any two adjacent sub-areas not belonging to the same parent node, calculating the merging necessity of the two sub-areas, such as the merging necessity of the c-th sub-area and the d-th sub-area adjacent to each other but not belonging to the same parent nodeThe method comprises the following steps:
wherein,,representing the merging necessity of the c-th sub-region and the d-th sub-region, wherein the c-th sub-region and the d-th sub-region are adjacent but do not belong to the same parent node; />For the edge trend of the c-th sub-area, < >>Edge trend for the d-th sub-region; />A slope of a line between a centroid of a smallest bounding rectangle for an edge in the c-th sub-region and a centroid of a smallest bounding rectangle for an edge in the d-th sub-region; />Slope of longer side of minimum bounding rectangle for edge in the c-th sub-area; />Slope of longer side of minimum bounding rectangle for edge in the d-th sub-area; />Is an absolute value symbol; />Is an exponential function with a natural constant as a base; since the edge trend of the subregion is more than 1 when the edge in the subregion is a crack or lane line, the +.>To measure whether the edges in the c-th sub-area and the d-th sub-area are cracks or lane lines, when +.>The closer to 0, the more likely the edges in the c-th and d-th sub-regions are cracks or lane lines; since the same crack or lane line distributed in the two sub-areas is distributed along the trend of the crack or lane line corresponding to the minimum bounding rectangle, the more similar the slope of the center of mass of the minimum bounding rectangle of the edge in the two sub-areas is to the slope of the longer side of the minimum bounding rectangle, which means that the more likely the crack or lane line is distributed in the two sub-areas, the greater the merging necessity of the two sub-areas.
It should be noted that, when the necessity of merging two adjacent sub-areas of the same parent node is greater, the two sub-areas are more likely to contain the same crack or lane line, and the two sub-areas are more likely to need to be merged.
In the embodiment of the invention, the merging necessity is larger than the first preset threshold valueTwo adjacent sub-regions that do not belong to the same parent node but are merged into one sub-region. Wherein the first preset threshold value in the embodiment of the invention +.>In other embodiments, the practitioner can set the first preset threshold according to the actual implementation>Is a value of (2).
Therefore, the merging necessity between adjacent subareas of different father nodes is acquired, and the subareas are merged according to the merging necessity, so that the integrity of the subsequently obtained cracks is ensured.
S005, setting a decomposition cut-off condition to complete the decomposition of the road gray image.
If the sub-region in the road gradation image is decomposed at all times, the cracks are continuously divided and combined, the calculation amount is large, and the final obtained result is affected, so that it is necessary to set an appropriate decomposition cut-off condition.
It should be further noted that, any one of the sub-regions before merging in step S004 is taken as the target sub-region, when the merging necessity of the target sub-region and a sub-region adjacent to the target sub-region but not belonging to the same parent node is greater than the first preset threshold valueWhen the method is used, the more likely that the target subarea and the subarea adjacent to the target subarea but not belonging to the same father node contain the same crack or lane line, the combined subarea contains the crack and possibly contains other road textures and the like, at the moment, the combined subarea needs to be continuously decomposed by using a quadtree decomposition method, and the steps S003 and S004 are continuously iterated on the subarea obtained by continuously decomposing, so that other road textures are removed, and only the crack is reserved. When the merging necessity of all sub-areas adjacent to the target sub-area and not belonging to the same parent node and the target sub-area is smaller than a first preset threshold value, the target sub-area and any adjacent sub-area are not included with the same crack, at the moment, the target sub-area is not required to be decomposed, and if the target sub-area is larger, the target sub-area includes a complete crack. Meanwhile, as the cracks and the lane lines are larger relative to the road texture, the smaller subareas can be considered to not contain the cracks, so that the smaller subareas are not decomposed downwards any more for reducing the iteration times.
In the embodiment of the invention, the set decomposition cut-off conditions are as follows:
1. before the sub-region merging in the step S003, when the merging necessity of the target sub-region and all sub-regions adjacent to the target sub-region and not belonging to the same parent node is smaller than or equal to a first preset threshold valueWhen the target subarea is decomposed, the target subarea is taken as a terminator subarea;
2. after the sub-region merging in the step S003, when the number of the pixel points contained in the sub-region is smaller than that of the second pixel pointsPreset threshold valueStopping the decomposition for the sub-region, taking the sub-region as a terminator region, wherein the second preset threshold +.>In other embodiments, the practitioner can set the second preset threshold +.>Is a value of (2).
If the sub-area does not meet any decomposition cut-off condition, decomposing the sub-area by using a quadtree, and executing the merging operation of the steps S003 and S004 and the decomposition operation of the step S005 according to the smaller sub-area obtained by decomposition, and continuously iterating the process until the iteration is stopped when all the sub-areas in the road gray image are not decomposed any more, namely, the iteration is stopped when all the sub-areas in the road gray image are stop sub-areas.
Thus, the resolution of the road gray level image is completed, and the road resolution image is obtained.
S006, obtaining crack defects.
It should be noted that, when the number of pixels of one terminator region in the road decomposition image is smaller than the second preset threshold valueWhen the sub-region does not contain cracks or lane lines, the number of pixels of one sub-region in the road decomposition image is greater than or equal to a second preset threshold value +.>When the sub-region is indicated to contain a crack or lane line. Since the lane lines are standard rectangles, the edges are standard straight lines, and the crack shapes are irregular compared with the lane lines, see fig. 3, the crack and the lane lines can be distinguished according to the shape of the edges.
In the embodiment of the invention, the road is decomposedThe number of pixel points in the image is larger than or equal to a second preset threshold valueIs used as a suspected crack region. And (3) carrying out canny edge detection on each suspected crack region, carrying out Hough space straight line detection on the edge detected by each suspected crack region, wherein if two parallel straight lines are obtained, the suspected crack region is a lane line region, and if the detected straight lines are not parallel, the suspected crack region is a crack region.
The crack area is subjected to threshold segmentation, pixel points with gray values smaller than the segmentation threshold are used as crack pixel points, and a connected domain formed by all the crack pixel points is an accurate crack, in the embodiment of the invention, the segmentation threshold for threshold segmentation is 20, and in other embodiments, an operator can set the segmentation threshold according to actual implementation conditions.
Thus, a crack region was obtained.
Through the steps, the accurate detection of road crack diseases is completed.
In the embodiment of the invention, the sub-areas are combined while being segmented according to the similarity among the sub-areas in the process of decomposing by using the quadtree decomposition method, so that a plurality of irrelevant areas are removed in the process of each segmentation. When the region merging is carried out, the subregions under the same father node are required to be merged, and the subregions under different father nodes are required to be merged, so that the loss of a defect region during image segmentation is avoided, the segmented region is a complete disease region, whether the downward segmentation is required to be continued or not is judged by setting a decomposition cut-off condition, and the operation time of an algorithm is greatly reduced by merging while segmenting; when the method and the device are used for carrying out region merging, the influence of road textures per se is eliminated according to the characteristics of the cracks, so that the obtained region can accurately and completely represent the cracks or the lane lines of the road after continuous segmentation and merging, and further, the accurate crack region is obtained by distinguishing the cracks from the lane lines, so that the loss of the crack region during image segmentation is avoided, and the road gray level image segmentation effect is better.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.
Claims (4)
1. The accurate detection method for the road diseases is characterized by comprising the following steps of:
acquiring a road gray level image; decomposing the road gray level image for a plurality of times to obtain a plurality of subareas;
after each decomposition, acquiring the similarity between every two adjacent sub-areas of the same father node according to the gray value of the pixel point in the sub-area, combining the two sub-areas with the maximum similarity of the same father node into a sub-area, and combining the other two sub-areas of the same father node into a sub-area; performing edge detection on each sub-area, acquiring edges in each sub-area, taking any edge point on the edges in the sub-area as a target edge point, and acquiring a reference line of the target edge point; acquiring the edge trend of each sub-area according to the length of the reference line of each edge point on the edge of each sub-area; acquiring the minimum circumscribed rectangle of the edge in each sub-area, acquiring the merging necessity of adjacent sub-areas of different father nodes according to the edge trend of the sub-area and the minimum circumscribed rectangle of the edge in the sub-area, and taking the sub-area as a terminator area when the merging necessity of one sub-area and all sub-areas which are adjacent and not belonging to the same father node is smaller than or equal to a first preset threshold value; merging two adjacent child areas of different father nodes with merging necessity larger than a first preset threshold value into a child area as a decomposition child area; when the number of the pixel points contained in the decomposition sub-area is smaller than a second preset threshold value, taking the decomposition sub-area as a terminator area, otherwise, decomposing the decomposition sub-area again;
taking the terminator region with the number of the contained pixel points being greater than or equal to a second preset threshold value as a suspected crack region; obtaining cracks according to the edges in the suspected crack areas, and realizing accurate detection of road crack defects;
the step of obtaining the edge trend of each sub-area according to the length of the reference line of each edge point on the edge of each sub-area comprises the following specific steps:
wherein,,edge trend for the c-th sub-region; />The number of edge points in the c-th sub-region; />The length of the reference line which is the jth edge point in the c-th sub-area; />The length of the reference line for the (j+1) th edge point in the (c) th sub-region; />The length of the reference line for the (j+2) th edge point in the (c) th sub-region; />Is a maximum function;
the method for acquiring the merging necessity of adjacent sub-areas of different father nodes according to the edge trend of the sub-areas and the minimum circumscribed rectangle of the edges in the sub-areas comprises the following specific steps:
when the c-th sub-area and the d-th sub-area are adjacent but do not belong to the same parent node, the merging necessity of the c-th sub-area and the d-th sub-areaThe method comprises the following steps:
wherein,,representing the merging necessity of the c-th sub-region and the d-th sub-region, wherein the c-th sub-region and the d-th sub-region are adjacent but do not belong to the same parent node; />For the edge trend of the c-th sub-area, < >>Edge trend for the d-th sub-region; />A slope of a line between a centroid of a smallest bounding rectangle for an edge in the c-th sub-region and a centroid of a smallest bounding rectangle for an edge in the d-th sub-region; />Slope of longer side of minimum bounding rectangle for edge in the c-th sub-area;slope of longer side of minimum bounding rectangle for edge in the d-th sub-area; />Is an absolute value symbol; />Is an exponential function with a base of natural constant.
2. The method for precisely detecting the road diseases according to claim 1, wherein the step of obtaining the similarity between every two adjacent sub-areas of the same parent node according to the gray values of the pixel points in the sub-areas comprises the following specific steps:
the sub-region decomposed from the same region is used as the sub-region of the same father node, any father node is used as the target father node, and when the a-th sub-region and the b-th sub-region of the target father node are adjacent, the similarity of the a-th sub-region and the b-th sub-region of the target father node is obtainedThe method comprises the following steps:
wherein the method comprises the steps ofSimilarity of the a-th sub-region and the b-th sub-region of the target father node; />The average value of gray values of all pixel points in the a-th sub-area of the target father node; />The average value of gray values of all pixel points in the b-th sub-area of the target father node; />A, a target father node is the a sub-area of the a-th>Gray values of the individual pixels; />Is the b th sub-area of the target father node>Gray values of the individual pixels; />The number of pixel points in each sub-region under the target father node; />Is an exponential function with a natural constant as a base; />As a function of the minimum value; />As a function of the maximum value.
3. The method for precisely detecting the road fault according to claim 1, wherein the step of obtaining the reference line of the target edge point comprises the following specific steps:
and (3) taking the passing target edge point as a tangent line of the edge, taking the passing target edge point as a perpendicular line of the tangent line of the target edge point, acquiring the edge point closest to the target edge point on the perpendicular line, and taking the connecting line from the closest edge point to the target edge point as a reference line of the target edge point.
4. The method for precisely detecting the road damage according to claim 1, wherein the step of obtaining the crack according to the edge in the suspected crack region comprises the following specific steps:
and (3) performing edge detection on the suspected crack region, performing Hough space straight line detection on the detected edge, taking the suspected crack region as a lane line region if two parallel straight lines are obtained, taking the suspected crack region as a crack region if the detected straight lines are not parallel, and performing threshold segmentation on the crack region to obtain the crack.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310362065.XA CN116091495B (en) | 2023-04-07 | 2023-04-07 | Accurate detection method for road diseases |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310362065.XA CN116091495B (en) | 2023-04-07 | 2023-04-07 | Accurate detection method for road diseases |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116091495A CN116091495A (en) | 2023-05-09 |
CN116091495B true CN116091495B (en) | 2023-06-27 |
Family
ID=86199443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310362065.XA Active CN116091495B (en) | 2023-04-07 | 2023-04-07 | Accurate detection method for road diseases |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116091495B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117437248B (en) * | 2023-12-19 | 2024-03-08 | 中国海洋大学 | Disease area segmentation method for blueberry quality detection |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7031517B1 (en) * | 1998-10-02 | 2006-04-18 | Canon Kabushiki Kaisha | Method and apparatus for segmenting images |
CN103077536B (en) * | 2012-12-31 | 2016-01-13 | 华中科技大学 | Space-time mutative scale moving target detecting method |
CA3006240C (en) * | 2015-04-27 | 2022-12-13 | Wuhan Wuda Zoyon Science And Technology Co., Ltd. | A stepwise refinement detection method for pavement cracks |
CN110298802B (en) * | 2019-06-28 | 2021-07-02 | 广东诚泰交通科技发展有限公司 | Pavement crack detection method and device |
-
2023
- 2023-04-07 CN CN202310362065.XA patent/CN116091495B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN116091495A (en) | 2023-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108038883B (en) | Crack detection and identification method applied to highway pavement video image | |
CN106960208B (en) | Method and system for automatically segmenting and identifying instrument liquid crystal number | |
CN105784713B (en) | Sealing ring detection method of surface flaw based on machine vision | |
CN113109368B (en) | Glass crack detection method, device, equipment and medium | |
CN106780486B (en) | Steel plate surface defect image extraction method | |
CN114419025A (en) | Fiberboard quality evaluation method based on image processing | |
CN110163219B (en) | Target detection method based on image edge recognition | |
CN116091495B (en) | Accurate detection method for road diseases | |
CN114972326A (en) | Defective product identification method for heat-shrinkable tube expanding process | |
CN114723681A (en) | Concrete crack defect detection method based on machine vision | |
CN103543394A (en) | Discharge ultraviolet imaging quantization parameter extraction method of high-voltage electric equipment | |
CN113646801A (en) | Defect detection method and device for defect image and computer readable storage medium | |
CN114820625B (en) | Automobile top block defect detection method | |
CN111507971A (en) | Tunnel surface defect detection method | |
CN111754538B (en) | Threshold segmentation method for USB surface defect detection | |
CN113012124B (en) | Shoe print hole and embedded object feature detection and description method | |
CN109850518B (en) | Real-time mining adhesive tape early warning tearing detection method based on infrared image | |
CN113240623A (en) | Pavement disease detection method and device | |
CN108229473A (en) | Vehicle annual inspection label detection method and device | |
CN105447489A (en) | Character and background adhesion noise elimination method for image OCR system | |
CN112508913A (en) | Cable section edge detection method based on image detection | |
CN117094975A (en) | Method and device for detecting surface defects of steel and electronic equipment | |
CN116128873A (en) | Bearing retainer detection method, device and medium based on image recognition | |
Fang et al. | Towards real-time crack detection using a deep neural network with a Bayesian fusion algorithm | |
CN107301388A (en) | A kind of automatic vehicle identification method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |