CN104636750B - A kind of pavement crack recognizer and system based on double scale clustering algorithms - Google Patents
A kind of pavement crack recognizer and system based on double scale clustering algorithms Download PDFInfo
- Publication number
- CN104636750B CN104636750B CN201410787530.5A CN201410787530A CN104636750B CN 104636750 B CN104636750 B CN 104636750B CN 201410787530 A CN201410787530 A CN 201410787530A CN 104636750 B CN104636750 B CN 104636750B
- Authority
- CN
- China
- Prior art keywords
- crack
- crack area
- minimum
- area
- clustered
- 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.)
- Expired - Fee Related
Links
- 239000011159 matrix material Substances 0.000 claims abstract description 31
- 238000000034 method Methods 0.000 claims description 11
- 238000001914 filtration Methods 0.000 claims description 10
- 238000000605 extraction Methods 0.000 claims description 6
- 238000012512 characterization method Methods 0.000 claims description 3
- 230000004323 axial length Effects 0.000 claims 2
- 238000006243 chemical reaction Methods 0.000 claims 1
- 238000012545 processing Methods 0.000 abstract description 12
- 238000001514 detection method Methods 0.000 abstract description 8
- 238000010845 search algorithm Methods 0.000 abstract description 5
- 238000011160 research Methods 0.000 abstract description 3
- 230000000694 effects Effects 0.000 description 5
- 238000012423 maintenance Methods 0.000 description 4
- 238000009825 accumulation Methods 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000000739 chaotic effect Effects 0.000 description 1
- 238000007621 cluster analysis Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000002068 genetic effect Effects 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/285—Selection of pattern recognition techniques, e.g. of classifiers in a multi-classifier system
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
本发明公开了一种基于双尺度聚类的路面裂缝识别算法及系统:计算机读取三维图像数据矩阵,得到二值化图像;按照从上到下、从左到右的顺序,采用八邻域搜索算法扫描二值化图像对应的数据矩阵,得到标记后的裂缝区域;在裂缝区域对应的椭圆,使用双尺度聚类算法进行裂缝聚类得到聚类后的裂缝区域;使用聚类后的裂缝区域所在的最小外接椭圆作为路面裂缝。本发明复杂度低、运行时间短、无需人工参与。将杂乱的裂缝数据局域使用线性拟合、模型构建的思想表征成为规则的、确定的数学表达式,从而降低的数据处理的复杂度;只需输入采集到的路面裂缝数据即可完成路面裂缝的检测,因此该算法检测效率高、速度快,具有一定的研究价值。
The invention discloses a pavement crack recognition algorithm and system based on dual-scale clustering: the computer reads the three-dimensional image data matrix to obtain a binarized image; according to the sequence from top to bottom and from left to right, eight neighborhoods are used The search algorithm scans the data matrix corresponding to the binary image to obtain the marked crack area; in the ellipse corresponding to the crack area, use the dual-scale clustering algorithm to perform crack clustering to obtain the clustered crack area; use the clustered crack area The smallest circumscribing ellipse where the region is located is used as the pavement crack. The invention has low complexity, short running time and no manual participation. The idea of linear fitting and model building is used to represent the messy crack data locally into a regular and definite mathematical expression, thereby reducing the complexity of data processing; only need to input the collected pavement crack data to complete the pavement crack Therefore, the algorithm has high detection efficiency and fast speed, and has certain research value.
Description
技术领域technical field
本专利属于道路工程领域,特别是指一种基于双尺度聚类算法的路面裂缝识别算法。This patent belongs to the field of road engineering, and in particular refers to a pavement crack identification algorithm based on a dual-scale clustering algorithm.
背景技术Background technique
传统的路面裂缝识别技术都是紧扣裂缝进行一系列的图像处理并不断使其效果不断优化,便于目标提取,即该类算法主要致力于裂缝特征的提取上,而很少考虑实际需要以及处理后的路面裂缝是否真正对应于同一条实际路面裂缝。其一,传统的裂缝特征提取算法使得预处理后的路面裂缝二值图相对于原始裂缝而言总是不同程度的缩小实际路面裂缝区域,更甚者经过多次处理后使得实际中同一条路面裂缝在图像上呈现断裂现象,断裂后的一条裂缝如果不进行及时的发现并修补极有可能被当作两条甚至更多的裂缝处理,由于路面裂缝识别过程是一个串行的处理过程,其错误存在累积现象,这样使得后续处理中裂缝定位等工作基于前端错误的结果进行,必然产生错误的裂缝识别结果,大大提高了裂缝识别的错误率,即存在“不补则错”的现象。其二,就实际而言,路面裂缝检测的目的在于准确分类裂缝、准确定位裂缝以及裂缝实际区域的定位,从而为公路养护部门提供可靠的数据,以利于其进行公路养护管理。The traditional pavement crack recognition technology is to carry out a series of image processing closely on the cracks and continuously optimize the effect to facilitate target extraction, that is, this type of algorithm is mainly dedicated to the extraction of crack features, and rarely considers the actual needs and processing. Whether the subsequent pavement cracks really correspond to the same actual pavement crack. First, the traditional crack feature extraction algorithm makes the preprocessed pavement crack binary image always reduce the actual pavement crack area to varying degrees compared with the original crack, and what's more, after multiple processing, the actual pavement crack area is reduced to a certain extent. Cracks appear to be fractured on the image. If a crack is not discovered and repaired in time, it is very likely to be treated as two or more cracks. Since the pavement crack identification process is a serial process, its There is a phenomenon of accumulation of errors, which makes the work of crack location in subsequent processing based on the results of front-end errors, which will inevitably produce wrong crack identification results, which greatly increases the error rate of crack identification, that is, there is a phenomenon of "if you don't make up, you will make mistakes". Second, in practice, the purpose of pavement crack detection is to accurately classify cracks, accurately locate cracks, and locate the actual area of cracks, so as to provide reliable data for road maintenance departments to facilitate road maintenance management.
聚类算法用于图像分割领域具有很大的应用前景。其不仅在处理大量数据方面具有很大的优势,且具有优良的可扩展性,便于从不同的角度上发现新的研究方法。不同的聚类算法按其聚类准则的不同,可分为“硬”聚类,和“软”聚类。就简单的“硬”聚类而言,令集合C表示图像灰度值数据集,对其进行聚类分析相当于将其按一定的准则分割为子区域c1,c2.......ck,,k为类别数。使得子区域满足条件:非空性:;完整性:c1∪c2∪c3∪…∪ck=C,聚类算法实质是对原始数据的再分配,通过挖掘数据内部结构,不断寻找更加优化的聚类算法,从而使得再分配后的数据体现某种内部一致性,这种一致性的体现通常又由特定的准则函数衡量,使用不同的准则函数将得到不同的结果,优化准则函数便是优化聚类算法的一个方向。常用的聚类算法有分层聚类算法、混合解析模式查询算法、最近邻域聚类算法、模糊聚类算法、人工神经网络聚类算法、遗传聚类算法等。纵观这些聚类算法,其核心在于“距离”的表示,不同准则下的“距离”体现不同的聚类效果,当然,对于不同的数据集合相应的选取不同的准则才能达到较为理想的效果,因此,“距离”的定义尤为关键。同时,就路面裂缝检测而言,聚类算法在该领域的鲜有应用,且仅有的应有也只是局限于路面裂缝图像的分割,并没有进行裂缝区域定位方面的检测。Clustering algorithms have great application prospects in the field of image segmentation. It not only has great advantages in processing large amounts of data, but also has excellent scalability, which is convenient for discovering new research methods from different perspectives. Different clustering algorithms can be divided into "hard" clustering and "soft" clustering according to their different clustering criteria. As far as simple "hard" clustering is concerned, let the set C represent the image gray value data set, and cluster analysis on it is equivalent to dividing it into sub-regions c 1 , c 2 ..... ..c k ,, k is the number of categories. Make the subregion satisfy the condition: non-emptiness: ;Completeness: c 1 ∪c 2 ∪c 3 ∪…∪c k =C, the essence of clustering algorithm is to redistribute the original data. The allocated data embodies some kind of internal consistency, which is usually measured by a specific criterion function. Using different criterion functions will result in different results. Optimizing the criterion function is one direction of optimizing the clustering algorithm. Commonly used clustering algorithms include hierarchical clustering algorithm, hybrid analytical mode query algorithm, nearest neighbor clustering algorithm, fuzzy clustering algorithm, artificial neural network clustering algorithm, genetic clustering algorithm, etc. Looking at these clustering algorithms, the core lies in the expression of "distance". The "distance" under different criteria reflects different clustering effects. Of course, for different data sets, different criteria can be selected accordingly to achieve a more ideal effect. Therefore, the definition of "distance" is particularly critical. At the same time, as far as pavement crack detection is concerned, clustering algorithms are rarely used in this field, and the only application is limited to the segmentation of pavement crack images, and there is no detection of crack area location.
发明内容Contents of the invention
针对以上路面裂缝识别技术存在的问题,本发明提出基于双尺度聚类的路面裂缝识别算法,采用“先分后聚”的思想,即先裂缝进行小块区域划分局部研究,然后使用优化中心距离以及角度差的双尺度聚类准则对小块断裂裂缝进行双尺度聚类,最后使用最小外接椭圆模型表征裂缝,实现裂缝的定位以及区域的界定,达到路面裂缝的识别。不仅避免了使用计算流形距离造成的数据量大、复杂度高带来的实现困难,且达到了使用流形距离聚类带来的优点。Aiming at the problems existing in the above pavement crack identification technology, the present invention proposes a pavement crack identification algorithm based on dual-scale clustering, adopting the idea of "dividing first and then clustering", that is, performing local research on the cracks first, and then using the optimized center distance And the dual-scale clustering criterion of angle difference is used for dual-scale clustering of small fracture cracks. Finally, the minimum circumscribed ellipse model is used to characterize the cracks, so as to realize the location of cracks and the definition of regions, so as to identify pavement cracks. It not only avoids the implementation difficulties caused by the large amount of data and high complexity caused by calculating the manifold distance, but also achieves the advantages brought by the use of manifold distance clustering.
为了达到上述目的,本发明采用如下的技术方案:In order to achieve the above object, the present invention adopts following technical scheme:
一种基于双尺度聚类的路面裂缝识别算法,包括如下步骤:A pavement crack identification algorithm based on dual-scale clustering, comprising the following steps:
步骤1:计算机读取三维图像数据矩阵,对三维图像数据矩阵进行滤波处理得到滤波后的三维图像数据矩阵,然后将其转换成灰度图像,并对该灰度图像使用Otsu算法进行二值化处理,得到二值化图像;Step 1: The computer reads the three-dimensional image data matrix, performs filtering processing on the three-dimensional image data matrix to obtain the filtered three-dimensional image data matrix, and then converts it into a grayscale image, and uses the Otsu algorithm to binarize the grayscale image Process to obtain a binarized image;
步骤2:按照从上到下、从左到右的顺序,采用八邻域搜索算法扫描步骤1得到的二值化图像对应的数据矩阵,得到标记后的裂缝区域,并对每个裂缝区域使用最小外接椭圆进行表征(即使用最小外接椭圆将裂缝区域圈在其内);Step 2: In the order from top to bottom and from left to right, use the eight-neighborhood search algorithm to scan the data matrix corresponding to the binary image obtained in step 1 to obtain the marked crack area, and use The minimum circumscribing ellipse is used for characterization (that is, the crack area is enclosed by the minimum circumscribing ellipse);
步骤3:在裂缝区域对应的椭圆,使用双尺度聚类算法进行裂缝聚类,得到聚类后的裂缝区域;Step 3: In the ellipse corresponding to the crack area, use the dual-scale clustering algorithm to cluster the cracks to obtain the clustered crack area;
步骤4:使用聚类后的裂缝区域所在的最小外接椭圆作为路面裂缝。Step 4: Use the smallest circumscribing ellipse where the clustered crack area is located as the pavement crack.
进一步的,其特征在于,所述步骤2具体包含如下步骤:Further, it is characterized in that the step 2 specifically includes the following steps:
步骤21:按照从上到下、从左到右的顺序扫描滤波后的三维图像数据矩阵;依次以每个数据点作为中心,判断中心点的八邻域是否均为裂缝点,如果是,则八邻域范围内的点属于以该数据点为中心点的基本单元区域,并将每个基本单元区域顺次编号(进行标记),每个基本单元区域均作为裂缝区域;Step 21: Scan the filtered 3D image data matrix in order from top to bottom and from left to right; take each data point as the center in turn, and judge whether the eight neighborhoods of the center point are crack points, and if so, then The points within the eight neighborhoods belong to the basic unit area with the data point as the center point, and each basic unit area is numbered (marked) in sequence, and each basic unit area is used as a crack area;
步骤22:对编号i的裂缝区域中的所有数据点进行线性拟合,得到拟合直线其中,i=1,2,3…;ni为编号i的裂缝区域包含的数据点个数;求出该裂缝区域在对应的拟合直线上截取的线段长度,记为ai;然后计算该裂缝区域内所有数据点到对应的拟合直线的距离,将距离的最大值记为bi,计算ai与水平方向的夹角,记为θi;Step 22: Perform linear fitting on all data points in the fracture area with number i to obtain a fitted straight line Among them, i=1,2,3...; n i is the number of data points contained in the crack area of number i; find out the length of the line segment intercepted by the crack area on the corresponding fitting straight line, and record it as a i ; then calculate The distance between all the data points in the fracture area and the corresponding fitting straight line, the maximum value of the distance is recorded as b i , and the angle between a i and the horizontal direction is calculated, which is recorded as θ i ;
步骤23:将每个裂缝区域的参数ai、bi和θi分别作为对应的椭圆的长轴、短轴以及偏转角度,得到每个裂缝区域对应的最小外接椭圆。Step 23: Taking the parameters a i , b i and θ i of each crack area as the major axis, minor axis and deflection angle of the corresponding ellipse, respectively, to obtain the minimum circumscribed ellipse corresponding to each crack area.
进一步的,所述步骤3具体包含如下步骤:Further, the step 3 specifically includes the following steps:
步骤31:对于步骤2得到的所有裂缝区域,选取裂缝区域对应的最小外接椭圆中长轴最长的椭圆的中心作为当前聚类中心;Step 31: For all the crack regions obtained in step 2, select the center of the ellipse with the longest major axis among the smallest circumscribed ellipses corresponding to the crack region as the current clustering center;
步骤32:选取当前聚类中心对应的裂缝区域之外的所有裂缝区域中编号最小的裂缝区域所在的最小外接椭圆,将其作为待聚类目标;Step 32: Select the smallest circumscribing ellipse where the fracture region with the smallest number among all fracture regions other than the fracture region corresponding to the current clustering center is selected as the target to be clustered;
步骤33:计算待聚类目标的中心到当前聚类中心的距离以及两中心的水平夹角差;Step 33: Calculate the distance from the center of the target to be clustered to the current cluster center and the horizontal angle difference between the two centers;
步骤34:判断步骤33得到的距离以及水平夹角差是否满足如下准则函数,若不满足,则转至步骤37,如果满足,则执行步骤35;Step 34: Judging whether the distance obtained in step 33 and the horizontal angle difference satisfy the following criterion function, if not, go to step 37, and if so, execute step 35;
准则函数:J=(a0<O0Oi)&&(Δθoi<δ)Criterion function: J=(a 0 <O 0 O i )&&(Δθ oi <δ)
其中,a0为当前聚类中心的所代表的最小外接椭圆的长轴长,O0Oi为待聚类目标的中心到当前聚类中心的距离,Δθoi为待聚类目标与当前聚类中心的水平夹角差,δ1为正常数,取0~45°;Among them, a 0 is the major axis length of the smallest circumscribing ellipse represented by the current clustering center, O 0 O i is the distance from the center of the target to be clustered to the current clustering center, Δθ oi is the distance between the target to be clustered and the current clustering center The horizontal angle difference of the class center, δ1 is a normal number, taking 0-45°;
步骤35:将该待聚类目标归为当前聚类中心所在的类,将该类中包含的所有椭圆使用一个新的最小外接椭圆进行表征(即将所有椭圆使用一个最小外接椭圆圈在内),计算该新的最小外接椭圆的中心、长轴、短轴以及偏转角,并将该新的最小外接椭圆的中心作为当前聚类中心;Step 35: classify the object to be clustered into the class where the current cluster center is located, and use a new minimum circumscribed ellipse to characterize all ellipses contained in the class (that is, use a minimum circumscribed ellipse for all ellipses), Calculate the center, major axis, minor axis and deflection angle of the new minimum circumscribed ellipse, and use the center of the new minimum circumscribed ellipse as the current clustering center;
步骤36:判断是否还有未归类的裂缝区域,若有,则继续选取下一个最小编号代表的最小外接椭圆作为待聚类目标,并返回步骤33;若没有,执行步骤38;Step 36: Determine whether there are unclassified crack regions, if so, continue to select the smallest circumscribing ellipse represented by the next smallest number as the target to be clustered, and return to step 33; if not, execute step 38;
步骤37:将当前聚类中心归为一新类,返回31,否则,执行步骤38;Step 37: classify the current cluster center into a new class, return to 31, otherwise, execute step 38;
步骤38:结束。Step 38: End.
进一步的,所述步骤1中,对三维图像数据矩阵进行滤波处理采用中值滤波算法,对灰度图像进行二值化处理采用Otsu算法。Further, in the step 1, the median filtering algorithm is used for filtering the three-dimensional image data matrix, and the Otsu algorithm is used for binarizing the grayscale image.
本发明的另一个目的在于,提供一种基于双尺度聚类的路面裂缝识别系统,该系统包括如下依次相连接的模块:Another object of the present invention is to provide a pavement crack identification system based on dual-scale clustering, which system includes the following modules connected in sequence:
图像二值化模块,用以完成如下功能:The image binarization module is used to complete the following functions:
计算机读取三维图像数据矩阵,对三维图像数据矩阵进行滤波处理得到滤波后的三维图像数据矩阵,然后将其转换成灰度图像,并对该灰度图像使用Otsu算法进行二值化处理,得到二值化图像;The computer reads the three-dimensional image data matrix, performs filtering processing on the three-dimensional image data matrix to obtain the filtered three-dimensional image data matrix, and then converts it into a grayscale image, and uses the Otsu algorithm to binarize the grayscale image to obtain binarized image;
裂缝区域标记模块,用以完成如下功能:The crack area marking module is used to complete the following functions:
按照从上到下、从左到右的顺序,采用八邻域搜索算法扫描步骤1得到的二值化图像对应的数据矩阵,得到标记后的裂缝区域,并对每个裂缝区域使用最小外接椭圆进行表征;According to the order from top to bottom and from left to right, the eight-neighborhood search algorithm is used to scan the data matrix corresponding to the binary image obtained in step 1 to obtain the marked fracture area, and use the minimum circumscribed ellipse for each fracture area To characterize;
裂缝聚类模块,用以在裂缝区域对应的椭圆,使用双尺度聚类算法进行裂缝聚类,得到聚类后的裂缝区域;The fracture clustering module is used for the ellipse corresponding to the fracture area, and uses the dual-scale clustering algorithm to perform fracture clustering to obtain the clustered fracture area;
路面裂缝提取模块,用以将聚类后的裂缝区域所在的最小外接椭圆作为路面裂缝。The pavement crack extraction module is used to use the smallest circumscribing ellipse where the clustered crack area is located as a pavement crack.
进一步的,所述裂缝区域标记模块用以实现以下流程的功能:Further, the fracture area marking module is used to realize the following functions:
步骤21:按照从上到下、从左到右的顺序扫描滤波后的三维图像数据矩阵;依次以每个数据点作为中心,判断中心点的八邻域是否均为裂缝点,如果是,则八邻域范围内的点属于以该数据点为中心点的基本单元区域,并将每个基本单元区域顺次编号(进行标记),每个基本单元区域均作为裂缝区域;Step 21: Scan the filtered 3D image data matrix in order from top to bottom and from left to right; take each data point as the center in turn, and judge whether the eight neighborhoods of the center point are crack points, and if so, then The points within the eight neighborhoods belong to the basic unit area with the data point as the center point, and each basic unit area is numbered (marked) in sequence, and each basic unit area is used as a crack area;
步骤22:对编号i的裂缝区域中的所有数据点进行线性拟合,得到拟合直线其中,i=1,2,3…;ni为编号i的裂缝区域包含的数据点个数;求出该裂缝区域在对应的拟合直线上截取的线段长度,记为ai;然后计算该裂缝区域内所有数据点到对应的拟合直线的距离,将距离的最大值记为bi,计算ai与水平方向的夹角,记为θi;Step 22: Perform linear fitting on all data points in the fracture area with number i to obtain a fitted straight line Among them, i=1,2,3...; n i is the number of data points contained in the crack area of number i; find out the length of the line segment intercepted by the crack area on the corresponding fitting straight line, and record it as a i ; then calculate The distance between all the data points in the fracture area and the corresponding fitting straight line, the maximum value of the distance is recorded as b i , and the angle between a i and the horizontal direction is calculated, which is recorded as θ i ;
步骤23:将每个裂缝区域的参数ai、bi和θi分别作为对应的椭圆的长轴、短轴以及偏转角度,得到每个裂缝区域对应的最小外接椭圆。Step 23: Taking the parameters a i , b i and θ i of each crack area as the major axis, minor axis and deflection angle of the corresponding ellipse, respectively, to obtain the minimum circumscribed ellipse corresponding to each crack area.
进一步的,所述裂缝聚类模块用以实现如下流程的功能:Further, the fracture clustering module is used to realize the following process functions:
步骤31:对于步骤2得到的所有裂缝区域,选取裂缝区域对应的最小外接椭圆中长轴最长的椭圆的中心作为当前聚类中心;Step 31: For all the crack regions obtained in step 2, select the center of the ellipse with the longest major axis among the smallest circumscribed ellipses corresponding to the crack region as the current clustering center;
步骤32:选取当前聚类中心对应的裂缝区域之外的所有裂缝区域中编号最小的裂缝区域所在的最小外接椭圆,将其作为待聚类目标;Step 32: Select the smallest circumscribing ellipse where the fracture region with the smallest number among all fracture regions other than the fracture region corresponding to the current clustering center is selected as the target to be clustered;
步骤33:计算待聚类目标的中心到当前聚类中心的距离以及两中心的水平夹角差;Step 33: Calculate the distance from the center of the target to be clustered to the current cluster center and the horizontal angle difference between the two centers;
步骤34:判断步骤33得到的距离以及水平夹角差是否满足如下准则函数,若不满足,则转至步骤37,如果满足,则执行步骤35;Step 34: Judging whether the distance obtained in step 33 and the horizontal angle difference satisfy the following criterion function, if not, go to step 37, and if so, execute step 35;
准则函数:J=(a0<O0Oi)&&(Δθoi<δ)Criterion function: J=(a 0 <O 0 O i )&&(Δθ oi <δ)
其中,a0为当前聚类中心的所代表的最小外接椭圆的长轴长,O0Oi为待聚类目标的中心到当前聚类中心的距离,Δθoi为待聚类目标与当前聚类中心的水平夹角差,δ1为正常数,取0~45°;Among them, a 0 is the major axis length of the smallest circumscribing ellipse represented by the current clustering center, O 0 O i is the distance from the center of the target to be clustered to the current clustering center, Δθ oi is the distance between the target to be clustered and the current clustering center The horizontal angle difference of the class center, δ1 is a normal number, taking 0-45°;
步骤35:将该待聚类目标归为当前聚类中心所在的类,将该类中包含的所有椭圆使用一个新的最小外接椭圆进行表征(即将所有椭圆使用一个最小外接椭圆圈在内),计算该新的最小外接椭圆的中心、长轴、短轴以及偏转角,并将该新的最小外接椭圆的中心作为当前聚类中心;Step 35: classify the object to be clustered into the class where the current cluster center is located, and use a new minimum circumscribed ellipse to characterize all ellipses contained in the class (that is, use a minimum circumscribed ellipse for all ellipses), Calculate the center, major axis, minor axis and deflection angle of the new minimum circumscribed ellipse, and use the center of the new minimum circumscribed ellipse as the current clustering center;
步骤36:判断是否还有未归类的裂缝区域,若有,则继续选取下一个最小编号代表的最小外接椭圆作为待聚类目标,并返回步骤33;若没有,执行步骤38;Step 36: Determine whether there are unclassified crack regions, if so, continue to select the smallest circumscribing ellipse represented by the next smallest number as the target to be clustered, and return to step 33; if not, execute step 38;
步骤37:将当前聚类中心归为一新类,返回31,否则,执行步骤38;Step 37: classify the current cluster center into a new class, return to 31, otherwise, execute step 38;
步骤38:结束。Step 38: End.
进一步的,所述图像二值化模块中,对三维图像数据矩阵进行滤波处理采用中值滤波算法,对灰度图像进行二值化处理采用Otsu算法。Further, in the image binarization module, the median filtering algorithm is used for filtering the three-dimensional image data matrix, and the Otsu algorithm is used for the binarization processing of the grayscale image.
本发明提出的路面裂缝识别技术具有如下优点The pavement crack identification technology proposed by the present invention has the following advantages
1、只需输入采集到的路面裂缝数据即可完成路面裂缝的检测,因此算法计算简单、运行时间短,适合在实时系统中采用。1. The detection of pavement cracks can be completed only by inputting the collected pavement crack data, so the algorithm is simple to calculate and has a short running time, which is suitable for use in real-time systems.
2、无需人工参与,克服了人工路面裂缝检测具有的劳动强度大、移植性差、工作效率低和滤波效果较差的缺点。2. It does not require manual participation, and overcomes the shortcomings of manual pavement crack detection, such as high labor intensity, poor portability, low work efficiency and poor filtering effect.
3、在基于数字图像处理技术的基础上,利用聚类算法处理大数据的独特优势,从全新的视角综合分析路面裂缝图像,完成裂缝的双尺度聚类算法识别。3. On the basis of digital image processing technology, use the unique advantages of clustering algorithm to process big data, comprehensively analyze pavement crack images from a new perspective, and complete the dual-scale clustering algorithm identification of cracks.
4、通过建立裂缝区域数学模型的方法,将杂乱无章的路面裂缝区域表示为数学公式可以具体表示的式子,便于使用数学技术分析。为路面的养护管理提供有力的信息支持,提高了公路养护和管理水平。4. Through the method of establishing a mathematical model of the crack area, the chaotic pavement crack area is expressed as a formula that can be specifically expressed by mathematical formulas, which is convenient for analysis using mathematical techniques. It provides powerful information support for the maintenance and management of the road surface, and improves the level of road maintenance and management.
附图说明Description of drawings
图1是本发明的基于双尺度聚类的路面裂缝识别算法的流程图。FIG. 1 is a flow chart of the dual-scale clustering-based pavement crack identification algorithm of the present invention.
图2是使用本发明对三种裂缝分别进行处理的结果。其中,(a)、(d)、(g)分别为原始横向裂缝、原始纵向裂缝和原始网状裂缝;(b)、(e)、(h)依次为(a)、(d)、(g)的裂缝基本单元;(c)、(f)、(i)依次为(a)、(d)、(g)通过本发明的算法处理后的结果。Fig. 2 is the result of using the present invention to treat three kinds of cracks respectively. Among them, (a), (d), (g) are the original transverse cracks, original longitudinal cracks and original network cracks; (b), (e), (h) are (a), (d), ( The crack basic unit of g); (c), (f), and (i) are the results of (a), (d), and (g) processed by the algorithm of the present invention in turn.
图3是本发明的基于双尺度聚类的路面裂缝识别系统的示意图。Fig. 3 is a schematic diagram of the pavement crack identification system based on dual-scale clustering of the present invention.
以下结合实例说明本发明的路面裂缝识别技术的实施效果:The implementation effect of the pavement crack identification technology of the present invention is illustrated below in conjunction with examples:
具体实施方式Detailed ways
参见图1-图3,本发明的基于双尺度聚类算法的路面裂缝识别算法,具体包括如下步骤:Referring to Fig. 1-Fig. 3, the pavement crack recognition algorithm based on dual-scale clustering algorithm of the present invention specifically includes the following steps:
步骤1:计算机读取三维图像数据矩阵,对三维图像数据矩阵采用中值滤波算法进行滤波处理,得到滤波后的三维图像数据矩阵,然后将其转换成灰度图像,并对该灰度图像使用Otsu算法进行二值化处理,得到二值化图像;Step 1: The computer reads the 3D image data matrix, and uses the median filter algorithm to filter the 3D image data matrix to obtain the filtered 3D image data matrix, then converts it into a grayscale image, and uses the grayscale image The Otsu algorithm performs binarization processing to obtain a binarized image;
该步骤中,采用中值滤波算法对数据的平滑程度要求低,因此适合本发明中错台数据的处理,从而提高了运算速度。同时,采用Otsu算法是一种自适应阈值算法,自动化程度高。In this step, the use of the median filter algorithm has low requirements on the smoothness of the data, so it is suitable for the processing of staggered data in the present invention, thereby improving the operation speed. At the same time, the Otsu algorithm is an adaptive threshold algorithm with a high degree of automation.
步骤2:按照从上到下、从左到右的顺序,采用八邻域搜索算法扫描步骤1得到的二值化图像对应的数据矩阵,得到标记后的裂缝区域,并对每个裂缝区域使用最小外接椭圆进行表征(即使用最小外接椭圆将裂缝区域圈在其内);Step 2: In the order from top to bottom and from left to right, use the eight-neighborhood search algorithm to scan the data matrix corresponding to the binary image obtained in step 1 to obtain the marked crack area, and use The minimum circumscribing ellipse is used for characterization (that is, the crack area is enclosed by the minimum circumscribing ellipse);
具体包括如下步骤:Specifically include the following steps:
步骤21:按照从上到下、从左到右的顺序扫描滤波后的三维图像数据矩阵;依次以每个数据点作为中心,判断中心点的八邻域是否均为裂缝点,如果是,则八邻域范围内的点属于以该数据点为中心点的基本单元区域,并将每个基本单元区域顺次编号(进行标记),每个基本单元区域均作为裂缝区域;Step 21: Scan the filtered 3D image data matrix in order from top to bottom and from left to right; take each data point as the center in turn, and judge whether the eight neighborhoods of the center point are crack points, and if so, then The points within the eight neighborhoods belong to the basic unit area with the data point as the center point, and each basic unit area is numbered (marked) in sequence, and each basic unit area is used as a crack area;
步骤22:对编号i的裂缝区域中的所有数据点进行线性拟合,得到拟合直线其中,i=1,2,3…;ni为编号i的裂缝区域包含的数据点个数;求出该裂缝区域在对应的拟合直线上截取的线段长度,记为ai;然后计算该裂缝区域内所有数据点到对应的拟合直线的距离,将距离的最大值记为bi,计算ai与水平方向的夹角,记为θi;Step 22: Perform linear fitting on all data points in the fracture area with number i to obtain a fitted straight line Among them, i=1,2,3...; n i is the number of data points contained in the crack area of number i; find out the length of the line segment intercepted by the crack area on the corresponding fitting straight line, and record it as a i ; then calculate The distance between all the data points in the fracture area and the corresponding fitting straight line, the maximum value of the distance is recorded as b i , and the angle between a i and the horizontal direction is calculated, which is recorded as θ i ;
步骤23:将每个裂缝区域的参数ai、bi和θi分别作为对应的椭圆的长轴、短轴以及偏转角度,得到每个裂缝区域对应的最小外接椭圆。Step 23: Taking the parameters a i , b i and θ i of each crack area as the major axis, minor axis and deflection angle of the corresponding ellipse, respectively, to obtain the minimum circumscribed ellipse corresponding to each crack area.
该步骤中,使用八邻域搜索算法,搜索全面,使得结果更精确;同时,使用最小外接椭圆进行表征较现有的矩形表征,对裂缝的表征更加精确。In this step, the eight-neighborhood search algorithm is used to search comprehensively, making the result more accurate; at the same time, using the minimum circumscribed ellipse for representation is more accurate for crack representation than the existing rectangle representation.
步骤3:在裂缝区域对应的椭圆,使用双尺度聚类算法进行裂缝聚类,得到聚类后的裂缝区域;具体包括如下步骤:Step 3: In the ellipse corresponding to the crack area, use the dual-scale clustering algorithm to cluster the cracks to obtain the clustered crack area; specifically include the following steps:
步骤31:对于步骤2得到的所有裂缝区域,选取裂缝区域对应的最小外接椭圆中长轴最长的椭圆的中心作为当前聚类中心;Step 31: For all the crack regions obtained in step 2, select the center of the ellipse with the longest major axis among the smallest circumscribed ellipses corresponding to the crack region as the current clustering center;
步骤32:选取当前聚类中心对应的裂缝区域之外的所有裂缝区域中编号最小的裂缝区域所在的最小外接椭圆,将其作为待聚类目标;Step 32: Select the smallest circumscribing ellipse where the fracture region with the smallest number among all fracture regions other than the fracture region corresponding to the current clustering center is selected as the target to be clustered;
步骤33:计算待聚类目标的中心到当前聚类中心的距离以及两中心的水平夹角差;Step 33: Calculate the distance from the center of the target to be clustered to the current cluster center and the horizontal angle difference between the two centers;
步骤34:判断步骤33得到的距离以及水平夹角差是否满足如下准则函数,若不满足,则转至步骤37,如果满足,则执行步骤35;Step 34: Judging whether the distance obtained in step 33 and the horizontal angle difference satisfy the following criterion function, if not, go to step 37, and if so, execute step 35;
准则函数:J=(a0<O0Oi)&&(Δθoi<δ)Criterion function: J=(a 0 <O 0 O i )&&(Δθ oi <δ)
其中,a0为当前聚类中心的所代表的最小外接椭圆的长轴长,O0Oi为待聚类目标的中心到当前聚类中心的距离,Δθoi为待聚类目标与当前聚类中心的水平夹角差,δ1为正常数,取0~45°;Among them, a 0 is the major axis length of the smallest circumscribing ellipse represented by the current clustering center, O 0 O i is the distance from the center of the target to be clustered to the current clustering center, Δθ oi is the distance between the target to be clustered and the current clustering center The horizontal angle difference of the class center, δ1 is a normal number, taking 0-45°;
步骤35:将该待聚类目标归为当前聚类中心所在的类,将该类中包含的所有椭圆使用一个新的最小外接椭圆进行表征(即将所有椭圆使用一个最小外接椭圆圈在内),计算该新的最小外接椭圆的中心、长轴、短轴以及偏转角,并将该新的最小外接椭圆的中心作为当前聚类中心;Step 35: classify the object to be clustered into the class where the current cluster center is located, and use a new minimum circumscribed ellipse to characterize all ellipses contained in the class (that is, use a minimum circumscribed ellipse for all ellipses), Calculate the center, major axis, minor axis and deflection angle of the new minimum circumscribed ellipse, and use the center of the new minimum circumscribed ellipse as the current clustering center;
步骤36:判断是否还有未归类的裂缝区域,若有,则继续选取下一个最小编号代表的最小外接椭圆作为待聚类目标,并返回步骤33;若没有,执行步骤38;Step 36: Determine whether there are unclassified crack regions, if so, continue to select the smallest circumscribing ellipse represented by the next smallest number as the target to be clustered, and return to step 33; if not, execute step 38;
步骤37:将当前聚类中心归为一新类,返回31,否则,执行步骤38;Step 37: classify the current cluster center into a new class, return to 31, otherwise, execute step 38;
步骤38:结束。Step 38: End.
该步骤中准则函数的选择,即能判断距离又能判断角度,能够全面判断误差,提高结果精度。The selection of the criterion function in this step can not only judge the distance but also judge the angle, can judge the error comprehensively, and improve the accuracy of the result.
步骤4:使用步骤3中得到的聚类后的裂缝区域所在的最小外接椭圆作为路面裂缝,实现路面裂缝的定位检测。Step 4: Use the smallest circumscribing ellipse where the clustered crack area obtained in Step 3 is used as the pavement crack to realize the location detection of the pavement crack.
参见图2,为使用双尺度聚类算法识别路面裂缝结果,实验选取δ=30°。可见,使用双尺度聚类算法能够获得准确的裂缝范围、裂缝信息提取,从而完成裂缝的检测。Referring to Fig. 2, in order to identify pavement cracks using the dual-scale clustering algorithm, the experiment selects δ = 30°. It can be seen that the use of dual-scale clustering algorithm can obtain accurate fracture range and fracture information extraction, so as to complete the detection of fractures.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410787530.5A CN104636750B (en) | 2014-12-17 | 2014-12-17 | A kind of pavement crack recognizer and system based on double scale clustering algorithms |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410787530.5A CN104636750B (en) | 2014-12-17 | 2014-12-17 | A kind of pavement crack recognizer and system based on double scale clustering algorithms |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104636750A CN104636750A (en) | 2015-05-20 |
CN104636750B true CN104636750B (en) | 2018-09-21 |
Family
ID=53215478
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410787530.5A Expired - Fee Related CN104636750B (en) | 2014-12-17 | 2014-12-17 | A kind of pavement crack recognizer and system based on double scale clustering algorithms |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104636750B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105320942B (en) * | 2015-10-21 | 2018-07-06 | 东南大学 | A kind of road surface breakage detection method based on combined detector |
CN105825169B (en) * | 2016-03-10 | 2019-02-15 | 辽宁工程技术大学 | A Pavement Crack Recognition Method Based on Road Image |
CN106204497B (en) * | 2016-07-20 | 2018-12-25 | 长安大学 | A kind of pavement crack extraction algorithm based on smooth smoothed curve and matched curve |
CN107610094B (en) * | 2017-08-02 | 2020-04-03 | 长安大学 | Three-dimensional crack detection method based on ellipsoid three-dimensional representation |
CN109839439B (en) * | 2019-03-21 | 2021-08-20 | 广西安盛建设工程检测咨询有限公司 | Road and bridge pavement crack detection system and detection method thereof |
CN110334727B (en) * | 2019-04-30 | 2021-04-27 | 国家电网有限公司 | Intelligent matching detection method for tunnel cracks |
CN110909628A (en) * | 2019-11-05 | 2020-03-24 | 长安大学 | A Natural Light Compensation Method for Detecting Cracks in Pavement with Shadows |
CN110853034A (en) * | 2020-01-15 | 2020-02-28 | 清华四川能源互联网研究院 | Crack detection method, crack detection device, electronic equipment and computer-readable storage medium |
CN115424178B (en) * | 2022-09-05 | 2023-07-14 | 兰州大学 | An Enhanced Method for Improving Pavement Crack Data Recognition |
CN118691609B (en) * | 2024-08-23 | 2024-11-08 | 中铁九局集团第一建设有限公司 | A method and device for detecting cracks in highway |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1563891A (en) * | 2004-04-20 | 2005-01-12 | 长安大学 | System and method for discriminating road gap |
US8081798B2 (en) * | 2007-11-20 | 2011-12-20 | Lawrence Livermore National Security, Llc | Method and system for detecting polygon boundaries of structures in images as particle tracks through fields of corners and pixel gradients |
CN103839268A (en) * | 2014-03-18 | 2014-06-04 | 北京交通大学 | Method for detecting fissure on surface of subway tunnel |
CN103903268A (en) * | 2014-04-09 | 2014-07-02 | 南京理工大学 | Road surface crack detection method based on multiple lower-layer marked features |
-
2014
- 2014-12-17 CN CN201410787530.5A patent/CN104636750B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1563891A (en) * | 2004-04-20 | 2005-01-12 | 长安大学 | System and method for discriminating road gap |
US8081798B2 (en) * | 2007-11-20 | 2011-12-20 | Lawrence Livermore National Security, Llc | Method and system for detecting polygon boundaries of structures in images as particle tracks through fields of corners and pixel gradients |
CN103839268A (en) * | 2014-03-18 | 2014-06-04 | 北京交通大学 | Method for detecting fissure on surface of subway tunnel |
CN103903268A (en) * | 2014-04-09 | 2014-07-02 | 南京理工大学 | Road surface crack detection method based on multiple lower-layer marked features |
Also Published As
Publication number | Publication date |
---|---|
CN104636750A (en) | 2015-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104636750B (en) | A kind of pavement crack recognizer and system based on double scale clustering algorithms | |
Fan et al. | Road crack detection using deep convolutional neural network and adaptive thresholding | |
Qu et al. | Crack detection of concrete pavement with cross-entropy loss function and improved VGG16 network model | |
CN108520278A (en) | A Detection Method and Evaluation Method for Pavement Cracks Based on Random Forest | |
CN104282026B (en) | Distributing homogeneity appraisal procedure based on watershed algorithm and minimum spanning tree | |
CN105825169B (en) | A Pavement Crack Recognition Method Based on Road Image | |
CN109410238B (en) | Wolfberry identification and counting method based on PointNet + + network | |
CN110286124A (en) | Measuring system for refractory bricks based on machine vision | |
CN113240623B (en) | Pavement disease detection method and device | |
CN108596038B (en) | Method for identifying red blood cells in excrement by combining morphological segmentation and neural network | |
CN110021028B (en) | An automatic garment-making method based on garment style graph | |
CN104268515A (en) | Sperm morphology anomaly detection method | |
CN103761743A (en) | Solid wood floor surface defect detecting method based on image fusion and division | |
CN110348478B (en) | Method for extracting trees in outdoor point cloud scene based on shape classification and combination | |
CN105513066A (en) | General object detection method based on seed point selection and super pixel fusion | |
TW202127371A (en) | Image-based defect detection method and computer readable medium thereof | |
CN110493221A (en) | A kind of network anomaly detection method based on the profile that clusters | |
CN110047079A (en) | A kind of optimum segmentation scale selection method based on objects similarity | |
CN110910367A (en) | A method for evaluating the quality of cell culture in bioreactors | |
Tian et al. | Automatic blastomere recognition from a single embryo image | |
CN107610094A (en) | Based on the three-dimensional crack 3 D detection method characterized of ellipsoid | |
CN103617417A (en) | Automatic plant identification method and system | |
CN117854061B (en) | Tunnel face trace crack extraction method and system based on three-dimensional point cloud | |
CN104504385B (en) | The recognition methods of hand-written adhesion numeric string | |
CN104268571B (en) | A kind of Infrared Multi-Target dividing method based on minimum tree cluster |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180921 Termination date: 20201217 |
|
CF01 | Termination of patent right due to non-payment of annual fee |