CN110136196B - Automatic bridge crack width measuring method - Google Patents

Automatic bridge crack width measuring method Download PDF

Info

Publication number
CN110136196B
CN110136196B CN201910590721.5A CN201910590721A CN110136196B CN 110136196 B CN110136196 B CN 110136196B CN 201910590721 A CN201910590721 A CN 201910590721A CN 110136196 B CN110136196 B CN 110136196B
Authority
CN
China
Prior art keywords
crack
point
pixel
gradient
pixel point
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
Application number
CN201910590721.5A
Other languages
Chinese (zh)
Other versions
CN110136196A (en
Inventor
杜建超
栗一鸣
李云松
汪小鹏
郭祥伟
李红丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi Kanghong Traffic Technology Co ltd
Xi'an Pinma Electronic Technology Co ltd
Xidian University
Original Assignee
Shaanxi Kanghong Traffic Technology Co ltd
Xi'an Pinma Electronic Technology Co ltd
Xidian University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shaanxi Kanghong Traffic Technology Co ltd, Xi'an Pinma Electronic Technology Co ltd, Xidian University filed Critical Shaanxi Kanghong Traffic Technology Co ltd
Publication of CN110136196A publication Critical patent/CN110136196A/en
Application granted granted Critical
Publication of CN110136196B publication Critical patent/CN110136196B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/028Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring lateral position of a boundary of the object
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/14Measuring arrangements characterised by the use of optical techniques for measuring distance or clearance between spaced objects or spaced apertures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Abstract

The invention discloses an automatic measuring method for bridge crack width, which mainly solves the problem of false detection in the existing method for detecting the crack width information of a concrete bridge based on an image; the implementation scheme is as follows: reading an original bridge image by a computer and preprocessing the original bridge image; acquiring crack trunk information based on a Sobel operator, and acquiring a banded region diagram of the trunk; graying the strip-shaped area and carrying out histogram equalization processing; acquiring the gradient of the equalized banded region picture based on a Sobel operator, and extracting the symbiotic edge and crack point set of the crack; extracting points which are positioned in the cracks in the crack point set; acquiring crack width information; and carrying out striping treatment on the cracks and counting the width information of each crack and storing the width information into a computer terminal. The method can finish the detection of the concrete bridge crack with high accuracy and real-time performance, and can be used for acquiring the width information of the bridge concrete crack.

Description

Automatic bridge crack width measuring method
Technical Field
The invention belongs to the technical field of testing, and particularly relates to an automatic bridge crack measuring method which can be used for obtaining width information of a bridge concrete crack.
Technical Field
Important indexes for measuring the damage degree of the bridge concrete comprise data information such as the length, the width and the number of cracks, wherein the crack width information is the most important index for measuring the damage degree, and the existing means for detecting the crack width information of the bridge concrete comprises the following steps: manual measurement, infrared analysis, and image processing analysis. Wherein:
the manual measurement method is to manually measure the width of the crack by using a vernier caliper, and has the defects of poor measurement precision, low efficiency and certain danger.
The infrared analysis method is to detect the width of the crack by utilizing infrared rays, and has the advantages of high detection precision, high detection speed and the like, but the instrument has the defects of higher cost, professional personnel operation, higher maintenance difficulty, limitation of various conditions during use and the like.
The image processing analysis method is used for detecting the image crack width information based on the image processing technology, has the advantages of automatic measurement, high efficiency and high measurement precision, and is the most studied technology in the field of concrete detection at present.
Chen Bin, published in the paper, "surface crack width measurement based on digital image processing" (Chin Dai Xuan (Nature science edition), 2018,34(10):96-98.), proposes two crack detection algorithms, namely a manual point boundary method and a frame selection average value method, wherein the two methods are that crack boundary points are marked on an image manually and Euclidean distance between the marked boundary points is calculated to obtain the width information of the crack. Since the method is almost manually performed to measure the width of the crack, the real-time performance is very poor, and much time and effort are consumed.
An application of a Sobel operator improved edge detection algorithm in concrete crack identification (software guide, 2017, stage 01, 112-114) published by xiaolifang proposes an improved edge detection algorithm based on a Sobel operator to process an image and extract width information of an image crack based on the obtained edge information. The method improves the accuracy of image crack width information by improving a Sobel operator. However, the Sobel operator has the disadvantages of high time complexity and poor real-time performance in the process of acquiring the image edge information, and the method does not consider a plurality of interferences existing in the practical application. Therefore, in practical application, the accuracy and the real-time performance of the detection result are difficult to guarantee.
In conclusion, a plurality of methods for detecting the width information of the concrete crack by using an image processing technology are proposed at home and abroad at present, and most of the methods have the defects of high complexity, poor anti-interference capability, poor real-time performance and low accuracy, and influence on engineering application.
Disclosure of Invention
The invention aims to provide an automatic bridge crack width measuring method aiming at the defects of the prior art, so as to improve the accuracy of crack width information detection.
In order to achieve the purpose, the technical scheme of the invention comprises the following steps:
(1) reading an original concrete image, and smoothing the original concrete image based on a Gaussian convolution core;
(2) obtaining a crack trunk diagram Q of the smoothed concrete image through a Sobel operator;
(3) acquiring a banded region graph N of the crack according to the main graph Q;
(4) graying the crack banded region image N, and performing histogram equalization to obtain a banded region image D after equalization of the image N;
(5) acquiring a gradient value G and a gradient direction theta of the equalized slit banded region picture D based on a Sobel operator;
(6) extracting a symbiotic edge Z and a crack point set C of the equalized crack band-shaped area image according to the gradient value G and the gradient direction theta of the equalized crack band-shaped area image D;
(7) filtering out pixel points which are not in the crack point set C;
(8) acquiring crack width information by utilizing the symbiotic edge Z and a crack point set C positioned in the crack:
(8a) traversing the symbiotic edge Z and the crack point C positioned inside from top to bottom from left to right to obtain a pair of symbiotic edge points M (x) m ,y m ),K(x k ,y k ) And a corresponding crack point T (x) t ,y t );
(8b) Calculating and searching the direction of the crack boundary according to the coordinates of the symbiotic edge points M and K
Figure BDA0002116043290000021
(8c) From the crack point T (x) t ,y t ) Starting in the region of 8x8
Figure BDA0002116043290000022
Searching a pixel point U with the largest gradient value G difference in the slit banded region picture in the direction, taking the point as a first boundary point of the slit, and recording the coordinate position (x) of the point u ,y u );
(8d) From the crack point T (x) t ,y t ) Starting in the area of 8x8
Figure BDA0002116043290000024
Searching the pixel point H with the largest gradient value G difference in the slit banded region picture in the opposite direction, taking the point as a second boundary point of the slit, and recording the coordinate position (x) of the point h ,y h );
(8e) Calculating the crack width w according to the Euclidean distance:
Figure BDA0002116043290000023
wherein (x) h ,y h ),(x u ,y u ) And respectively represent the coordinates of the U point and the H point of the boundary point.
(9) And acquiring the width of each crack based on the main graph Q and the crack width information w.
Further, in (9), based on the stem graph Q and the crack width information w, the width of each crack is obtained, which is implemented as follows:
(9a) traversing the crack trunk graph Q from top to bottom in a left-to-right sequence to obtain a pixel point S of which the data of the three-color channel R, G, B of the pixel point is not 0, assigning the data of the channel B at the position of the pixel point S to be 255, assigning the data of the channel R, G to be 0, judging whether another non-0 point P except the S point exists in the neighborhood range of 3x3, if so, executing (9B), and if not, continuing traversing the trunk graph Q;
(9b) searching in the neighborhood range of 3x3 of a point P by taking the point P as a center and from left to right and from top to bottom, judging whether a pixel point L with non-0 tricolor channel R, G, B data exists, if so, assigning B channel data at the pixel point L to be 255 and R, G channel data to be 0, continuing traversing, and if not, executing (9 c);
(9c) recording the position information of the traversed crack trunk points, marking crack numbers, judging whether all pixel points in the crack trunk image are traversed completely, if so, terminating the search to obtain the position information of the stripe cracks, executing (9d), if not, adding 1 to the crack numbers, and returning to (9 a);
(9d) traversing the position information and the crack width information w of each crack after the splitting, storing the crack width information w according to the position of each crack, and obtaining the width information of each crack.
Compared with the prior art, the invention has the following advantages:
1) the invention realizes the sharpening of the crack edge by adopting the gray histogram equalization, so that the crack edge is more obvious, the defect of image edge blurring caused by illumination when the edge is detected by the current detection algorithm is overcome, and the accuracy of width detection is improved.
2) The method judges whether the crack point is positioned in the crack or outside the crack based on the self-adaptive threshold, can better remove the crack point with detection error when detecting the width of the crack, overcomes the problem of high false detection rate in the existing detection method, and improves the detection accuracy.
3) The method uses the gradient direction of the symbiotic edge as the direction of the seed point to search the crack edge, overcomes the defect that the image edge width is not accurately calculated due to the fact that the crack width direction is greatly uncertain at present, and further improves the retrieval accuracy of the width information.
Drawings
FIG. 1 is a flow chart of an implementation of the present invention;
FIG. 2 is a graph of simulation results of the present invention.
Detailed Description
The embodiments and effects of the present invention will be described in further detail with reference to fig. 1.
Referring to fig. 1, the implementation steps of the present invention are as follows:
step 1, reading an original concrete image and smoothing the original concrete image.
(1a) Collecting a crack image of the concrete to be detected by using a digital camera, and storing the crack image collected by the camera into a computer;
(1b) smoothing the crack image stored in the computer according to a Gaussian filter formula to obtain a smoothed crack image:
Figure BDA0002116043290000041
wherein P is 1 Pixel value, P, representing the original fracture image 2 Representing the pixel values of the image smoothed by the gaussian convolution kernel, which represents the convolution. [. the]Representing a gaussian convolution kernel.
And 2, acquiring a crack trunk diagram Q of the smoothed crack image based on a Sobel operator.
The operators currently used to compute image gradients include: roberts, Prewitt, Sobel and Lapacian operators, in this example but not limited to Sobel operators, are implemented as follows:
(2a) acquiring the smoothed crack image obtained in the step (1 b);
(2b) obtaining the gradient value E and the gradient direction alpha of the crack image after Gaussian convolution smoothing:
(2b1) calculating the longitudinal gradient value G of the smoothed crack image through a longitudinal Sobel operator y
Figure BDA0002116043290000042
Wherein P is 1 Expressing the value of a pixel point in the original gray level image; denotes a convolution operation [ ·]Representing a longitudinal Sobel operator matrix;
(2b2) calculating the transverse gradient value G of the smoothed crack image through a transverse Sobel operator x
Figure BDA0002116043290000043
Wherein [. cndot. ] represents a transverse Sobel operator matrix;
(2b3) by the formula<1>And formula<2>Obtained G x And G y And calculating the gradient value E and the gradient direction alpha of the crack image:
Figure BDA0002116043290000044
Figure BDA0002116043290000051
(2b4) respectively taking the gradient value E and the gradient direction alpha acquired in the step (2B3) as the values of an R channel and a B channel of the fracture image gradient map to obtain the smoothed fracture image gradient map;
(2c) acquiring a fracture point set T according to the gradient value E and the gradient direction alpha of the original fracture map acquired in the step (2 b):
(2c1) in the example, a threshold value L is set to be 20, an R channel at a pixel point of a gradient image with the gradient value G smaller than the threshold value L is assigned to be L-1, and a pixel point value larger than the threshold value L is unchanged, so that a new gradient image is obtained;
(2c2) traversing the new gradient map from left to right and from top to bottom, and judging whether the new gradient map is traversed:
if the new gradient map traversal is finished, executing (2 d);
if the new gradient map is not traversed, judging whether the R channel value at the pixel point P on the new gradient map is L-1:
if yes, traversing the next pixel point, and judging the value of the R channel,
if not, the gradient value E at the position P of the pixel point is obtained first 1 And the gradient direction alpha 1 And then (2c 3);
(2c3) on the new gradient map, the gradient direction α along the pixel point P 1 Traversing 8 pixel points, and judging whether the value of the R channel at the pixel point S on the new gradient map is L-1:
if so, then execution is performed (2c4),
if not, the gradient value E of the pixel point S is obtained first 2 And then (2c 5);
(2c4) on the new gradient map, the gradient direction α along the pixel point P 1 Is the inverse ofAnd traversing 8 pixel points, and judging whether the value of the R channel at the S position of the pixel point on the new gradient map is L-1:
if yes, return to (2c2),
if not, the gradient value E of the pixel point S is obtained first 2 And then (2c 5);
(2c5) the example sets the gradient difference threshold to g-26, if E 1 -E 2 If the value is less than g, the gradient values of the pixel point S and the pixel point P are kept unchanged, a midpoint position W between two points of the pixel point S and the pixel point P is obtained, and the pixel point W is stored in a crack point set T; otherwise, assigning the values of the three-color channels at the pixel point S and the pixel point P to be L-1, preparing to calculate the next pixel point, and returning to the step (2c 2);
(2d) connecting pixel points in the crack point set T:
(2d1) setting a minimum spanning tree set as E;
(2d2) randomly selecting a point u from the crack point set T as a starting node of the path, and selecting a pixel point z with the minimum Euclidean distance from the point u from the point set T; then, putting the connection line of the pixel point u and the pixel point z into a minimum spanning tree set E;
(2d3) judging whether the traversal of the crack point set T is completed completely, if not, starting from the pixel point z, and repeating the step (2d 2); if all traversals are finished, the minimum spanning tree set E is obtained and executed (2E);
(2e) obtaining a crack trunk diagram Q:
in this example, the side length threshold r is set to 100, the connecting lines with the euclidean distance greater than the side length threshold r in the complete minimum spanning tree set E obtained in step (2d) are deleted, the remaining connecting lines in the minimum spanning tree set E are traversed, and the pixel points on the connecting lines are obtained, and the pixel points form a crack trunk graph Q.
And 3, acquiring a banded region image N of the crack.
(3a) Traversing a crack trunk picture Q from top to bottom according to the sequence from left to right, and acquiring a pixel point set A of which the pixel value is not 0;
(3b) and (3) traversing the pixel point U in the pixel point set A, acquiring a pixel point B with the same coordinate position as the U point and pixel points in the 20x20 surrounding area from the original crack map, taking the pixel point B and the pixel points in the 20x20 surrounding area as the pixel points in the banded region, continuously traversing the pixel point set A until the traversal of the set A is finished, and executing (3 c).
(3c) And (4) forming a crack banded region graph N by the pixel points in all the banded regions obtained in the step (3 b).
And 4, acquiring a strip-shaped area picture D after the crack strip-shaped area picture N is equalized.
(4a) Carrying out graying processing on the slit strip area image N acquired in the step 3, and realizing the following steps:
traversing the slit banded region graph N from left to right and from top to bottom, and calculating the gray value gray of the traversed pixel point U:
gray=0.30×R+0.59×G+0.11×B<3>
wherein R represents a red channel value of a pixel point U, G represents a green channel value of the pixel point U, and B represents a blue channel value of the pixel point U, and the calculated gray value gray is assigned to a three-color channel of the pixel point U, so that graying of a crack region graph N is realized;
(4b) carrying out histogram equalization on the grayed crack strip region graph N:
(4b1) traversing the crack banded region image N from left to right and from top to bottom, and acquiring the pixel number N of each gray level in the crack image of the banded region i I is more than or equal to 1 and less than 256, wherein i represents gray level;
(4b) calculating the probability of each gray level by using a gray probability calculation formula, wherein the formula is as follows:
Figure BDA0002116043290000061
where i is the number of gray levels in the gray scale image N, N i The number of pixels having a gray level of i in the slit band region, A is the number of pixels included in the slit band region image, P (n) i ) Is the gray level probability corresponding to the gray level number i;
(4c) calculating a normalized histogram of the image of the fracture banded region by using a cumulative distribution function of the probabilities:
Figure BDA0002116043290000071
where i represents the number of gray levels before mapping, k represents the number of gray levels after mapping, P (n) i ) Probability of gray scale of ith gray scale, F k Representing the cumulative distribution probability corresponding to the kth gray level;
(4d) acquiring the gray level number after the corresponding mapping of different gray levels by utilizing a gray histogram equalization formula:
r=255*F b b=1,......,255,
wherein b represents the gray scale before pixel point mapping, r represents the gray scale after pixel point mapping, and F b Representing the cumulative distribution probability corresponding to the b-th gray level;
(4e) and traversing the pixel points in the crack strip area picture from left to right and from top to bottom to obtain the pixel points of which the pixel values are not 0, then obtaining new pixel values of the pixel points of which the pixel values are not 0 after histogram equalization through the step (4D), assigning the new pixel values to the pixel points of which the pixel values are not 0, and forming the pixel points of the new pixel values into a balanced crack strip area picture D.
And 5, acquiring the gradient value G and the gradient direction theta of the equalized slit band-shaped region picture D based on a Sobel operator.
Operators currently used for calculating image gradients include: roberts, Prewitt, Sobel and Lapacian operators, in this example but not limited to Sobel operators, are implemented as follows:
(5a) acquiring a picture D of the equalized crack strip-shaped region obtained in the step (4 e);
(5b) computing longitudinal gradient values f of image D by longitudinal Sobel operator y
Figure BDA0002116043290000072
Wherein P is 1 Expressing the value of a pixel point in the original gray level image; denotes a convolution operation [ ·]Representing a longitudinal Sobel operator matrix;
(5c) computing a transverse gradient value f of the image D by a transverse Sobel operator x
Figure BDA0002116043290000073
Wherein [. cndot. ] represents a transverse Sobel operator matrix;
(5d) by the formula<4>And formula<5>Obtained f x And f y Calculating the gradient value G and the gradient direction theta of the crack image:
Figure BDA0002116043290000081
Figure BDA0002116043290000082
(5e) and (3) respectively taking the gradient value G and the gradient direction theta acquired in the step (2D) as the values of an R channel and a B channel of the crack image gradient map to obtain the gradient map of the equalized crack strip region picture D.
And 6, extracting a symbiotic edge Z of the equalized fracture strip area diagram D and extracting a fracture point set C.
(6a) In the example, a threshold value L is set to be 20, an R channel at a pixel point of an image D of the equalized slit band-shaped area, wherein the gradient value G is smaller than the threshold value L, is assigned to be L-1, and a pixel point value larger than the threshold value L is unchanged, so that a new gradient map is obtained;
(6b) traversing the new gradient map from left to right and from top to bottom, acquiring pixel points with gradient values not being L-1, and forming the acquired pixel points into a pixel point set A;
(6c) in this example, the gradient difference threshold g is set to 26, on the new gradient map, the pixel point U in the pixel point set a is traversed, and the ladder at the point U is obtainedValue G 1 And gradient direction theta 1 Starting from point U and along the gradient direction of U theta 1 And theta 1 The other direction of the three-dimensional image is respectively traversed by 8 pixel points to obtain a pixel point J with a gradient value not being L-1, and the gradient value G at the pixel point J 2 Satisfy | G 1 -G 2 If the | is less than g, recording the pixel point U and the pixel point J as a pair of symbiotic edge points, recording the pixel point V at the midpoint position of the pixel point U and the pixel point J as a crack point, and continuously traversing the pixel point set A until the traversal of the pixel points in the set A is finished;
(6d) and (4) forming a symbiotic edge set Z of the slit band-shaped area picture by all the obtained symbiotic edge points in the step (6C), and forming a slit point set C of the slit band-shaped area picture by using the slit points.
And 7, filtering out pixel points which are not in the crack point set C obtained in the step 6.
(7a) Calculating an adaptive threshold value Y:
(7a1) counting the number of pixels with different gray levels in the banded region picture D after histogram equalization, wherein the method is realized as follows:
suma n =sumb n +1,
wherein sumb n Representing the sum of the number of pixels traversing the n-th gray level before the current pixel, suma n The sum of the number of the pixel points representing the current nth gray level;
(7a2) by solving equations
Figure BDA0002116043290000091
Obtaining an adaptive threshold Y, where sum n Representing the number of pixel points corresponding to the nth gray level;
(7b) and traversing the pixel point A in the crack point set C, if the pixel value of the pixel point A in the set C is smaller than the threshold value Y, retaining the pixel point A, and otherwise, deleting the pixel point A from the set C until the crack point set C is traversed.
And 8, acquiring crack width information.
(8a) Traversing the symbiotic edges Z and Z obtained in the step 6 from top to bottom and from left to rightObtaining a pair of symbiotic edge points M (x) from the crack points C located inside obtained in the step 7 m ,y m ),K(x k ,y k ) And a corresponding crack point T (x) t ,y t );
(8b) Calculating and searching crack boundary direction by using angle formula
Figure BDA0002116043290000092
Figure BDA0002116043290000093
Wherein (x) m ,y m ),(x k ,y k ) Representing the coordinates of a pair of symbiotic edge points M and K, and arctan representing the arc tangent;
(8c) from the crack point T (x) t ,y t ) Starting in the region of 8x8
Figure BDA0002116043290000094
Searching a pixel point U with the largest gradient value difference in a gradient graph G of the slit banded region picture in the direction, taking the point as a boundary point of the slit, and recording the coordinate position (x) of the point u ,y u ) Executing (8 d);
(8d) from the crack point T (x) t ,y t ) Starting in the region of 8x8
Figure BDA0002116043290000095
Searching a pixel point H with the maximum gradient value difference in a gradient graph G of the picture of the crack banded region in the opposite direction, taking the point as another boundary point of the crack, and recording the coordinate position (x) of the point h ,y h ) Executing (8 e);
(8e) calculating the crack width w according to the Euclidean distance:
Figure BDA0002116043290000096
wherein (x) h ,y h ),(x u ,y u ) And respectively represent the coordinates of the U point and the H point of the boundary point.
And 9, counting the crack width information in a stripe manner.
(9a) Traversing the crack trunk diagram Q acquired in the step 2 from top to bottom in sequence from left to right, acquiring a pixel point S of which all the data of a three-color channel R, G, B is not 0, assigning the data of a channel B at the pixel point S to be 255, assigning the data of a channel R, G to be 0, simultaneously judging whether the point is in the 3x3 neighborhood range and whether another non-0 point P except the S point exists or not, if so, executing (9B), and if not, continuing traversing the trunk diagram Q;
(9b) searching in a neighborhood range of 3x3 from left to right in the sequence of from top to bottom by taking the point P as a center, judging whether a pixel point L with non-0 three-color channel R, G, B data exists, if so, assigning the B channel data at the pixel point L to be 255, assigning the R, G channel data to be 0, continuing traversal, and if not, executing (9 c);
(9c) recording the position information of the traversed crack trunk points, marking crack numbers, judging whether all pixel points in the crack trunk image are traversed completely, if so, terminating the search to obtain the position information of the stripe cracks, executing (9d), if not, adding 1 to the crack numbers, and returning to (9 a);
(9d) traversing the position information and the crack width information w of each crack after splitting, and storing the crack width information w according to the position of each crack to obtain the width information of each crack.
The simulation effect of the present invention will be further described with reference to fig. 1.
1. Simulation conditions are as follows:
the simulation experiment of the invention is carried out in a hardware environment with CPU main frequency of 2.7GHz and internal memory of 7.85GB and a software environment of Visual Studio 2013.
Firstly, selecting four typical crack scenes on the surface of a concrete bridge, measuring the length and the width of a crack by a vernier caliper, and acquiring parameters such as the number of the crack;
then, four groups of concrete crack images measured by a vernier caliper are obtained by using a CCD camera of an image acquisition device, the resolution of the images is 5760 × 3840, and each acquisition area is 450mm × 300 mm.
2. Simulation experiment contents:
experiment 1, the first set of concrete crack images collected by the present invention were tested, and the results are shown in fig. 2, where:
FIG. 2(a) is a concrete bridge crack image, which is taken of a bridge on a dam river in Western City of Shaanxi province,
fig. 2(b), 2(c), 2(d) and 2(e) are graphs showing the results of the crack width detection of the concrete bridge performed on the four regions marked in fig. 2(a) according to the present invention.
As can be seen from FIG. 2, in the complex background interference, the method can still accurately acquire the width information of the crack in the bridge concrete crack image, which shows that the method has better anti-interference capability.
Experiment 2, the second set of concrete crack images collected was examined using the present invention.
Experiment 3, the third group of concrete crack images collected by the invention were detected.
Experiment 4, the fourth group of concrete crack images collected by the invention were detected.
The four sets of measured data of the above experiments 1, 2, 3 and 4 were counted, and the results are shown in table 1.
Table 1 concrete bridge inspection summary table
Figure BDA0002116043290000101
Figure BDA0002116043290000111
In table 1, "+" in "measurement relative error" represents that the measurement result is large, and "-" represents that the measurement result is small.
As can be seen from the relative error of the average crack width detection in Table 1, the method can accurately acquire the width information of the crack.

Claims (10)

1. A bridge crack width automatic measurement method is characterized by comprising the following steps:
(1) reading an original concrete image, and smoothing the original concrete image based on a Gaussian convolution core;
(2) obtaining a crack trunk diagram Q of the smoothed concrete image through a Sobel operator;
(3) acquiring a banded region graph N of the crack according to the main graph Q;
(4) graying the crack banded region picture N, and carrying out histogram equalization to obtain a banded region picture D after the picture N is equalized;
(5) acquiring a gradient value G and a gradient direction theta of the equalized slit banded region picture D based on a Sobel operator;
(6) extracting a symbiotic edge Z and a crack point set C of the equalized crack band-shaped area image according to the gradient value G and the gradient direction theta of the equalized crack band-shaped area image D;
(7) filtering out pixel points which are not in the crack point set C;
(8) acquiring crack width information by utilizing the symbiotic edge Z and a crack point set C positioned in the crack:
(8a) traversing the symbiotic edge Z and the crack point C positioned inside from top to bottom from left to right to obtain a pair of symbiotic edge points M (x) m ,y m ),K(x k ,y k ) And a corresponding crack point T (x) t ,y t );
(8b) Calculating and searching crack boundary direction according to coordinates of symbiotic edge points M and K
Figure FDA0002116043280000011
(8c) From the crack point T (x) t ,y t ) Starting in the region of 8x8
Figure FDA0002116043280000012
Searching a pixel point U with the largest gradient value G difference in the slit banded region picture in the direction, taking the point as a first boundary point of the slit, and recording the coordinate position (x) of the point u ,y u );
(8d) From the crack point T (x) t ,y t ) Starting in the area of 8x8
Figure FDA0002116043280000013
Searching the pixel point H with the largest gradient value G difference in the slit banded region picture in the opposite direction, taking the point as a second boundary point of the slit, and recording the coordinate position (x) of the point h ,y h );
(8e) Calculating the crack width w according to the Euclidean distance:
Figure FDA0002116043280000014
wherein (x) h ,y h ),(x u ,y u ) Respectively representing the coordinates of the U point and the H point of the boundary point;
(9) and acquiring the width of each crack based on the main graph Q and the crack width information w.
2. The method according to claim 1, wherein the width of each fracture is obtained based on the stem graph Q and the fracture width information w in (9), which is implemented as follows:
(9a) traversing the crack trunk diagram Q from top to bottom and from left to right, acquiring a pixel point S of which the data of a three-color channel R, G, B of the pixel point is not 0, assigning the data of a channel B at the position of the pixel point S to be 255, assigning the data of a channel R, G to be 0, simultaneously judging whether the point is in the 3x3 neighborhood range and has another non-0 point P except the S point, if so, executing (9B), and if not, continuing traversing the trunk diagram Q;
(9b) searching in a neighborhood range of 3x3 from left to right in the sequence of from top to bottom by taking the point P as a center, judging whether a pixel point L with non-0 three-color channel R, G, B data exists, if so, assigning the B channel data at the pixel point L to be 255, assigning the R, G channel data to be 0, continuing traversal, and if not, executing (9 c);
(9c) recording the position information of the traversed crack trunk points, marking crack numbers, judging whether all pixel points in the crack trunk image are traversed completely, if so, terminating the search to obtain the position information of the stripe cracks, executing (9d), if not, adding 1 to the crack numbers, and returning to (9 a);
(9d) traversing the position information and the crack width information w of each crack after splitting, and storing the crack width information w according to the position of each crack to obtain the width information of each crack.
3. The method according to claim 1, wherein the original concrete image read in by the computer in (1) is smoothed based on the gaussian convolution kernel by the following formula:
Figure FDA0002116043280000021
wherein P is 1 Pixel value, P, representing the original fracture image 2 Representing the pixel values of the image smoothed by a Gaussian convolution kernel, [. cndot. ]]Representing a gaussian convolution kernel.
4. The method of claim 1, wherein (2) the fracture skeleton map Q is obtained based on a Sobel operator, and is implemented as follows:
(2a) obtaining the gradient value E and the gradient direction alpha of the smoothed original crack pattern:
Figure FDA0002116043280000022
Figure FDA0002116043280000023
wherein:
Figure FDA0002116043280000031
the gradient size of the gray image pixel point in the transverse direction is expressed;
Figure FDA0002116043280000032
the gradient size of the longitudinal direction of the pixel points in the gray level image is expressed; p 1 Expressing the value of a pixel point in the original gray level image; denotes a convolution operation [ ·]Representing a Sobel operator matrix;
(2b) acquiring a fracture point set T according to the gradient value E and the gradient direction alpha of the original fracture map:
(2b1) setting a threshold value L, assigning an R channel at a pixel point of which the gradient value E is less than the threshold value L in the gradient image to be L-1, and obtaining a new gradient image after the pixel point value of which is greater than the threshold value L is unchanged;
(2b2) traversing the new gradient map from left to right and from top to bottom, and judging whether the new gradient map is traversed or not;
if the new gradient map traversal is finished, executing (2 c);
if the new gradient map is not traversed, judging whether the value of the R channel at the pixel point on the new gradient map is L-1:
if yes, continuously traversing the next pixel point, and judging the value of the R channel of the pixel point,
if not, firstly obtaining the gradient value E at the pixel point 1 And the gradient direction alpha 1 And then (2b 3);
(2b3) on the new gradient map, along the direction α 1 Traversing 8 pixel points, and judging whether the value of an R channel at the pixel point on the new gradient map is L-1:
if so, then execution is performed (2b4),
if not, firstly obtaining the gradient value E at the pixel point 2 And then (2b 5);
(2b4) on the new gradient map, along α 1 Traversing 8 pixel points in the reverse direction, and judging whether the value of the R channel at the pixel point on the new gradient map isIs L-1:
if yes, return to (2b2),
if not, firstly obtaining the gradient value E at the pixel point 2 And then (2b 5);
(2b5) setting the gradient difference threshold to a constant g, if | E 1 -E 2 If < g, then E is retained 1 And E 2 The gradient value of the pixel point is taken as E 1 And E 2 A midpoint position W between the two points, and storing the pixel point W into a crack point set T; otherwise, E 1 And E 2 Assigning the value of the three-color channel at the pixel point to be L-1, preparing to calculate the next pixel point, and returning to (2b 2);
(2c) connecting crack points:
(2c1) setting a minimum spanning tree set as E;
(2c2) randomly selecting a point u from the crack point set T as a starting node of a path, selecting a crack point z with the minimum Euclidean distance from the point u from the point set T, and then putting a connecting line of the crack point u and the crack point z into a minimum spanning tree set E;
(2c3) starting from the crack point z, repeating the step (2c2) until all the crack points in the crack point set T are traversed;
(2d) extracting a fracture trunk:
and deleting the edges of the minimum spanning tree set E, the Euclidean distance of which is greater than the threshold value r being 100, and forming a crack trunk graph Q by the rest edges.
5. The method according to claim 1, wherein the crack strip region map N obtained in (3) is obtained by traversing the crack trunk picture Q from left to right and from top to bottom, obtaining the pixel point a with a pixel value not being 0, and assigning the pixel point B with the same coordinate position as the point a in the original crack map and the pixel values of the pixel points in the 20x20 surrounding area to the crack strip region map N according to the corresponding positions.
6. The method of claim 1, wherein histogram equalization is performed on the fracture banding region map N in (4) by:
(4a) counting the number n of pixels of each gray level in the strip region crack picture i ,0≤i<256;
(4b) Calculating the probability of each gray level by using a gray probability calculation formula, wherein the formula is as follows:
Figure FDA0002116043280000041
where i is the number of gray levels in the gray image N, N i The number of pixels having a gray level of i in the slit band region, A is the number of pixels included in the slit band region image, P (n) i ) Is the gray probability corresponding to the gray level number i;
(4c) calculating a normalized histogram of the image of the fracture banded region by using a cumulative distribution function of the probabilities:
Figure FDA0002116043280000042
where i represents the number of gray levels before mapping, k represents the number of gray levels after mapping, and P (n) i ) Probability of gray scale of ith gray scale, F k Representing the cumulative distribution probability corresponding to the kth gray level;
(4d) acquiring the gray level number after the corresponding mapping of different gray levels by utilizing a gray histogram equalization formula:
r=255*F b b=1,......,255
wherein b represents the number of gray levels before pixel mapping, r represents the number of gray levels after pixel mapping, F b Representing the cumulative distribution probability corresponding to the b-th gray level;
(4e) and traversing the pixel points in the crack strip area picture from left to right and from top to bottom to obtain the pixel points of which the pixel values are not 0, then obtaining new pixel values of the pixel points which are not 0 after histogram equalization through the step (4D), assigning the new pixel values to the pixel points which are not 0, and forming the equalized crack strip area picture D by using the pixel points with the new pixel values.
7. The method according to claim 1, wherein in (5), the gradient value G and the gradient direction θ of the equalized slit banded region picture D are obtained based on a Sobel operator, and the calculation formula is as follows:
Figure FDA0002116043280000051
Figure FDA0002116043280000052
wherein:
Figure FDA0002116043280000053
the gradient size of a crack banded region picture D pixel point in the transverse direction is represented;
Figure FDA0002116043280000054
the longitudinal gradient of the pixel points in the picture D of the crack banded region is expressed; p 1 Representing the value of a pixel point in the picture D of the crack banded region; denotes a convolution operation, [ ·]A Sobel operator matrix is represented.
8. The method according to claim 1, wherein the symbiotic edge Z and crack point set C of the equalized crack strip region picture are extracted in (6), and are implemented as follows:
(6a) setting a threshold value L, assigning an R channel at a pixel point of which the gradient value G is smaller than the threshold value L in the image D of the equalized crack strip-shaped area to be L-1, and obtaining a new gradient map when the pixel point value larger than the threshold value L is unchanged;
(6b) traversing the new gradient map from left to right and from top to bottom to obtain pixel points with gradient values not being L-1, and storing the pixel points into a pixel point set A;
(6c) on the new gradient map, setting the gradient difference threshold value as a constant g, traversingA pixel point U in the pixel point set A is obtained, and a gradient value G at the point U is obtained 1 And gradient direction theta 1 Starting from point U and along the gradient direction of U theta 1 And theta 1 The other direction of the three-dimensional image is respectively traversed by 8 pixel points to obtain a pixel point J with a gradient value not being L-1, and the gradient value G at the pixel point J 2 Satisfy | G 1 -G 2 If the | is less than g, recording the pixel point U and the pixel point J as a pair of symbiotic edge points, recording the pixel point V at the midpoint position of the pixel point U and the pixel point J as a crack point, and continuously traversing the pixel point set A until all the pixel points in the set A are traversed;
(6d) and (4) forming the symbiotic edge points acquired in the step (6C) into a symbiotic edge set Z of the slit band-shaped area picture, and forming all the slit points acquired in the step (6C) into a slit point set C of the slit band-shaped area picture.
9. The method of claim 1, wherein pixel points in the crack point set C that are not inside the crack are filtered out in (7) by:
(7a) obtaining an adaptive threshold value Y:
(7a1) counting the number of pixels with different gray levels in the banded region picture D after histogram equalization, wherein the formula is as follows:
suma n =sumb n +1,
wherein sumb n Representing the sum of the number of pixels traversing the n-th gray level before the current pixel, suma n The sum of the number of the pixel points representing the current nth gray level;
(7a2) by solving equations
Figure FDA0002116043280000061
Obtaining an adaptive threshold Y, of which sum n Representing the number of pixel points corresponding to the nth gray level;
(7b) traversing the pixel point A in the crack point set C, and if the pixel value of the pixel point A in the set C is smaller than a threshold value Y, keeping the pixel point A; otherwise, the pixel point A is removed from the set C.
10. The method of claim 1, wherein (8b) the direction of the crack boundary search is computed from co-occurrence edge points
Figure FDA0002116043280000062
The calculation formula is as follows:
Figure FDA0002116043280000063
wherein (x) m ,y m ),(x k ,y k ) Coordinates of the co-occurrence edge points M and K, arctan represents arctangent,
Figure FDA0002116043280000064
representing the search crack boundary direction.
CN201910590721.5A 2019-01-30 2019-07-02 Automatic bridge crack width measuring method Active CN110136196B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019100888631 2019-01-30
CN201910088863 2019-01-30

Publications (2)

Publication Number Publication Date
CN110136196A CN110136196A (en) 2019-08-16
CN110136196B true CN110136196B (en) 2022-09-20

Family

ID=67566622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910590721.5A Active CN110136196B (en) 2019-01-30 2019-07-02 Automatic bridge crack width measuring method

Country Status (1)

Country Link
CN (1) CN110136196B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112053331B (en) * 2020-08-28 2023-04-07 西安电子科技大学 Bridge crack detection method based on image superposition and crack information fusion
CN113959339A (en) * 2021-09-03 2022-01-21 武汉卓目科技有限公司 Method and device for acquiring crack width, crack monitor and crack monitoring system
CN116385434B (en) * 2023-06-02 2023-08-08 同济检测(济宁)有限公司 Intelligent detection method for precast beam cracks
CN116630321B (en) * 2023-07-24 2023-10-03 铁正检测科技有限公司 Intelligent bridge health monitoring system based on artificial intelligence

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169953A (en) * 2017-04-07 2017-09-15 西安电子科技大学 Bridge concrete surface crack detection method based on HOG features
CN108007355A (en) * 2017-10-20 2018-05-08 西安电子科技大学 Distress in concrete detection method based on Image distance transform
CN108038883A (en) * 2017-12-06 2018-05-15 陕西土豆数据科技有限公司 A kind of Crack Detection and recognition methods applied to highway pavement video image

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7667823B2 (en) * 2005-09-15 2010-02-23 Kansai Kouji Sokuryou Co., Ltd. Optical device, and method of measuring the dimension of object using optical device
CN105894459A (en) * 2015-12-10 2016-08-24 乐视云计算有限公司 Gradient value and direction based image sharpening method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107169953A (en) * 2017-04-07 2017-09-15 西安电子科技大学 Bridge concrete surface crack detection method based on HOG features
CN108007355A (en) * 2017-10-20 2018-05-08 西安电子科技大学 Distress in concrete detection method based on Image distance transform
CN108038883A (en) * 2017-12-06 2018-05-15 陕西土豆数据科技有限公司 A kind of Crack Detection and recognition methods applied to highway pavement video image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于数字图像的混凝土桥梁裂缝检测技术;许薛军等;《湖南大学学报(自然科学版)》;20130725(第07期);全文 *

Also Published As

Publication number Publication date
CN110136196A (en) 2019-08-16

Similar Documents

Publication Publication Date Title
CN110136196B (en) Automatic bridge crack width measuring method
CN109886939B (en) Bridge crack detection method based on tensor voting
CN108364280B (en) Method and equipment for automatically describing structural crack and accurately measuring width
CN112419250A (en) Pavement crack digital image extraction, crack repair and crack parameter calculation method
Oberholzer et al. Methods in quantitative image analysis
CN110033516B (en) Needle flake particle content detection method based on binocular camera image acquisition and recognition
CN107392849B (en) Target identification and positioning method based on image subdivision
CN107358628B (en) Linear array image processing method based on target
CN110207592A (en) Building cracks measurement method, device, computer equipment and storage medium
CN106296691B (en) Pavement disease recognition methods based on image analysis
CN110838117B (en) Rock face porosity recognition method based on hole wall image
CN111508032B (en) Method for sorting feature points in camera calibration process
CN112767359B (en) Method and system for detecting corner points of steel plate under complex background
CN111583114A (en) Automatic measuring device and measuring method for pipeline threads
CN113096121B (en) Pavement crack detection method and system based on cross fracture mechanics and image processing
JP2018128309A (en) Crack detection method
CN110807771A (en) Defect detection method for road deceleration strip
CN108601509A (en) Image processing apparatus, image processing method and program
CN113609984A (en) Pointer instrument reading identification method and device and electronic equipment
CN109829856B (en) Bridge crack information fusion method
CN107657620A (en) A kind of method and system of textured metal freezing region recognition
CN114187363A (en) Method and device for obtaining radial distortion parameter value and mobile terminal
CN113375555A (en) Power line clamp measuring method and system based on mobile phone image
WO2024066463A1 (en) Rebar spacing measurement method and system based on binocular vision
CN115690107B (en) High-throughput counting method, system and device for pod fruit grains based on image processing

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