Method and system for measuring physical parameters of dam cracks based on monocular image
Through the pixel size calibration and crack segmentation network of the monocular camera, the problems of environmental complexity and high hardware cost in dam crack detection are solved, and high-precision and low-cost crack physical parameter measurement are achieved.
Patent Information
- Application Number
- CN202411302815.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-09-19
AI Technical Summary
In the detection of dam cracks, traditional image processing methods are difficult to divide the cracks and the environment. The binocular vision solution is costly and has complex calculations, so it is not possible to effectively adapt to complex ground environments.
A monocular camera is used to perform pixel size calibration in 24 directions, and crack images are obtained through ellipse detection and triangular grid topology information. The crack segmentation network after training is used to automatically divide the fracture area and calculate physical parameters such as crack width and area.
It realizes high-precision and low-cost crack detection in complex environments, reduces hardware costs, is highly adaptable, and has a fast detection speed, which is suitable for complex terrain environments of dams.
Smart Images

Figure CN118823101B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for measuring physical parameters of dam cracks based on monocular images. Background Art
[0002] In concrete dams, cracks are the most common form of structural damage. Cracks will increase the porosity of the dam structure, making it easier for water to penetrate into the structure, affecting the overall mechanical properties of the dam and weakening its resistance to external forces. If not discovered and handled in time, they may gradually expand and eventually lead to dam instability and collapse. Therefore, crack detection and physical parameter measurement of dams are of great significance.
[0003] At present, non-contact crack detection technology is mainly divided into two categories, one is the detection method based on traditional digital image processing, and the other is the crack detection method based on binocular vision.
[0004] For example: Chinese invention patent, patent publication number: CN110009610A, patent name: A visual detection method and bionic device for surface damage of reservoir dam slope protection, discloses a visual detection method and bionic device for surface damage of reservoir dam slope protection, which uses camera calibration, acquisition of corrected images, graying and smoothing, improved Canny edge detection, wavelet transform-based denoising, stereo matching, three-dimensional reconstruction, and assessment of damage form and degree, and finally feeds back relevant data to users.
[0005] For example: Chinese invention patent, patent publication number: CN111751380B A method for inspecting cracks in concrete dams based on light and small drones, using portable light and small drones to quickly inspect cracks in concrete dams, using image information and its corresponding positioning information, distance information, and drone attitude information as source data, to train a crack recognition machine learning model, and use the trained crack recognition machine learning model to identify cracks.
[0006] Due to the characteristics of the dam cracks themselves and the complexity of the surrounding environment, the captured images are greatly disturbed by the environment, making it difficult for traditional image processing methods to separate the cracks from the environment, and there are certain limitations. The binocular vision crack detection solution requires two cameras to simultaneously capture crack images and use stereo matching technology for depth calculation and crack physical quantity measurement. Although it has good scene adaptability, it has high hardware costs and complex calculations. Summary of the invention
[0007] In order to address the deficiencies in the prior art, the present invention provides a method and system for measuring physical parameters of dam cracks based on monocular images; a monocular camera is used to calibrate pixel sizes in 24 directions, and the crack area in the image is automatically segmented after the crack image is acquired, and crack width, area and other parameters are calculated based on the correlation between pixel size and actual size. The method has simple operation, strong robustness, and adaptability to various complex ground environments, and has lower hardware cost than binocular vision solutions.
[0008] On the one hand, a method for measuring physical parameters of dam cracks based on monocular images is provided, including: obtaining a dot calibration cloth image; performing ellipse detection on the dot calibration cloth image, wherein the dot calibration cloth is laid on the surface of the dam to be measured; determining the nearest neighbor topology information for each ellipse center point; and determining the ellipse triangular mesh topology information based on the nearest neighbor topology information of each ellipse center point.
[0009] In the ellipse triangle mesh topology information, the pixel calibration sizes in M directions are obtained for each ellipse center point; in the dot calibration cloth image, based on the pixel calibration sizes in M directions of each ellipse center point, the pixel calibration sizes in M directions of each pixel point in the dot calibration cloth image are determined; M is a positive integer, and the value of M is 24.
[0010] The dam crack image to be measured is obtained; the dam crack image to be measured is input into the trained crack segmentation network to obtain a crack mask map; the skeleton line in the middle of the crack is extracted from the crack mask map, and the tangent direction and normal direction of the skeleton point on the skeleton line are determined; based on the normal direction of each skeleton point, the pixel calibration size in the normal direction of each skeleton point is queried from the pixel calibration sizes in M directions of the skeleton point.
[0011] Based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point, the actual width of the crack at each skeleton point is calculated; based on the actual width of the crack at all skeleton points, the physical parameters of the crack are calculated.
[0012] On the other hand, a dam crack physical parameter measurement system based on monocular images is provided, including: an acquisition module, which is configured to: acquire a dot calibration cloth image; wherein the dot calibration cloth is laid on the surface of the dam to be measured; perform ellipse detection on the dot calibration cloth image to determine the nearest neighbor topology information for each ellipse center point; and determine the ellipse triangular mesh topology information based on the nearest neighbor topology information of each ellipse center point.
[0013] A determination module is configured as follows: in the ellipse triangular mesh topology information, obtain the pixel calibration size in M directions for each ellipse center point; in the dot calibration cloth image, based on the pixel calibration size in M directions of each ellipse center point, determine the pixel calibration size in M directions of each pixel point in the dot calibration cloth image; M is a positive integer, and the value of M is 24.
[0014] The query module is configured to: obtain a dam crack image to be measured; input the dam crack image to be measured into a trained crack segmentation network to obtain a crack mask image; extract a skeleton line in the middle of the crack from the crack mask image, and determine the tangent direction and normal direction of the skeleton point on the skeleton line; based on the normal direction of each skeleton point, query the pixel calibration size in the normal direction of each skeleton point from the pixel calibration sizes in M directions of the skeleton point.
[0015] The output module is configured to: calculate the actual width of the crack at the location of each skeleton point based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point; calculate the physical parameters of the crack based on the actual width of the crack at the locations of all skeleton points.
[0016] The above technical solution has the following advantages or beneficial effects: (1) The current non-contact detection method (such as binocular vision solution) has high detection cost and complex calculation. The present invention adopts monocular vision technology, which greatly reduces the hardware cost while improving the detection accuracy. There is no need to keep the camera in the upright state when shooting crack images, which is simple to operate and has strong scene adaptability. (2) There is no need to calibrate the internal and external parameters of the camera. Only the dot calibration cloth is used as input to calibrate the pixel size in different directions. It is less affected by the undulations of the terrain and is suitable for the complex and diverse terrain environment of the dam. It has the advantages of fast detection speed, high accuracy, and strong portability. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0018] Figure 1 This is a flow chart of the method of embodiment 1.
[0019] Figure 2 This is the original image of the dot calibration cloth in Example 1.
[0020] Figure 3 These are the parameters for constructing the ellipse neighborhood information of the first embodiment.
[0021] Figure 4 This is the automatic construction of the ellipse neighborhood topology information of the first embodiment.
[0022] Figure 5 This is the pixel-calibrated 16-bit grayscale image of Example 1.
[0023] Figure 6 This is Example 1 of the original crack image of Example 1.
[0024] Figure 7 This is Example 1 of the mask image after segmentation in Embodiment 1.
[0025] Figure 8 This is Example 2 of the original crack image of Example 1.
[0026] Fig. 9 This is Example 2 of the mask image after segmentation of Example 1.
[0027] Fig.10 This is a schematic diagram of crack width calculation in Example 1. DETAILED DESCRIPTION
[0028] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0029] Embodiment 1
[0030] like Figure 1 As shown, this embodiment provides a method for measuring physical parameters of dam cracks based on monocular images, including: S101: obtaining a dot calibration cloth image; wherein the dot calibration cloth is laid on the surface of the dam to be measured; performing ellipse detection on the dot calibration cloth image to determine the nearest neighbor topology information for each ellipse center point; based on the nearest neighbor topology information of each ellipse center point, determining the ellipse triangular mesh topology information.
[0031] S102: In the ellipse triangle mesh topology information, obtain the pixel calibration sizes in M directions for each ellipse center point; in the dot calibration cloth image, based on the pixel calibration sizes in M directions of each ellipse center point, determine the pixel calibration sizes in M directions of each pixel point in the dot calibration cloth image; M is a positive integer, and the value of M is 24.
[0032] S103: Acquire the image of the dam crack to be measured; input the image of the dam crack to be measured into the trained crack segmentation network to obtain a crack mask image; extract the skeleton line in the middle of the crack from the crack mask image, and determine the tangent direction and normal direction of each skeleton point on the skeleton line; based on the normal direction of each skeleton point, query the pixel calibration size in the normal direction of each skeleton point from the pixel calibration sizes in M directions of the skeleton point.
[0033] S104: Based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point, the actual width of the crack at the location of each skeleton point is calculated; based on the actual width of the crack at the locations of all skeleton points, the physical parameters of the crack are calculated.
[0034] Furthermore, the S101: Figure 2 As shown, the dot calibration cloth image is obtained by laying the dot calibration cloth on the surface of the dam to be measured and photographing the dot calibration cloth with a monocular camera.
[0035] The dot calibration cloth includes: a plurality of black solid circles, which are arranged in an equidistant manner; the actual radius of the black solid circle is mm, the center distance between adjacent black solid circles is Mm.
[0036] It should be understood that, affected by factors such as camera distortion, terrain undulation, and non-orthophotography, the dot calibration cloth image includes a series of elliptical patterns with non-uniform sizes and non-uniform intervals.
[0037] Furthermore, the S101: performing ellipse detection on the dot calibration cloth image specifically includes: using an ellipse detection algorithm to perform ellipse detection on the dot calibration cloth image, and detecting the center coordinates, major axis size, minor axis size and inclination angle of all ellipses in the dot calibration cloth image.
[0038] Furthermore, the S101: determining the nearest neighbor topology information for each ellipse center point specifically includes: step (11) determining the nearest neighbor topology information for each ellipse center point , using KD tree, query radius The center points of other ellipses within the range ; ; The center point of the ellipse found Stored in the neighborhood candidate list.
[0039] Step (12) traverses each candidate point in the neighborhood candidate list , calculate the center point of the ellipse and candidate points Distance in pixel space , calculate the center point of the ellipse and candidate points The connection with Axis Angle ,in, , .
[0040] Step (13) is as follows Figure 3As shown, according to the ellipse parametric equation, the center point is calculated as The ellipse with the center point is The ellipse, in Polar radius in the direction and .
[0041] .
[0042] .
[0043] .
[0044] when hour, ;when hour, .
[0045] in, The center point is The major axis of the ellipse is The angle of the axis, The center point is The radius of the minor axis of the ellipse, The center point is The radius of the major axis of the ellipse; and Indicates the center point is Ellipse and connecting line The horizontal and vertical coordinates of the intersection point, Represents the polar radius The relative angle to use when calculating.
[0046] .
[0047] .
[0048] .
[0049] when hour, ;when hour, .
[0050] The center point is The major axis of the ellipse is The angle of the axis, The center point is The radius of the minor axis of the ellipse, The center point is The radius of the major axis of the ellipse; and Indicates the center point is Ellipse and connecting line The horizontal and vertical coordinates of the intersection point, Represents the polar radius The relative angle to use when calculating.
[0051] Step (14) If Satisfy the conditions , The value of is 1.2, then determine for The nearest neighbor ellipse center point, Point The pixel calibration size in the direction is ;in, Indicates the safety factor.
[0052] Step (15) repeats steps (11) to (14) to obtain the nearest neighbor topology information of each ellipse center point and the pixel calibration size in the nearest neighbor direction; the nearest neighbor topology information refers to the nearest neighbor ellipse center point.
[0053] Further, the S101: based on the nearest neighbor topology information of each ellipse center point, determine the ellipse triangle mesh topology information, including: after the nearest neighbor topology information of each ellipse center point is constructed, determine whether the number of the nearest neighbor ellipse center points of each ellipse center point is greater than 3, if so, retain the current ellipse center point, if not, delete the current ellipse center point, and finally, for the retained ellipse center point The nearest ellipse center point to itself Connect the lines and then move the nearest ellipse center point and the other nearest neighbor ellipse center points Connect the lines to obtain the elliptical topological triangular mesh of the dot-calibrated cloth image.
[0054] The elliptical topological triangular mesh of the dot-calibrated cloth image is as follows: Figure 3 and Figure 4 shown.
[0055] Furthermore, the S102: in the ellipse triangle mesh topology information, obtaining pixel calibration sizes in M directions for each ellipse center point includes: for each ellipse center point , get the nearest neighbor angles in different directions and the corresponding pixel calibration size Then, sort them in order from smallest to largest. Sort by and The horizontal and vertical coordinates are aligned every 15° within the range of 360 degrees. Resample to get M fixed angles , respectively ; with each As input, linear interpolation is used to calculate Corresponding pixel calibration size , a total of M pixel calibration sizes in resampling directions are obtained, M=24.
[0056] Further, the S102: in the dot calibration cloth image, based on the pixel calibration sizes in M directions of each ellipse center point, determine the pixel calibration sizes in M directions of each pixel point in the dot calibration cloth image, including: for the pixel points located in the topological triangular mesh of the ellipse center point, using the pixel calibration sizes in M directions of the ellipse center point as a reference, using bilinear interpolation method to perform calibration size interpolation on the pixels, and obtain the pixel calibration sizes in M directions of each pixel point; for the pixel points located outside the topological triangular mesh of the ellipse center point, , find the nearest pixel point in the topological triangle mesh, and assign the pixel calibration size of the pixel point in M directions directly to .
[0057] In order to facilitate subsequent query, the calibration results are saved as M 16-bit png format images, which are recorded separately ( ) The pixel calibration size in M directions, such as Figure 5 As shown in the figure. The value of M is 24.
[0058] Furthermore, the S103: obtaining an image of the dam to be measured; inputting the image of the dam to be measured into a trained crack segmentation network to obtain a crack mask map, wherein the image of the dam to be measured is obtained by taking a monocular camera.
[0059] Furthermore, the S103: obtains the dam image to be measured; inputs the dam image to be measured into the trained crack segmentation network to obtain a crack mask image, wherein the white part of the crack mask image is the crack area, the gray value is 255, and the other black part is the background area, the gray value is 0.
[0060] Furthermore, the S103: obtaining the image of the dam to be measured; inputting the image of the dam to be measured into the trained crack segmentation network to obtain a crack mask map, wherein the trained crack segmentation network is implemented using a U-NET network.
[0061] Further, the S103: obtain the image of the dam to be measured; input the image of the dam to be measured into the trained crack segmentation network to obtain a crack mask map, and the training process of the trained crack segmentation network includes: constructing a training set, which is a dam image with a known crack area; inputting the training set into the crack segmentation network to train the crack segmentation network, and when the loss function in the crack segmentation network no longer decreases, or when the number of iterations reaches a set number, stopping the training to obtain the trained crack segmentation network.
[0062] The crack segmentation network adopts a four-layer U-net convolutional neural network architecture connected in sequence. The network input is a three-channel crack image, and the output is a single-channel crack mask image. The crack segmentation dataset is used to train the U-net model. Figure 6 , Figure 7 , Figure 8 and Fig. 9 As shown, Figure 6 This is an example of the original crack image of Example 1; Figure 7 is the mask image after segmentation in the first embodiment; Figure 8 The original crack image of Example 1; Fig. 9 This is the mask image after segmentation in the first embodiment.
[0063] Furthermore, the construction of the training set includes: collecting images of dam cracks under different lighting and weather conditions, segmenting the crack area by manual annotation, and obtaining a crack mask map of each crack image; using data enhancement techniques such as translation, scaling, brightness enhancement, and random cropping to expand the image data volume, and constructing a segmented image data set with an image resolution of 360×360.
[0064] Furthermore, the S103: extracting the skeleton line of the crack area from the crack mask image, and determining the tangent direction and normal direction of each skeleton point on the skeleton line; the skeleton line refers to the connecting line of the middle skeleton points in the crack area.
[0065] From the crack mask image, extract the skeleton line of the crack area, delete the isolated skeleton points, and for the skeleton points on the remaining skeleton lines , use the KD tree to query the neighborhood skeleton points within the radius r; use the horizontal and vertical coordinates of the neighborhood skeleton points as the input of the principal component analysis algorithm, and calculate each skeleton point through the principal component analysis algorithm The tangent direction of the skeleton point is obtained based on the tangent direction of the skeleton point.
[0066] Further, the S103: based on the normal direction of each skeleton point, from the pixel calibration dimensions of the skeleton point in M directions, querying the pixel calibration dimension in the normal direction of each skeleton point includes: from the pixel calibration dimensions of the skeleton point in M directions, finding the direction with the smallest angle with the normal, and defining the pixel calibration dimension in the normal direction of the skeleton point as the pixel calibration dimension in this direction. The skeleton point is a pixel point in the image.
[0067] Furthermore, the S104: based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point, calculate the actual width of the crack at the location of each skeleton point, including: for each pixel point in the crack area, use the distance transformation function distanceTransform of the visual computing tool library cv2 to quickly calculate the minimum pixel distance between each crack point and the background; the background refers to other areas outside the crack area in the dam image.
[0068] For skeleton points , taking the minimum pixel distance as a reference, locate the crack edge point in the normal direction by increasing or decreasing the step size .
[0069] Assuming skeleton points With crack edge point The pixel distance between the two is , the pixel calibration size in the normal direction is ,but and Actual distance for .
[0070] Similarly, find the crack edge point in the opposite direction of the normal , the pixel calibration size in the opposite direction of the normal is , crack edge point With skeleton points Actual distance for .
[0071] The actual width of the crack at the skeleton point is defined as ,like Fig.10 shown.
[0072] Furthermore, the S104: based on the actual width of the crack at the location of all the skeleton points, calculating the physical parameters of the crack includes: after calculating the actual width of all the crack skeleton points, further counting the physical parameters such as the maximum width, average width, and crack area of the crack. The crack area is defined as the sum of the pixel areas of the crack, and the pixel area is equal to the product of the pixel calibration size in the horizontal direction and the vertical direction.
[0073] The present invention discloses a method for measuring physical parameters of dam cracks based on monocular images, which includes three core technologies: (1) dense calibration of pixel size of dot pattern image; (2) construction of crack segmentation model; and (3) calculation of crack physical parameters. The present invention uses a monocular dam crack image as input to automatically measure physical parameters such as crack width and area. The method is simple to operate, has strong scene adaptability, high measurement accuracy, and low hardware cost, and can be used for dam crack early warning.
[0074] Embodiment 2: This embodiment provides a physical parameter measurement system for dam cracks based on monocular images, including: an acquisition module, which is configured to: acquire a dot calibration cloth image; perform ellipse detection on the dot calibration cloth image to determine the nearest neighbor topology information for each ellipse center point; determine the ellipse triangular mesh topology information based on the nearest neighbor topology information of each ellipse center point; a determination module, which is configured to: in the ellipse triangular mesh topology information, acquire the pixel calibration size in M directions for each ellipse center point; in the dot calibration cloth image, based on the pixel calibration size in M directions of each ellipse center point, determine the pixel calibration size in M directions of each pixel point in the dot calibration cloth image; M is a positive integer, and the value of M is 24; a query module, The method is configured as follows: obtaining a dam crack image to be measured; inputting the dam crack image to be measured into a trained crack segmentation network to obtain a crack mask image; extracting a skeleton line in the middle of the crack from the crack mask image, and determining the tangent direction and normal direction of each skeleton point on the skeleton line; based on the normal direction of each skeleton point, querying the pixel calibration size in the normal direction of each skeleton point from the pixel calibration sizes in M directions of the skeleton point; an output module is configured as follows: calculating the actual width of the crack at the location of each skeleton point based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point; and calculating the physical parameters of the crack based on the actual width of the crack at the locations of all skeleton points.
[0075] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for measuring physical parameters of dam cracks based on monocular images, characterized in that: include: Get the dot calibration cloth image; Performing ellipse detection on the dot calibration cloth image, wherein the dot calibration cloth is laid on the surface of the dam to be measured; determining the nearest neighbor topology information for each ellipse center point; and determining the ellipse triangular mesh topology information based on the nearest neighbor topology information of each ellipse center point; In the ellipse triangular mesh topology information, the pixel calibration sizes in M directions are obtained for each ellipse center point; in the dot calibration cloth image, based on the pixel calibration sizes in M directions of each ellipse center point, the pixel calibration sizes in M directions of each pixel point in the dot calibration cloth image are determined; M is a positive integer; Acquire the image of the dam crack to be measured; input the image of the dam crack to be measured into the trained crack segmentation network to obtain a crack mask image; extract the skeleton line in the middle of the crack from the crack mask image, and determine the tangent direction and normal direction of the skeleton point on the skeleton line; based on the normal direction of each skeleton point, query the pixel calibration size in the normal direction of each skeleton point from the pixel calibration sizes in M directions of the skeleton point; Based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point, the actual width of the crack at each skeleton point is calculated; based on the actual width of the crack at all skeleton points, the physical parameters of the crack are calculated; The step of determining the nearest neighbor topology information for each ellipse center point specifically includes: Step (11) For each ellipse’s center point , using KD tree, query radius The center points of other ellipses within the range ; ; The center point of the ellipse found Store into the neighborhood candidate list; Step (12) traverses each ellipse center point in the neighborhood candidate list , calculate the center point of the ellipse and the center point of the ellipse Distance in pixel space , calculate the center point of the ellipse and the center point of the ellipse The connection with Axis Angle ,in, , ; Represents the center point of the ellipse The horizontal axis of Represents the center point of the ellipse The vertical coordinate of Represents the center point of the ellipse The horizontal axis of Represents the center point of the ellipse The vertical coordinate of express and The difference between express and The difference between Step (13) According to the ellipse parametric equation, calculate the center point as The ellipse with the center point is The ellipse, in Polar radius in the direction and polar radius ;in: ; ; ; when hour, ;when hour, ; in, The center point is The major axis of the ellipse is The angle of the axis, The center point is The radius of the minor axis of the ellipse, The center point is The radius of the major axis of the ellipse; and Indicates the center point is Ellipse and connecting line The horizontal and vertical coordinates of the intersection point, Represents the polar radius The relative angle used for calculation; ; ; ; when hour, ;when hour, ; The center point is The major axis of the ellipse is The angle of the axis, The center point is The radius of the minor axis of the ellipse, The center point is The radius of the major axis of the ellipse; and Indicates the center point is Ellipse and connecting line The horizontal and vertical coordinates of the intersection point, Represents the polar radius The relative angle used for calculation; Step (14) If Satisfy the conditions , then determine for The nearest neighbor ellipse center point, Point Pixel calibration size in direction for ;in, represents the safety factor; Indicates the actual radius of the black solid circle in the dot calibration cloth. It indicates the center distance between adjacent black solid circles of the dot calibration cloth; Step (15) repeats steps (11) to (14) to obtain the nearest neighbor topology information of each ellipse center point and the pixel calibration size in the nearest neighbor direction; the nearest neighbor topology information refers to the nearest neighbor ellipse center point; Among them, based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point, the actual width of the crack at the location of each skeleton point is calculated, including: For each pixel point in the crack area, a distance transformation function is used to quickly calculate the minimum pixel distance between each crack point and the background; the background refers to other areas outside the crack area in the dam image; For skeleton points , taking the minimum pixel distance as a reference, locate the crack edge point in the normal direction by increasing or decreasing the step size ; Assuming skeleton points With crack edge point The pixel distance between the two is , the pixel calibration size in the normal direction is ,but and Actual distance for ; Similarly, find the crack edge point in the opposite direction of the normal , the pixel calibration size in the opposite direction of the normal is , crack edge point With skeleton points Actual distance for ; The actual width of the crack at the skeleton point is defined as .
2. The method for measuring physical parameters of dam cracks based on monocular images as claimed in claim 1, characterized in that: Based on the nearest neighbor topology information of each ellipse center point, the ellipse triangle mesh topology information is determined, including: After the nearest neighbor topology information of each ellipse center point is constructed, it is determined whether the number of nearest neighbor ellipse center points of each ellipse center point is greater than 3. If so, the current ellipse center point is retained. If not, the current ellipse center point is deleted. Finally, the retained ellipse center point is The nearest ellipse center point to itself Connect the lines and then move the nearest ellipse center point and the other nearest neighbor ellipse center points Connect the lines to obtain the elliptical topological triangular mesh of the dot-calibrated cloth image.
3. The method for measuring physical parameters of dam cracks based on monocular images as claimed in claim 1, characterized in that: In the ellipse triangle mesh topology information, obtain the pixel calibration size in M directions for each ellipse center point, including: , get the nearest neighbor angles in different directions and the corresponding pixel calibration size Then, sort them in order from smallest to largest. Sort by Respectively and The horizontal and vertical coordinates are aligned every 15° within the range of 360 degrees. Resample to get M fixed angles , respectively ; with each As input, linear interpolation is used to calculate Corresponding pixel calibration size , a total of M pixel calibration sizes in resampling directions are obtained, M=24.
4. The method for measuring physical parameters of dam cracks based on monocular images as claimed in claim 1, characterized in that: In the dot calibration cloth image, based on the pixel calibration sizes in M directions of each ellipse center point, the pixel calibration sizes in M directions of each pixel point in the dot calibration cloth image are determined, including: For the pixel points located in the topological triangular grid of the ellipse center point, the pixel calibration size in M directions of the ellipse center point is used as a reference, and the pixel calibration size is interpolated by bilinear interpolation method to obtain the pixel calibration size in M directions of each pixel point; For pixels outside the topological triangle mesh at the center of the ellipse , find the nearest pixel point in the topological triangle mesh, and assign the pixel calibration size of the pixel point in M directions directly to .
5. The method for measuring physical parameters of dam cracks based on monocular images as claimed in claim 1, characterized in that: Extracting a skeleton line in the middle of the crack from the crack mask image, and determining the tangent direction and normal direction of the skeleton points on the skeleton line, wherein the skeleton line refers to a connecting line of the skeleton points in the middle of the crack area; From the crack mask image, extract the skeleton line of the crack area, delete the isolated skeleton points, and for the skeleton points on the remaining skeleton lines , use KD tree to query the neighborhood skeleton points within radius r; The horizontal and vertical coordinates of the neighborhood skeleton points are used as the input of the principal component analysis algorithm, and the principal component analysis algorithm is used to calculate each skeleton point The tangent direction of The tangent direction and the normal direction are perpendicular to each other. Based on the tangent direction of the skeleton point, the normal direction of the skeleton point is obtained.
6. The method for measuring physical parameters of dam cracks based on monocular images as claimed in claim 1, characterized in that: Based on the normal direction of each skeleton point, the pixel calibration size in the normal direction of each skeleton point is queried from the pixel calibration sizes in M directions of the skeleton point; including: From the pixel calibration sizes of the skeleton points in M directions, find the direction with the smallest angle with the normal line, and the pixel calibration size in the direction of the skeleton point normal line is defined as the pixel calibration size in this direction.
7. The method for measuring physical parameters of dam cracks based on monocular images as claimed in claim 1, characterized in that: Based on the actual width of the crack at the location of all skeleton points, the physical parameters of the crack are calculated, including: after calculating the actual width of all crack skeleton points, further statistics are made on the maximum width, average width, and crack area of the crack; among which, the crack area is defined as the sum of the pixel areas of the crack, and the pixel area is equal to the product of the pixel calibration dimensions in the horizontal and vertical directions.
8. A dam crack physical parameter measurement system based on a monocular image, using the dam crack physical parameter measurement method based on a monocular image according to any one of claims 1 to 7, characterized in that: include: An acquisition module is configured to: acquire a dot calibration cloth image; wherein the dot calibration cloth is laid on the surface of the dam to be measured; perform ellipse detection on the dot calibration cloth image to determine the nearest neighbor topology information for each ellipse center point; and determine the ellipse triangular mesh topology information based on the nearest neighbor topology information of each ellipse center point; The determination module is configured to: obtain pixel calibration sizes in M directions for each ellipse center point in the ellipse triangular mesh topology information; determine the pixel calibration sizes in M directions for each pixel point in the dot calibration cloth image based on the pixel calibration sizes in M directions for each ellipse center point in the dot calibration cloth image; M is a positive integer; The query module is configured to: obtain a dam crack image to be measured; input the dam crack image to be measured into a trained crack segmentation network to obtain a crack mask image; extract a skeleton line in the middle of the crack from the crack mask image, and determine the tangent direction and normal direction of the skeleton point on the skeleton line; based on the normal direction of each skeleton point, query the pixel calibration size in the normal direction of each skeleton point from the pixel calibration sizes in M directions of the skeleton point; The output module is configured to: calculate the actual width of the crack at the location of each skeleton point based on the pixel distance between each skeleton point and the crack edge point, and the pixel calibration size in the normal direction of each skeleton point; calculate the physical parameters of the crack based on the actual width of the crack at the locations of all skeleton points.
