CN115682957A - Concrete crack detection method and device - Google Patents

Concrete crack detection method and device Download PDF

Info

Publication number
CN115682957A
CN115682957A CN202110828512.7A CN202110828512A CN115682957A CN 115682957 A CN115682957 A CN 115682957A CN 202110828512 A CN202110828512 A CN 202110828512A CN 115682957 A CN115682957 A CN 115682957A
Authority
CN
China
Prior art keywords
concrete
image
crack
image data
crack detection
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.)
Pending
Application number
CN202110828512.7A
Other languages
Chinese (zh)
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110828512.7A priority Critical patent/CN115682957A/en
Publication of CN115682957A publication Critical patent/CN115682957A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a concrete crack detection method and a device, wherein the method comprises the following steps: acquiring image data of the surface of a concrete structure; processing the image data by a binarization method; extracting an image contour; carrying out feature conversion on the contour; processing the characteristic quantity by utilizing a cascade classifier to identify concrete cracks in the image; filling the identified concrete crack outline; determining a position point P of the maximum width of the contour; and determining the main direction of the point P of the profile, and measuring the width of the profile along the direction vertical to the main direction to obtain the width of the widest position of the crack. The device comprises: the device comprises an image acquisition module, a data processing module and a data display module. The method can automatically identify the cracks from the image without observing by naked eyes, and can detect the cracks and measure the width of the cracks only by holding the camera to sweep the surface of the concrete once, thereby liberating human eyes and greatly improving the crack detection efficiency.

Description

Concrete crack detection method and device
Technical Field
The invention relates to the technical field of concrete crack detection, in particular to a concrete crack detection method and device.
Background
At present, two methods for detecting concrete cracks mainly exist, the first method is to detect cracks by using an ultrasonic method, the principle is to detect the existence of cracks by using ultrasonic waves to penetrate through the interior of concrete, a detector holds a pair of ultrasonic transceivers, places the ultrasonic transceivers on two different surfaces (opposite measurement method) of a concrete member or different positions on the same surface (horizontal measurement method), starts an ultrasonic transducer, and observes received signals to judge cracks, the method is not suitable for general crack inspection of a large area due to very low efficiency, the width, depth and the like of the cracks are further detected mainly aiming at the discovered cracks, the other method is a common method used for the current appearance inspection of the concrete structure, namely, the cracks are discovered based on artificial visual observation, then the width of the cracks is measured by using a crack observer (crack width measuring instrument), a main detection part of the crack observer is a calibrated microspur camera, the crack is placed above the cracks to calculate the width, the method is higher in efficiency than the ultrasonic method, but the energy consumption of human is very large, except for the condition that the few common cracks are seriously damaged, most of the surface cracks of the concrete structure are on the order of 0.01-0.1.1.1.1.1 mm, and the defect of the crack is obviously discovered by visual inspection by naked eyes, and the fatigue sensitivity of the crack is obviously reduced by the ordinary method for observing the fatigue of the general method.
Disclosure of Invention
The invention aims to avoid the defects in the prior art and provides the A, thereby effectively solving the defects in the prior art.
In order to achieve the purpose, the invention adopts the technical scheme that: a concrete crack detection method comprises the following steps:
s1, acquiring image data of the surface of a concrete structure;
s2, processing the image data obtained in the step S1 by using a binarization method to obtain a binarization image;
s3, extracting the binaryzation contour obtained in the step S2, and filtering noise points in the image;
s4, carrying out feature conversion on the contour in the step S3 to obtain a contour feature quantity;
s5, processing the characteristic quantity in the step S4 by utilizing a cascade classifier to identify concrete cracks in the image;
s6, filling the concrete crack outline identified in the step S5;
s7, determining the position point P of the maximum width of the contour in the step S6;
and S8, determining the main direction of the profile at the point P obtained in the step S7, and measuring the width of the profile along the direction vertical to the main direction to obtain the width of the widest position of the crack.
Further, the cascade classifier in step S5 is a neural network model, and the neural network model is trained through the following steps:
A. collecting sample image data, wherein the sample image data comprise concrete cracks and non-concrete cracks, and respectively establishing a sample set;
B. b, carrying out binarization and contour extraction processing on the sample image in the step A, and converting the sample image into an ordered array containing a plurality of characteristic values, namely characteristic conversion;
C. establishing a sample set for the samples after the characteristic conversion according to respective types;
D. c, bringing the sample set in the step C into a neural network model for step-by-step training, wherein positive samples of the training are concrete crack samples, and negative samples of the training are non-concrete crack samples;
further, the non-concrete crack in the step A comprises the following steps: a. patches, stains or blocky repair marks; b, characters; c, water mark or trace mending; d, constructing a joint; e strokes or scratches.
Further, the plurality of feature values in step B include a perimeter, an area ratio, a circle ratio, a square ratio, a filling degree, and a dispersion degree.
Further, the image data acquired in step S1 includes a plurality of image data, and the plurality of image data are stitched.
A concrete crack detection device comprising:
the image acquisition module is used for acquiring image data of the surface of the concrete structure;
the data processing module is used for receiving the image data of the image acquisition module and processing the image data;
and the data display module is used for displaying the image data and the crack detection result.
Furthermore, the image acquisition module comprises a mobile platform and a camera arranged on the mobile platform, and the mobile platform is provided with a roller convenient to move.
Furthermore, the number of the rollers is at least four, and one of the rollers is a distance measuring wheel.
Furthermore, the image acquisition module and the data processing module are respectively and independently arranged and can be in data connection with each other.
Further, the image acquisition module and the data processing module are connected through a data line.
The technical scheme of the invention has the following beneficial effects: the method can automatically identify the cracks from the image without observing by naked eyes, can detect the cracks and measure the width of the cracks only by pushing and sweeping the surface of the concrete by holding the camera by hand once, and can liberate human eyes, thereby solving the problem of visual fatigue and greatly increasing the crack detection efficiency.
Drawings
FIG. 1 is a flow chart of a concrete crack detection method according to an embodiment of the present invention;
FIG. 2 is a flowchart of neural network model training in a concrete crack detection method according to an embodiment of the present invention;
FIG. 3 is a functional block diagram of a concrete crack detection apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a three-phase waveform of a distance measuring wheel of a concrete crack detection device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a three-phase waveform of a distance measuring wheel of a concrete crack detection device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating the maximum width definition of a crack profile according to an embodiment of the present invention;
FIG. 7 is a schematic view of determining a width direction according to an embodiment of the present invention;
FIG. 8 is a feature transformed binarized image according to an embodiment of the present invention;
FIG. 9 is a first schematic diagram of feature transformation extraction profile according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of feature transformation extraction profile according to an embodiment of the present invention;
FIG. 11 is a third schematic diagram of feature transformation extraction according to an embodiment of the present invention;
FIG. 12 is a diagram illustrating a feature transformation extraction profile according to a fourth embodiment of the present invention;
fig. 13 is a schematic structural diagram of a concrete crack detection device according to an embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
In the description of the present invention, "a plurality" means two or more unless otherwise specified; the terms "upper", "lower", "left", "right", "inner", "outer", "front", "rear", "head", "tail", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are only for convenience in describing and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, should not be construed as limiting the invention. In the description of the present invention, it is to be noted that, unless otherwise explicitly specified or limited, the terms "connected" and "connected" are to be interpreted broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
As shown in fig. 1, a method for detecting a concrete crack according to an embodiment of the present invention includes: s1, acquiring image data of the surfaces of a large number of concrete structures; s2, processing the image data obtained in the step S1 by using a binarization method to obtain a binarization image; s3, extracting the binaryzation contour obtained in the step S2, and filtering noise points in the image; s4, carrying out feature conversion on the contour in the step S3 to obtain a contour feature quantity; s5, processing the characteristic quantity in the step S4 by using a cascade classifier to identify concrete cracks in the image; s6, filling the concrete crack outline identified in the step S5; s7, determining the position point P of the maximum width of the contour in the step S6; and S8, determining the main direction of the profile at the point P obtained in the step S7, and measuring the width of the profile along the direction vertical to the main direction to obtain the width of the widest position of the crack.
The concrete crack detection method provided by the embodiment of the invention is realized based on a neural network model, the neural network model needs to be trained before the concrete crack is detected by applying the neural network model, and as shown in fig. 2, the training process comprises the following steps: A. acquiring a large amount of sample image data, wherein the sample image data comprises concrete cracks and non-concrete cracks, and respectively establishing a sample set; B. b, carrying out binarization and contour extraction processing on the sample image in the step A, and converting the sample image into an ordered array containing a plurality of characteristic values, namely characteristic conversion; C. establishing a sample set for the samples after the characteristic conversion according to respective types; D. and D, bringing the sample set in the step C into a neural network model for training step by step, wherein the positive samples of the training are all concrete crack samples, and the negative samples are non-concrete crack samples.
Specifically, the non-concrete crack in the step a comprises: a. patches, stains or blocky repair marks; b, characters; c, water mark or trace mending; d, constructing a joint; e strokes or scratches, and the plurality of feature values in step B include perimeter, area ratio, circle rate, squareness rate, filling degree and dispersion degree.
The image data acquired in step S1 may include a plurality of image data, and the plurality of image data are spliced after the plurality of image data are acquired, and then the image data are processed by using the same identification method (including binarization, contour extraction, feature transformation, and identification by substituting a cascade classifier).
Based on the above embodiment, as shown in fig. 2, a concrete crack detection device includes: an image acquisition module 101, configured to acquire image data of a surface of a concrete structure; a data processing module 102, configured to receive the image data of the image obtaining module 101 and process the image data; and the data display module 103 is used for displaying the image data and the crack detection result.
Specifically, image acquisition module 101 includes moving platform 1 and sets up camera 2 on moving platform 1, be provided with its gyro wheel 3 of being convenient for to remove on moving platform 1, gyro wheel 3 is four at least, and one of them gyro wheel 3 is the range finding wheel, according to moving platform 1 displacement, make things convenient for camera 2 to obtain a plurality of image data, image acquisition module 101 and data processing module 102 set up alone respectively, and data connection can be between the two, in this embodiment, image acquisition module 101 and data processing module 102 pass through data line 4 and connect.
Specifically, in the embodiment of the present invention, the mobile platform 1 may further be provided with an LED lamp 7 and a buzzer 8 for prompting a user, the data processing module 102 may be a card computer 5, a neural network model is built in the card computer 5, and the data display module 103 is a screen 6 of the card computer 5, when detecting a crack on the surface of a concrete structure, the crack detection may be performed in two different working modes, one of which is a real-time detection mode, in which a user holds the camera 2 to scan the surface of the concrete, displays a camera image on the screen 6 in real time and automatically identifies the crack, when the crack appears in the image, the LED lamp 7 flickers and the buzzer 8 are used for prompting, the width of the crack is automatically measured and displayed on the screen 6, and when the crack is actually used, the other holds a device with a paper pen, the mode conforms to the current general engineering appearance inspection working habit, the other working mode is a scanning mode, in which the user holds the camera 2 to scan the surface of the concrete in a certain direction, the device is kept silent during the scanning process, displays the camera image on the screen 6 and automatically identifies the crack, and stores an original image in a straight line, which is suitable for a computer, and a large-scan file is suitable for retrieving a large-line.
In the first working mode, the shot image is displayed on the screen 6 in real time along with the sweeping of the camera 2, and meanwhile, the neural network model built in the card computer 5 searches for cracks in the image. When a crack is found, the maximum width of the crack is measured, and then the following prompt actions are made: marking the widest position of the crack on the screen 6, and displaying the width value; the LED lamp 7 is lit; the buzzer 8 emits an audible warning sound.
For the second working mode, a detector needs to hold the camera 2 to sweep the surface of the structure in a straight line direction, a shot image can be displayed on the screen 6 in real time, at the moment, a crack does not need to be identified in real time, the frame rate and the exposure time of the camera 2 are fixed, the sweeping speed is objectively required to be too fast, so that the situation that the image is blurred or front and rear images are not overlapped is avoided, the performance of the current common industrial camera 2 can completely keep up with the general pushing speed of a human arm, the pushing speed of the detector is not constant, the size of the overlapped part of two adjacent frames of images is not fixed, if the pushing speed is high, the overlapped part is small, otherwise, the overlapped part is large, a distance measuring wheel is needed to position each frame of image, and therefore, the images are spliced into a strip-shaped image according to the distance between the images and the initial position, namely, the image on the surface of the swept component is restored.
It should be noted that two images to be stitched generally have a certain repeated portion, and the repeated portion is not completely overlapped due to a slight difference between a shooting angle and an orientation, and in general, in order to complete registration of the two images, a mathematical transformation relation for mapping pixel coordinates in one image to another image needs to be established, which is called a "motion model" of the images, and registration and stitching can be realized only if a correct motion model is provided, and the motion models of the images have four types as follows:
translational motion, under the most ideal and simplest conditions, only translational motion exists between two images, the mapping of pixel points obeys affine transformation relation, only two translational parameters Tx and Ty (other parts of the matrix are the same as a unit matrix) exist in a radiation matrix, so the transformation freedom is 2, splicing can be completed as long as the relative positions of the two images are determined well according to the translational parameters, if the two images only have the translational motion relation, the camera is required to have no rotation, the shooting directions of the two images are ensured to be completely parallel, and the movement vector of the camera is vertical to the shot direction;
affine motion is similar to translation and is also based on an affine transformation matrix, but 6 transformation parameters exist in the affine matrix, namely the degree of freedom is 6, three changes of rotation, scaling and shearing are added to the transformation relation of pixel points, only one condition of the affine motion relation exists in the two pictures, namely the shooting directions are completely parallel;
perspective motion, which is more general than affine transformation, allows the camera to generate arbitrary movement and angular rotation, and the transformation rule of the perspective motion obeys a perspective matrix and coexists in 8 degrees of freedom;
3D motion, in the three motion models mentioned above, the object to be shot is only a large enough plane, the real scene is stereoscopic, and the camera shoots different sides of the scene from different positions and different directions, resulting in a more complex image motion model: 3D motion, but if the 3D effect is significant and not negligible, more complex techniques such as three-dimensional reconstruction are used.
On the premise of knowing an image source, the type of a motion model between images is also known, the key problem to be solved is to calculate a transformation matrix parameter between two images, this link is called image registration, the registration method of the embodiment of the invention is registration based on feature points, the feature points are key points capable of representing local features, generally come from parts with severe gray scale change in the images and have invariance of scaling and rotation, SIFT features are ideal features and are insensitive to light intensity, noise and tiny perspective distortion, and based on the features, the method has the advantages of high robustness, strong significance, large discrimination, easy calculation and the like, and the transformation of the SIFT features is based on difference of a Gaussian scale space, and the Gaussian function is as follows:
Figure BDA0003174573970000081
in the formula, σ is a standard deviation parameter, the larger the value is, the looser the matching judgment of the SIFT features is, on the original image M, the gaussian function convolution is performed according to a certain convolution kernel size, a new convolution image L can be obtained, and the difference is performed on two convolution maps with different σ values, so that a difference map D is obtained, which is shown in the following formula:
Figure BDA0003174573970000082
obtaining key points, namely candidate characteristic points, through gaussian scale difference, then calculating local gradients near each point, and allocating directions to each point, namely:
Figure BDA0003174573970000091
in the formula, theta P is the gradient direction of a point P, and Lup, ldown, lleft and Lright are values of adjacent pixels in four directions, namely the upper direction, the lower direction, the left direction and the right direction, of the point P of a convolution map.
As long as the number of the paired feature points found on the two images is more than the number of parameters in the perspective transformation matrix (namely, the number of degrees of freedom of the perspective motion), the perspective transformation matrix can be determined by least square principle fitting based on the coordinates of the feature points, and the registration of the images can be realized.
For the use scenario of the crack detector, ideally it scans the concrete surface along a straight line, so that only translational motion in the X-direction exists between adjacent images. And because of the existence of the distance measuring wheel, the relative displacement of the two photos can be calculated:
Figure BDA0003174573970000092
in the formula, k is an image scale parameter, namely the proportional relation between the length in the image and the real length, which is an inherent parameter related to the whole instrument, and can be calculated by calibration in the instrument design and manufacturing stages, the value of the k is equal to the actual length D of the image shooting range divided by the pixel number w of the image, Δ x is the staggered distance when two images are spliced, and the transverse staggered distance Δ x can be calculated according to the above formula as long as distance coordinates D1 and D2 of the distance measuring wheels corresponding to the shooting moments of the two images are obtained.
When micro deflection or longitudinal dislocation occurs in the handheld operation process, the instrument is always attached to the surface to be measured, the shooting direction and the shooting distance are always unchanged, so that perspective and scaling do not exist between images, a motion model of the instrument belongs to relatively pure affine motion, the distortion form comprises translation and rotation, then a first image is called a reference image, a second image is called a splicing image, and a transformation matrix for splicing the first image into the second image is an affine matrix:
Figure BDA0003174573970000101
where R00-R11 and Tx, ty are unknown parameters in the affine matrix, so at least 6 equations are needed to solve them, i.e. 3 pairs of known points are needed.
Assuming that a total of 7 pairs of point locations are determined in two adjacent images, each pair of point locations is marked with (xn, yn) - - (xn ', yn'), wherein n =1-7, xn and yn are point locations on a mosaic, xn 'and yn' are point locations on a reference map, and coordinates of the point locations are substituted into the formula, 14 equations can be obtained, and a linear equation set containing 6 unknowns is formed:
Figure BDA0003174573970000102
order:
Figure BDA0003174573970000103
written in the form of a matrix equation, namely:
AX=B
according to the least squares solution principle of the over-determined equation, the least squares solution of X is:
X=(A T A) -1 A T B
thus, a splicing transformation matrix is obtained, and the spliced graph is subjected to affine transformation by utilizing the matrix and can be directly spliced with the reference graph according to the transformed coordinates.
Generally, a plurality of characteristic point pairs can be obtained from two adjacent images, a plurality of pairs with the most obvious corresponding relation are selected, theoretically, a splicing transformation matrix can be calculated as long as the number of the pairs exceeds 3, the more the number of the point pairs is, the more accurate the splicing is, but the larger the calculation amount is, and 6-8 point pairs are selected in the embodiment of the invention.
After the image splicing is completed, the crack recognition is performed once again, and the related data is stored in a file, so that the workflow of the second mode is completed.
More specifically, when crack recognition is performed, the existing visual objects can be classified into the following categories according to the analysis of a large number of concrete surface photographs:
and (3) cracking: the shape is slender, the distribution direction is indefinite, the linearity is not smooth, and the details have a plurality of meanders;
patches, stains or patch repair marks: the shape is block-shaped and has a certain area;
and (3) characters: the Chinese character input method comprises figures, english letters, chinese characters and other symbol patterns, and is distorted and concentrated in shape, and smooth in linear detail;
water mark and mark repairing: the water mark is a strip mark formed by water flowing down along the concrete side wall, the repair mark is a strip mark formed by a constructor repairing a crack, and the two are similar in shape and have a certain width;
and (3) construction joint: the form of a mould seam or a splicing seam left during concrete pouring is slender, straight and smooth;
stroke and scratch: the stroke trace is irregular in shape but smooth in detail.
Through the above analysis, it can be found that the difference between the crack and other visual objects is mainly in the form, but not in the visual parameters such as color and brightness, after the detector captures the concrete surface image, the contour data of each visual object can be obtained through binarization processing, the contour retains all the form characteristics of the object, we can further process the contour to extract useful characteristic values, thus realizing the characteristic transformation of the sample, and based on the contour, the effective characteristics for distinguishing the crack from other objects are as follows:
the perimeter of the contour is the sum of the number of pixel points at the edge of the contour, the perimeter of the crack is larger than a certain threshold value, because a polygon which is too small is not considered as the crack and is only a small hole on the surface of the concrete, the perimeter can be considered as a threshold value condition, and the contours with the perimeter lower than the threshold value are not considered as the cracks;
the area ratio is defined as the area of the outline divided by the perimeter, the shape of the outline crack is long and narrow, so that the area ratio is not too large, and the outline with large area ratio is likely to be a water flow trace or other non-crack objects;
the roundness rate is equal to the area of the outline divided by the area of a circle with the same circumference, the value is between 0 and 1, the approximation degree of the shape of the outline and the circle is measured, the thicker and closer the shape of the outline is to the circle, the closer the roundness rate value is to 1, the thinner and thinner the shape of the outline is, the closer the roundness rate value is to 0, intuitively, the crack is slender and slender, the roundness rate of the crack is very small, and the characteristic is more effective in removing the stain object;
the squareness ratio is equal to the width-length ratio of the minimum external rectangle of the outline, the value is between 0 and 1, the squareness ratio reflects the concentration degree of the outline on a two-dimensional plane, when the distribution of the outline is more concentrated, the external rectangle is closer to a square, therefore, the squareness ratio is closer to 1, when the distribution of the outline is closer to a straight line, the shape of the external rectangle is flatter, the squareness ratio is closer to 0, if the trend of the crack is straighter, the squareness ratio is very small, if the trend of the crack has a large turn, the squareness ratio is larger, although whether the outline is a crack can not be judged by the characteristic alone, the squareness ratio is very effective for eliminating characters and spots;
the filling degree is the ratio of the area of the contour to the area of the minimum circumscribed rectangle, the value is between 0 and 1, the straight degree of the overall shape of the contour is expressed, the more straight the shape is, the closer the filling degree is to 1, and the more curved the shape is, the closer the filling degree is to 0, the characteristic is particularly effective for removing construction joints and scratches, because the cracks have a lot of twists in details, and the construction joints and scratches are relatively flat and smooth;
the dispersion is the average value of the distance from each point on the contour to the center of the minimum circumscribed rectangle, the dispersion not only reflects the concentration degree of the contour on a two-dimensional plane, but also reflects the absolute size of the contour, the larger the dispersion is, the more the points of the contour are dispersed, the larger the overall size is, otherwise, the more the points of the contour are concentrated, the smaller the size is, and the more the points of the contour are concentrated, the more the size is, so that the characteristics are effective in removing objects such as spots, characters, dirt and the like.
In conclusion, after the crack detector acquires the image of the detected surface, the feature conversion of the visual object is realized through three steps of binarization, contour extraction and feature obtaining, and the judgment on whether one visual object is a crack is converted into the judgment on a group of feature values.
More specifically, in an embodiment, after the binarization processing is performed on the original image acquired by the camera 2 from the surface of the concrete structure, an image as shown in fig. 8 is obtained, 55 contours are extracted from the image, noise points in the image are filtered according to a threshold value whose perimeter is not less than 30, and the remaining four contours are as shown in fig. 9-12, and feature values of the four contours are respectively obtained, and the results are shown in the following table:
Figure BDA0003174573970000131
after the conversion, a visual object is transformed into an array consisting of six double-precision numerical values, the array completely represents the corresponding visual object, and the subsequent neural network model training and recognition are carried out based on the characteristic arrays.
In the training stage of the neural network model, samples are substituted into the neural network model, network parameters are obtained through gradient descent, and the parameters do not belong to program codes and are stored in files outside the codes so as to be used for detecting the outer surface of the concrete structure.
The sample comes from investigation and sampling of concrete structures such as multi-place highway bridges, tunnels or walls, and the like, and it is noted that the sample collection mode is consistent with that in actual use, namely: the same equipment as that used in actual use is used for collecting samples; the collected sample has the same environment as the actual use, such as the use of the same supplementary light source; the scope of the sample collected should coincide with the scope of actual use, e.g. if the instrument is to be used only for bridges in the future, the sample should be collected only from bridges and not tunnels.
When the photos are collected, not only crack photos but also photos of other various non-crack objects are collected, and then feature extraction is carried out to form samples, and if more than one object may be contained in a single photo, the samples are respectively stored after the features are extracted.
Specifically, the manually screened samples are divided into six groups, wherein the crack group is a positive sample set, namely the type of the sample needing to be learned and identified by the neural network model, other groups (the patch group, the character group, the water mark repairing group, the construction joint group and the stroke group) belong to negative samples, namely the interference object needing to be learned and eliminated by the neural network model, each sample is an ordered array containing six characteristic values, and an original photo can be discarded.
In the embodiment of the invention, considering that the final purpose only needs to know the conclusion of yes or no, so that the problem is actually a dichotomy problem, the output layer of a neural network model can be set into two neurons, the first neuron represents a crack, the second neuron represents a non-crack, when the number and the quality of a sample set are determined, the simpler the task of the neural network is, the simpler the required network structure is, the easier the training is, the output layer only has two neurons, the simpler the task and the higher the accuracy, more specifically, only a crack group and another non-crack group are substituted into, such as a patch group, the capability of distinguishing the crack from the patch is obtained through training, the task is simpler, so if the crack is only distinguished from one negative sample group, the required network structure is simpler, the training effect is better, the embodiment of the invention trains a classifier specially excluding the crack group and the other non-crack group aiming at each negative sample group, and then connects the classifier in series to form a cascade structure, the classifier excludes specific non-crack at each level, and the object passing through all classifiers are determined to be the crack.
Each stage in the cascade is a sub-neural network model, and as the task is single and simple, the sub-neural networks do not need complex structures, the requirements can be met only by two hidden layers and four layers of neural networks in total, and the structure, the activation function and the loss function of each sub-classifier are the same. They differ from each other only in the training samples and the learned task abilities, and in order to facilitate the gradient to decline smoothly, the activation function of each neuron can uniformly adopt the SmoothReLU function:
Figure BDA0003174573970000151
it should be noted that, in statistics, there are two types of hypothesis testing errors, the first type of error is "leave true" error, i.e., a sample that is originally of a positive type is determined as a negative type and thus excluded, and the second type of error is "accept false", i.e., a sample that is originally of a negative type is determined as a positive type and thus accepted, and both types of errors show a decrease in accuracy when the neural network model operates.
The main task of each sub-neural network model in the embodiment of the invention is to exclude a specific non-crack object, the objects which pass through all the sub-neural network models and are not excluded are finally judged as cracks, the true rejection rate of each sub-classifier must be strictly controlled, and certain nano-false is allowed to exist, because if a certain non-crack object is identified as a crack in a certain sub-classifier
Figure BDA0003174573970000152
"crack", that is, a nano-false occurs, it has a chance to be rejected by the subsequent classifier, and if a certain crack object is rejected as a negative sample type by mistake, the crack object is rejected forever, and the serial structure characteristic of the cascade classifier requires that we treat two types of errors separately, specifically to the design level, that is, improve the loss function, impose a more severe penalty on the true-false-rejection error, and make a relatively loose tolerance to the nano-false error, so the following loss functions are proposed in the embodiment of the present invention:
the loss function treats both types of errors equally, and applies the same degree of loss penalty, when the training sample i is a crack, k is set to a value larger than 1 in order to increase the loss for true-false-rejection errors, when the training sample i is a non-crack, the loss for false-rejection errors should be reduced, and k is set to a value between 0 and 1, for example, as shown in the following formula:
Figure BDA0003174573970000161
furthermore, the training of the sub-neural network models should be performed independently, and since each sub-neural network model corresponds to a specific non-crack object, the positive samples of the training are uniformly crack sample sets, and the negative samples should use the corresponding sample sets.
The function of the distance measuring wheel in the embodiment of the invention is to measure the accumulated movement distance in real time along with the rotation of the wheel, in the linear movement, the accumulated distance is equivalent to the one-dimensional coordinate of an instrument, so that a picture can be positioned and splicing is convenient, the distance measuring wheel is essentially an incremental encoder, and is provided with two or more phases, each phase corresponds to an output pin and outputs a square wave consisting of high and low levels, as shown in fig. 4, the three-phase waveform is obtained when the distance measuring wheel rotates forwards, as shown in fig. 5, the three-phase waveform is obtained when the distance measuring wheel rotates backwards, the Z phase is used for judging the rotation starting, any one of the A phase and the B phase can measure the rotation number of a wheel shaft, so as to convert the rotation number into the distance, the A phase and the B phase are combined for measuring the rotation direction, when the A phase advances 1/4 period of the B phase, namely, when the A phase lags behind the B phase by 1/4 period, the forward rotation phase is reversed, the three phases correspond to three data lines 4 and are connected to pins of a card computer 5, and the change of the high and low levels of each phase is read through an interrupt event function in a program, so as to realize the distance measurement.
Further, since the level values of several phases are transmitted to the GPIO pin of the card computer 5 by the distance measuring wheel, the number of cycles of each phase is actually obtained by the program, and the number of cycles is converted into the distance rolled by the distance measuring wheel, which depends on the previous calibration of the distance measuring wheel, that is, the k value in the following formula is determined:
S=k·N
wherein S is the total distance rolled by the small wheel, the unit is meter, N is the accumulated period number, and k is a calibration coefficient, and the meaning of the calibration coefficient is the actual moving distance corresponding to each period.
The distance measuring wheel outputs high and low levels in a square wave form when rolling, level values are read through GPIO pins, so that waveform and cycle number are judged, monitoring of the GPIO pins is achieved through a built-in interrupt function, when the GPIO pins are triggered, a chip immediately jumps out of an ongoing function, enters another function, returns to an original jumping point after execution is completed, and continues to perform original work, the interrupt function has two elements, namely an interrupt condition and a callback function, the interrupt condition refers to a condition required by an interrupt event, and the callback function refers to a code to be executed after the interrupt occurs.
Figure BDA0003174573970000171
The interrupt parameter is the monitored GPIO pin number, the function is the callback function name, the mode is the type of pin level change, and the following constant enumeration options are provided:
(1) LOW: triggering interruption when the pin is at a low level;
(2) CHANGE: when the pin level changes (high change low or low change high), triggering an interrupt;
(3) RISING: when the pin is changed from low level to high level, triggering interruption;
(4) FALLING: when the pin changes from high level to low level, an interrupt is triggered.
In a square wave period, a high level and a low level respectively appear once, the starting point of a high level interval can be set as a period starting point, the end point of a low level interval is positioned at a period end point, each time the low level is changed into the high level, the high level is the beginning of a new period, each time a low-high event occurs, interruption is triggered, and in a main work function, as long as the value of T is quoted, the high level and the low level are equivalent to the accumulated number of coding periods.
The resolution of the encoder stipulates the number of square waves generated by 360-degree rotation of the distance measuring wheel, so that the rotation angle corresponding to one square wave period can be calculated, and further, on the premise of knowing the diameter of the distance measuring wheel, the moving distance corresponding to one square wave period can be calculated, namely, a calibration coefficient k:
Figure BDA0003174573970000181
where C is the small wheel circumference, which is equal to π times the small wheel diameter D, PPR is the encoder resolution, in the actual detection process, the material of the wheel periphery of the distance measuring wheel is generally rubber, the wheel periphery has certain elasticity, when a detector presses the instrument on a detected surface, the diameter D is slightly compressed, therefore, a certain error is caused, if a small wheel with the diameter of 6cm is extruded to the diameter of 5.9cm, an error of 1.67 percent is generated, the k value also generates an error with the same proportion, the actual distance S and the actual distance k are in a linear relation, so that an error of the same proportion is transmitted to S, and assuming that the transverse shooting width of one picture is 10cm, and the adjacent pictures are overlapped by 5cm, the width error of the overlapped part is 5 × 1.67% =0.0835cm, if the number of horizontal pixels of the picture is 1000, this error is reflected in the image as 8 pixels, therefore, the error of the diameter of the small wheel can directly influence the positioning of the photo, the method for reducing the error of the embodiment of the invention directly calibrates the k value through the measured distance, making a distance scale on a plane, making a mark on a wheel ring, counting the number of cycles from the position (a), rolling to the position (b), rotating the distance measuring wheel for one or more whole circles, and in order to reduce the error, the larger the number of the whole circles is, the better is, then, measuring the rolling distance S of the small wheel on the plane, dividing the rolling distance S by the square wave period count N read in the program, i.e. to obtain the value of k, the greater the number of turns C, the smaller the relative error of k, because the actual working condition is simulated during calibration, the system error is eliminated to a certain extent through calibration, the actual measurement method is a more recommended distance measurement theory calibration method, and the calibration turn number C of the small wheel is as large as possible.
In the embodiment of the invention, when a crack on the surface of a concrete structure is detected, after a certain contour is identified as a crack, the maximum width of the crack needs to be measured and marked through an image, the measured width on the image is in pixel units, the screen 6 in the embodiment of the invention is calibrated in advance, and therefore, the actual width (in millimeter units) of the crack can be converted into the actual width (in millimeter units) of the crack only by measuring the image width (in pixel units) of the crack.
As shown in fig. 6, the mathematical definition of the maximum width is that any point P in the contour is taken as the center of a circle, so that the circle does not exceed the boundary of the contour, the radius of the obtained maximum circle is R, among all points in the contour, the point Pmax with the maximum R value is the maximum position of the contour, and the corresponding maximum circle diameter Dmax is the maximum width of the contour, based on the distance transformation, the approximate maximum position in the contour can be directly obtained, and using the contour shown in the above figure as an example, the contour is first filled, and then the distance transformation is performed, so as to obtain a gray map, wherein the gray value of a pixel point qualitatively reflects the distance from the corresponding point in the original drawing to the nearest black point, and therefore, the point with the maximum gray value is the maximum position of the original drawing.
In the embodiment of the invention, as shown in fig. 7, after the widest position P of the crack profile is determined, a straight line L is made through P, and intersects the profile near P at two points a and B, if the straight line L is perpendicular to the main direction of the crack at the point P, the distance AB is the maximum width of the crack, and the straight line L is called as a "width measuring line" at the point P.
The intersection points of the resulting contours are different, measured in different directions based on the same position P. The width of the crack can be obtained only by measuring along the vertical direction, in the upper diagram, the direction shown by an arrow is the main direction of the crack outline at the point P, the straight line L perpendicular to the main direction is a width measuring line, but the non-vertical straight line L' is not required by the invention, as the crack shape is twisted and bent, the main directions corresponding to different points are different, therefore, a neighborhood range near the point P is required to be specified, the main direction is calculated according to the outline graph in the neighborhood, in order to avoid the interference of the shape of the neighborhood to the calculation of the main direction, the neighborhood should be round or approximately round, as the crack outline is narrower, the neighborhood should not be set too big, in the embodiment of the invention, 3 pixels or 5 pixels can be taken as the radius of the neighborhood circle, the pixel points in the neighborhood can be taken as a point set, the gray value of each point is taken as the weight, making weighted linear regression to obtain a regression line, i.e. the straight line where the principal direction is located, and the perpendicular line passing through the point P is the width measuring line, so-called weighted linear regression, i.e. the higher the gray level, the greater the weight of the point, in the general linear regression algorithm based on two-dimensional point set, the specific method is to copy some point points according to their gray values and add them into the point set, and then regress, for example, if the gray value of a certain point is 25, copy 25-1=24 points, i.e. 24 identical points, add the point set, of course, directly copying according to the gray value may result in too large point set, copy the gray value by dividing the gray value by 50, which is equivalent to equally dividing the gray range of 0-255 into 5 intervals, not copying the interval of 0-49, copying 1 copy the interval of 50-99, and so on, copy 4 copies the interval with the largest gray value, and this can also achieve the weighting effect, and not to duplicate too many points, the linear regression principle of the two-dimensional point set is a least square method based on ordinate, but when the distribution direction of the point set is close to vertical, the method is invalid, theoretically strict linear regression should be a least square method based on the vertical distance between the points and the regression line, but the complexity of code writing is increased, the simpler method is that the maximum and minimum values of the abscissa and the ordinate of the point set are found out respectively, the maximum and minimum values are subtracted respectively to obtain the distribution widths of the point set in the horizontal and vertical directions, if the distribution in the horizontal direction is wider, the regression line is considered to be closer to the horizontal direction, the original least square method based on ordinate is adopted, and if the distribution in the vertical direction is wider, the regression line is considered to be closer to the vertical direction, and the least square method based on the abscissa is adopted.
Specifically, the width of the crack is obtained by determining the width measuring line, obtaining the width (unit is pixel) of the crack on the image, converting the pixel into millimeter unit according to the calibration result, and displaying the width of the crack on the screen 6.
The embodiments of the present invention have been presented for purposes of illustration and description, and are not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A concrete crack detection method is characterized by comprising the following steps:
s1, acquiring image data of the surface of a concrete structure;
s2, processing the image data obtained in the step S1 by using a binarization method to obtain a binarization image;
s3, extracting the binaryzation contour obtained in the step S2, and filtering noise points in the image;
s4, carrying out feature conversion on the contour in the step S3 to obtain a contour feature quantity;
s5, processing the characteristic quantity in the step S4 by utilizing a cascade classifier to identify concrete cracks in the image;
s6, filling the concrete crack outline identified in the step S5;
s7, determining the position point P of the maximum width of the contour in the step S6;
and S8, determining the main direction of the profile at the point P obtained in the step S7, and measuring the width of the profile along the direction perpendicular to the main direction to obtain the width of the widest position of the crack.
2. The concrete crack detection method according to claim 1, characterized in that: the cascade classifier in the step S5 is a neural network model, and the neural network model is trained through the following steps:
A. collecting sample image data, wherein the sample image data comprises concrete cracks and non-concrete cracks, and respectively establishing a sample set;
B. b, carrying out binarization and contour extraction processing on the sample image in the step A, and then converting the sample image into an ordered array containing a plurality of characteristic values, namely characteristic conversion;
C. establishing a sample set for the samples after the characteristic conversion according to respective types;
D. and D, bringing the sample set in the step C into a neural network model for step-by-step training, wherein positive samples of the training are all concrete crack samples, and negative samples are non-concrete crack samples.
3. The concrete crack detection method according to claim 2, characterized in that: the non-concrete crack in the step A comprises the following steps: a. patches, stains or blocky repair marks; b, characters; c, water mark or trace mending; d, constructing a joint; e strokes or scratches.
4. The concrete crack detection method according to claim 2, characterized in that: the plurality of characteristic values in the step B comprise perimeter, area ratio, circle rate, square rate, filling degree and dispersion degree.
5. The concrete crack detection method according to claim 1, characterized in that: the image data acquired in step S1 includes a plurality of pieces, and the plurality of pieces of image data are stitched.
6. A concrete crack detection device, characterized in that includes:
the image acquisition module is used for acquiring image data of the surface of the concrete structure;
the data processing module is used for receiving the image data of the image acquisition module and processing the image data;
and the data display module is used for displaying the image data and the crack detection result.
7. The concrete crack detection device of claim 6, wherein: the image acquisition module comprises a mobile platform and a camera arranged on the mobile platform, and the mobile platform is provided with a roller convenient to move.
8. The concrete crack detection device of claim 7, wherein: the number of the rollers is at least four, and one of the rollers is a distance measuring wheel.
9. The concrete crack detection device of claim 7, wherein: the image acquisition module and the data processing module are respectively and independently arranged and can be in data connection with each other.
10. The concrete crack detection device of claim 9, wherein: the image acquisition module and the data processing module are connected through a data line.
CN202110828512.7A 2021-07-22 2021-07-22 Concrete crack detection method and device Pending CN115682957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110828512.7A CN115682957A (en) 2021-07-22 2021-07-22 Concrete crack detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110828512.7A CN115682957A (en) 2021-07-22 2021-07-22 Concrete crack detection method and device

Publications (1)

Publication Number Publication Date
CN115682957A true CN115682957A (en) 2023-02-03

Family

ID=85044539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110828512.7A Pending CN115682957A (en) 2021-07-22 2021-07-22 Concrete crack detection method and device

Country Status (1)

Country Link
CN (1) CN115682957A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116990310A (en) * 2023-09-27 2023-11-03 中国水利水电第九工程局有限公司 Wall concrete crack monitoring and early warning system based on data analysis

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116990310A (en) * 2023-09-27 2023-11-03 中国水利水电第九工程局有限公司 Wall concrete crack monitoring and early warning system based on data analysis
CN116990310B (en) * 2023-09-27 2023-12-08 中国水利水电第九工程局有限公司 Wall concrete crack monitoring and early warning system based on data analysis

Similar Documents

Publication Publication Date Title
US11551341B2 (en) Method and device for automatically drawing structural cracks and precisely measuring widths thereof
CN108764257A (en) A kind of pointer instrument recognition methods of various visual angles
CN102297660B (en) Measuring method of shield tunnel lining segment seam open width and apparatus thereof
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN108520274A (en) High reflecting surface defect inspection method based on image procossing and neural network classification
CN105092607B (en) Spherical optics element surface flaw evaluation method
CN106157310A (en) The TFT LCD mura defect inspection method being combined with multichannel based on mixed self-adapting Level Set Models
CN113252700B (en) Structural crack detection method, equipment and system
CN109724984A (en) A kind of defects detection identification device and method based on deep learning algorithm
CN104700395A (en) Method and system for detecting appearance crack of structure
CN107941808A (en) 3D printing Forming Quality detecting system and method based on machine vision
CN111996883B (en) Method for detecting width of road surface
CN110503623A (en) A method of Bird's Nest defect on the identification transmission line of electricity based on convolutional neural networks
CN114705689A (en) Unmanned aerial vehicle-based method and system for detecting cracks of outer vertical face of building
CN108830840A (en) A kind of active intelligent detecting method of circuit board defect and its application
CN113884011A (en) Non-contact concrete surface crack measuring equipment and method
CN114719749A (en) Metal surface crack detection and real size measurement method and system based on machine vision
Tayo et al. Portable crack width calculation of concrete road pavement using machine vision
CN115682957A (en) Concrete crack detection method and device
CN110334727B (en) Intelligent matching detection method for tunnel cracks
CN109886936B (en) Low-contrast defect detection method and device
CN110321869A (en) Personnel's detection and extracting method based on Multiscale Fusion network
CN103091332B (en) Detection method and detection system of U-shaped powder pipe based on machine vision
CN115717865A (en) Method for measuring full-field deformation of annular structure
CN110070520B (en) Pavement crack detection model construction and detection method based on deep neural network

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