Defect identification method for trenchless municipal pipeline
By segmenting and multi-dimensional analysis of crack characteristics in municipal pipelines, combining inclination and smoothness, the problem of impurities being misidentified as cracks is solved, the AI recognition accuracy is improved, and more accurate data is provided for municipal pipeline maintenance.
Patent Information
- Application Number
- CN202411492577.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2024-12-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Impurities of different colors on the inner wall of municipal pipelines are easily misidentified by AI as cracks, resulting in inaccurate defect identification.
By obtaining crack characteristic images in municipal pipelines, establishing a skeleton and segmenting, calculating inclination, smoothness and uniformity, combining the central axis and historical statistics of municipal pipelines, real crack characteristics are selected to reduce misidentification.
It improves the accuracy of AI in identifying municipal pipeline cracks, provides more accurate maintenance reference data, and reduces misjudgment.
Smart Images

Figure CN119103485A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of municipal pipeline defect identification, and in particular to a method for identifying defects in trenchless municipal pipelines. Background Art
[0002] Trenchless municipal pipelines are laid underground, and the inside of the pipelines needs to be inspected regularly to prevent abnormalities. During the inspection, robots are usually required to obtain images of the municipal pipelines through image acquisition equipment. For images, one is the traditional method of manually checking the images, and the other is the mainstream method of automatic recognition through AI to discover defects in municipal pipelines, thereby deciding whether to repair the inside of the pipeline and locating the defect.
[0003] Municipal pipelines are mainly concrete pipes, which contain a large amount of domestic sewage and impurities brought in by road rainwater. Therefore, the sewage inside is relatively turbid. With the effects of domestic sewage, groundwater seepage and evaporation, the sewage level in municipal pipelines may change frequently. Therefore, some floating or suspended impurities in the sewage may adhere to the rougher inner wall of the concrete pipe. When AI recognizes crack features through images, it is easy to mistake impurities of different colors for crack features, resulting in misidentification. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a defect identification method for trenchless municipal pipelines, which solves the problem that impurities of different colors are often attached to the inner walls of municipal pipelines currently made of concrete, which can easily cause AI to mistakenly identify them as cracks.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A defect identification method for a trenchless municipal pipeline, the method comprising:
[0007] S1. Acquire a first image containing a first crack feature in a municipal pipeline;
[0008] S2, establishing a first skeleton of the first crack feature, and segmenting the first skeleton at intersections in the first skeleton to obtain a plurality of second skeletons and second crack features;
[0009] S3, establishing a minimum rectangle containing the second skeleton, and calculating the angles between the long side of the minimum rectangle and the central axis and the cross section of the municipal pipeline as the first inclination and the second inclination, and marking the first image whose first inclination or the second inclination is greater than the inclination threshold as the second image;
[0010] S4, calculating the straight-line distance between the two ends of the second skeleton and the skeleton length in the second image, calculating the smoothness of the second crack feature, and marking the second image corresponding to the second crack feature within the smoothness range as the third image;
[0011] S5, calculating the crack width of each location of the second crack feature in the third image, and calculating the uniformity of the crack width of the second crack feature according to the skeleton length and the crack width;
[0012] S6, setting a uniformity range, and determining whether the corresponding third image is a crack image according to whether the uniformity of the second crack feature is within the uniformity range;
[0013] If yes, the third image is marked as a crack image and output;
[0014] If not, the third image and the first image not corresponding to the third image are marked as suspicious images and output.
[0015] Preferably, in step S2, the following steps are specifically included:
[0016] S21, establishing a first skeleton of a first crack feature;
[0017] S22, sequentially establishing a nine-square diagram centered on any pixel point on the first skeleton;
[0018] S23, counting the number of pixel points on the first skeleton contained in the nine-square grid, marking the pixel points as overlapping pixel points, and when the number of overlapping pixel points is greater than 3, marking the overlapping pixel point at the center of the nine-square grid as the skeleton intersection point of the first skeleton;
[0019] S24, removing skeleton intersections on the first crack feature to obtain a plurality of second skeletons;
[0020] S25, taking the skeleton intersection as the center, establishing a skeleton circle with a gradually increasing radius, and gradually acquiring blank pixel points that are not pixels within the first crack feature and are not adjacent, until the number of blank pixel points is 1 less than the number of overlapping pixel points;
[0021] S26, connecting each blank pixel point with the corresponding skeleton intersection point to obtain a plurality of segmentation lines;
[0022] S27, deleting the pixel points on the first crack feature on the segmentation line to obtain a plurality of second crack features.
[0023] Preferably, in step S25, the following steps are specifically included:
[0024] S251, establishing a skeleton circle with the skeleton intersection as the center and the initial radius as 1 pixel;
[0025] S252, increasing the radius of the skeleton circle by 1 pixel;
[0026] S253, counting the number and coordinates of blank pixels newly added on the non-first crack feature within the skeleton circle;
[0027] S254, deleting newly added blank pixels adjacent to existing blank pixels according to the coordinates of the blank pixels;
[0028] S255, counting the number of blank pixels, and determining whether the number of blank pixels is 1 less than the number of overlapping pixels;
[0029] If yes, proceed to step S26;
[0030] If not, return to step S252.
[0031] Preferably, in step S3, the following steps are specifically included:
[0032] S31, obtaining the coordinates of all pixel points on the second skeleton;
[0033] S32, respectively calculating the average values of the X-axis, Y-axis and Z-axis coordinates of each pixel point on the second skeleton to obtain the coordinates of the standard point;
[0034] S33. Establish a normal plane using the coordinates of the standard point and the central axis of the municipal pipeline;
[0035] S34, establishing a projection plane passing through the standard point and perpendicular to the normal plane;
[0036] S35, unfolding the second skeleton corresponding to the standard point onto the projection surface starting from the standard point to obtain a second skeleton projection;
[0037] S36, establishing a minimum rectangle of the second skeleton projection, and obtaining the long side vector of the minimum rectangle;
[0038] S37, calculating the angle between the long side vector of the minimum rectangle and the central axis vector of the municipal pipeline as the first inclination; the calculation formula of the first inclination is:
[0039]
[0040] In the above formula, P1 represents the first inclination, and They represent the long side vector of the minimum rectangle and the center axis vector of the municipal pipeline respectively;
[0041] S38, calculating the angle between the long side vector and the normal vector of the cross section of the municipal pipeline as the second inclination; the calculation formula of the second inclination is:
[0042]
[0043] In the above formula, P2 represents the second inclination, and They represent the long side vector of the minimum rectangle and the center axis vector of the municipal pipeline respectively. The center axis vector of the municipal pipeline is the normal vector of the cross section of the municipal pipeline.
[0044] S39: Mark the first image whose first inclination or second inclination is greater than the inclination threshold as the second image.
[0045] Preferably, in step S35, the following steps are specifically included:
[0046] S351, establishing a reference plane perpendicular to both the projection plane and the normal plane;
[0047] S352, sequentially establishing parallel planes parallel to the reference plane at each pixel point on the second skeleton;
[0048] S353, sequentially obtaining perpendicular lines where each parallel surface intersects the reference surface;
[0049] S354, obtaining the coordinates of the intersection of the vertical line on the inner wall of the municipal pipeline, and marking the intersection as a reference point;
[0050] S355. Obtain the intersection of the second skeleton and the reference surface and mark it as a skeleton point, and calculate the arc length of the skeleton point and the reference point along the inner wall of the municipal pipeline; the calculation formula of the arc length is:
[0051]
[0052] S356, obtaining a straight line where the projection surface and the normal plane intersect and marking it as a reference line;
[0053] S357, mark the pixel point on the projection plane that is an arc length away from the reference line and located on the reference plane where the corresponding skeleton point is located as the projection point, and make the first perpendicular point and the second perpendicular point of the skeleton point and the projection point relative to the perpendicular line respectively, and the unit vector of the line connecting the skeleton point and the first perpendicular point is the same as the unit vector of the projection point and the second perpendicular point;
[0054] S358, obtaining projection points of all pixel points on the second skeleton expanded onto the projection plane to obtain a second skeleton projection.
[0055] Preferably, in step S4, the following steps are specifically included:
[0056] S41, calculating the Euclidean distance between the two ends of the second skeleton according to the pixel coordinates at the two ends of the second skeleton in the second image as the straight-line distance;
[0057] S42, sequentially calculating the unit distance between any two adjacent pixel points on the second skeleton, and calculating the skeleton length; the calculation formula for the skeleton length is:
[0058]
[0059] In the above formula, L represents the skeleton length of the second skeleton, D(i, i+1) represents the distance between the i-th pixel point on the second skeleton and its adjacent pixel point, i.e., the i+1-th pixel point on the second skeleton, and m represents the total number of pixels on the second skeleton;
[0060] S43, calculating the skeleton length and the skeleton straight line distance to obtain the smoothness of the second crack feature; the calculation formula of the smoothness of the second crack feature is:
[0061]
[0062] In the above formula, ST represents the smoothness of the second crack feature, L represents the skeleton length of the second skeleton, and S represents the Euclidean distance between the two ends of the second skeleton, that is, the straight-line distance;
[0063] S44, setting a smoothness range, and marking the second image corresponding to the second crack feature within the smoothness range as the third image.
[0064] Preferably, in step S5, the following steps are specifically included:
[0065] S51, establishing a normal line using any pixel point on the second skeleton in the third image;
[0066] S52, starting from the pixel point, searching along the normal line to both sides to the first boundary point of the second crack feature;
[0067] S53, calculating the Euclidean distance between the two boundary points according to the coordinates of the two boundary points, so as to obtain the crack width of the second crack feature at the corresponding pixel point on the second skeleton;
[0068] S54. Calculate the uniformity of the crack width according to the crack width at each pixel point on the second skeleton according to the second crack feature.
[0069] Preferably, in step S51, the following steps are specifically included:
[0070] S511, establishing a tangent line passing through any pixel point on the second skeleton, and marking the pixel point as a reference point;
[0071] S512, obtaining a plurality of sequentially adjacent reference pixel points including a reference point on the second skeleton;
[0072] S513, calculating the tangent line equation when the sum of the distances from each reference pixel to the tangent line is the smallest;
[0073] S514. Establish a normal line according to the tangent line equation and the pixel coordinates of the reference point; the normal line equation is expressed as:
[0074]
[0075] In the above formula, y 2 and x 2 They represent the dependent variable and independent variable of the normal line equation respectively, and c is the second constant.
[0076] Preferably, in step S54, the calculation formula for the uniformity of the crack width of the second crack feature is:
[0077]
[0078] In the above formula, WU represents the uniformity of the crack width of the second crack feature, W i The crack width of the second crack feature at the i-th pixel point on the second skeleton, m represents the total number of pixels on the second skeleton, and L represents the skeleton length of the second skeleton.
[0079] Preferably, in step S513, the tangent line equation satisfies the following relationship:
[0080]
[0081] In the above formula, y 1 and x 1 They represent the dependent variable and independent variable of the tangent line equation, b is the first constant, K is the slope of the tangent line equation, and D min represents the minimum value of the sum of the distances from each reference pixel to the tangent line, j and t represent the jth and tth pixel points on the second skeleton respectively. and They respectively represent the X-axis and Y-axis coordinates of the i-th pixel point on the second skeleton.
[0082] Compared with the prior art, the present invention provides a method for identifying defects in trenchless municipal pipelines, which has the following beneficial effects:
[0083] 1. The present invention obtains a first image containing a first crack feature that has been preliminarily identified, and then obtains a plurality of second crack features by segmenting the first crack feature, thereby facilitating targeted analysis of the second crack feature. Subsequently, the first inclination, the second inclination, the smoothness and the uniformity are further calculated, and the second crack feature is further analyzed from multiple dimensions according to the actual municipal pipeline crack characteristics and the crack characteristics obtained by modeling analysis to determine whether the second crack feature is a real crack, thereby further improving the accuracy of AI in identifying cracks through images and providing more accurate reference data for the maintenance of municipal pipelines.
[0084] 2. The present invention establishes a nine-square grid with any pixel point on the first skeleton as the center, and identifies the skeleton intersection points according to the types of pixel points in the nine-square grid. Subsequently, a skeleton circle is established with the skeleton intersection points as the center, and blank pixels are obtained by gradually expanding the radius of the skeleton circle, so as to achieve the segmentation of the first crack feature by establishing a segmentation line and minimize the number of removed pixels. At the same time, the segmentation line of this form of the present invention is used to ensure the integrity of several second crack features as much as possible, so as to facilitate more accurate analysis later.
[0085] 3. The present invention calculates the first inclination and the second inclination and takes the central axis of the municipal pipeline as a reference benchmark, so as to formulate an inclination threshold according to the crack distribution characteristics obtained from historical statistics and theoretical modeling analysis, thereby realizing the screening of the first image containing the second crack feature.
[0086] 4. By calculating the smoothness of the crack feature, selecting the third image by the smoothness range, and finally selecting the crack image according to the uniformity of the crack width, the first image containing the second crack feature can be screened layer by layer from multiple dimensions to improve the accuracy of crack identification in municipal pipelines. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0088] Figure 1 is a flow chart of the defect identification method of the present invention;
[0089] Figure 2 Schematic diagram of the dividing line of the first crack feature of the present invention. DETAILED DESCRIPTION
[0090] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0091] Those skilled in the art can understand that all or part of the steps in the following embodiments can be completed by instructing the relevant hardware through a program, so the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0092] When maintaining municipal pipelines, maintenance personnel need to decide whether to dig up the municipal pipelines according to the number and degree of defect characteristics such as cracks inside the municipal pipelines. Therefore, each time the pipeline is dug up, a huge cost is incurred. Therefore, it is necessary to improve the accuracy of defect recognition. By statistically analyzing the crack distribution status of existing municipal pipelines and modeling through finite element analysis, the crack distribution rules of municipal pipelines are analyzed, thereby further realizing accurate recognition of cracks in municipal pipelines on the basis of existing AI defect recognition technology, and solving the problem that impurities of different colors are often attached to the inner wall of municipal pipelines made of concrete, which are easily misidentified as cracks by AI, thereby causing maintenance personnel to misjudge the severity of defects in municipal pipelines. The present invention provides a defect recognition method for non-excavation municipal pipelines, such as Figure 1 As shown, the method includes:
[0093] S1. Obtain a first image containing a first crack feature in a municipal pipeline; the first image is generally taken by a robot carrying a video device and the cracks in the municipal pipeline are preliminarily extracted through AI using algorithms such as convolutional neural networks and edge detection, thereby obtaining the first image containing the first crack feature.
[0094] S2, establishing a first skeleton of the first crack feature, and segmenting it at the intersection of the first skeleton to obtain a plurality of second skeletons and second crack features; the first crack feature obtained in the municipal pipeline may have different branches, and each crack branch may be caused by different forces, so it is necessary to segment them so as to analyze them separately, and it is also possible that some crack branches are misidentified by impurities, so they need to be segmented for analysis. In step S2, the following steps are specifically included:
[0095] S21, establishing a first skeleton of a first crack feature;
[0096] S22, sequentially establishing a nine-square diagram centered on any pixel point on the first skeleton;
[0097] S23, counting the number of pixel points on the first skeleton contained in the nine-square grid, marking the pixel points as overlapping pixel points, and when the number of overlapping pixel points is greater than 3, marking the overlapping pixel point at the center of the nine-square grid as the skeleton intersection point of the first skeleton;
[0098] S24, removing skeleton intersections on the first crack feature to obtain a plurality of second skeletons;
[0099] S25, taking the skeleton intersection as the center, establishing a skeleton circle with a gradually increasing radius, and gradually obtaining blank pixels that are not adjacent to the pixels in the first crack feature, until the number of blank pixels is 1 less than the number of overlapping pixels; in order to minimize the integrity of the skeleton branch when segmenting the skeleton, that is, the integrity of the second crack feature obtained subsequently, so as to improve the resolution effect of the second crack feature, the segmentation process of the first crack feature is further refined, such as Figure 2 As shown, in step S25, the following steps are specifically included:
[0100] S251, establishing a skeleton circle with the skeleton intersection as the center and the initial radius as 1 pixel;
[0101] S252, increasing the radius of the skeleton circle by 1 pixel;
[0102] S253, counting the number and coordinates of blank pixels newly added on the non-first crack feature within the skeleton circle;
[0103] S254, deleting newly added blank pixels adjacent to existing blank pixels according to the coordinates of the blank pixels;
[0104] S255, counting the number of blank pixels, and determining whether the number of blank pixels is 1 less than the number of overlapping pixels;
[0105] If yes, proceed to step S26;
[0106] If not, return to step S252.
[0107] S26, connecting each blank pixel point with the corresponding skeleton intersection point to obtain a plurality of segmentation lines;
[0108] S27, deleting the pixel points on the first crack feature located on the segmentation line to obtain a plurality of second crack features, so that the plurality of second crack features segmented out can maintain their integrity as much as possible, while reducing the pixel points that need to be deleted during segmentation.
[0109] S3, establish a minimum rectangle containing the second skeleton, and calculate the angles between the long side of the minimum rectangle and the central axis and the cross section of the municipal pipeline as the first inclination and the second inclination, and mark the first image whose first inclination or second inclination is greater than the inclination threshold as the second image; due to the characteristics of the municipal pipeline's own structure and the external force it is subjected to, the extension direction of the second skeleton in the municipal pipeline has a certain regularity, thereby realizing the distinction between cracks and impurities. In step S3, the following steps are specifically included:
[0110] S31, obtaining the coordinates of all pixel points on the second skeleton;
[0111] S32, respectively calculating the average values of the X, Y and Z axis coordinates of each pixel point on the second skeleton to obtain the coordinates of the standard point; the calculation formula of the coordinates of the standard point is:
[0112]
[0113] In the above formula, x 0 ,y 0 and z 0 They represent the X, Y, and Z coordinates of the standard point, n represents the total number of pixels on the second skeleton, and x i ,y i and z i Respectively represent the X, Y and Z axis coordinates of the i-th pixel point on the second skeleton;
[0114] S33. Establish a normal plane using the coordinates of the standard point and the central axis of the municipal pipeline;
[0115] S34, establishing a projection plane passing through the standard point and perpendicular to the normal plane;
[0116] S35, unfolding the second skeleton corresponding to the standard point from the standard point to the projection surface to obtain the second skeleton projection; since the second skeleton is likely to exist in the three-dimensional space, it is necessary to transform it to the plane to facilitate the subsequent establishment of the minimum rectangle on the plane and to facilitate the analysis of the extension direction of the second skeleton. At the same time, in order to further explain in detail the method of unfolding the second skeleton to the projection surface, in step S35, the following steps are specifically included:
[0117] S351, establishing a reference plane perpendicular to both the projection plane and the normal plane;
[0118] S352, sequentially establishing parallel planes parallel to the reference plane at each pixel point on the second skeleton;
[0119] S353, sequentially obtaining perpendicular lines where each parallel surface intersects the reference surface;
[0120] S354, obtaining the coordinates of the intersection of the vertical line on the inner wall of the municipal pipeline, and marking the intersection as a reference point;
[0121] S355. Obtain the intersection of the second skeleton and the reference surface and mark it as a skeleton point, and calculate the arc length of the skeleton point and the reference point along the inner wall of the municipal pipeline; the calculation formula of the arc length is:
[0122]
[0123] S356, obtaining a straight line where the projection surface and the normal plane intersect and marking it as a reference line;
[0124] S357, mark the pixel point on the projection plane that is an arc length away from the reference line and located on the reference plane where the corresponding skeleton point is located as the projection point, and make the first perpendicular point and the second perpendicular point of the skeleton point and the projection point relative to the perpendicular line respectively, and the unit vector of the line connecting the skeleton point and the first perpendicular point is the same as the unit vector of the projection point and the second perpendicular point;
[0125] S358, obtaining projection points of all pixel points on the second skeleton expanded onto the projection plane to obtain a second skeleton projection.
[0126] S36, establishing a minimum rectangle of the second skeleton projection, and obtaining the long side vector of the minimum rectangle;
[0127] S37, calculating the angle between the long side vector of the minimum rectangle and the central axis vector of the municipal pipeline as the first inclination; the calculation formula of the first inclination is:
[0128]
[0129] In the above formula, P1 represents the first inclination, and They represent the long side vector of the minimum rectangle and the center axis vector of the municipal pipeline respectively;
[0130] S38, calculating the angle between the long side vector and the normal vector of the cross section of the municipal pipeline as the second inclination; the calculation formula of the second inclination is:
[0131]
[0132] In the above formula, P2 represents the second inclination, and They represent the long side vector of the minimum rectangle and the center axis vector of the municipal pipeline respectively. The center axis vector of the municipal pipeline is the normal vector of the cross section of the municipal pipeline.
[0133] S39: Mark the first image whose first inclination or second inclination is greater than the inclination threshold as the second image.
[0134] S4, calculating the straight-line distance between the two ends of the second skeleton and the skeleton length in the second image, and calculating the smoothness of the second crack feature, and marking the second image corresponding to the second crack feature within the smoothness range as the third image; normal cracks have certain fluctuations, and the fluctuation degree of cracks on concrete materials also has a certain range, so the second crack feature can be distinguished based on this to distinguish whether it is an impurity. In step S4, the following steps are specifically included:
[0135] S41, according to the pixel coordinates at the two ends of the second skeleton in the second image, calculate the Euclidean distance between the two ends of the second skeleton as the straight-line distance; the calculation formula of the straight-line distance is:
[0136] S=D(1,B)
[0137] In the above formula, S represents the Euclidean distance between the two ends of the second skeleton, that is, the straight-line distance, and D(1,B) represents the Euclidean distance between the first pixel point and the last pixel point B on the second skeleton.
[0138] S42, sequentially calculating the unit distance between any two adjacent pixel points on the second skeleton, and calculating the skeleton length; the calculation formula for the skeleton length is:
[0139]
[0140] In the above formula, L represents the skeleton length of the second skeleton, D(i, i+1) represents the distance between the i-th pixel point on the second skeleton and its adjacent pixel point, i.e., the i+1-th pixel point on the second skeleton, and m represents the total number of pixels on the second skeleton;
[0141] S43, calculating the skeleton length and the skeleton straight line distance to obtain the smoothness of the second crack feature; the calculation formula of the smoothness of the second crack feature is:
[0142]
[0143] In the above formula, ST represents the smoothness of the second crack feature, L represents the skeleton length of the second skeleton, and S represents the Euclidean distance between the two ends of the second skeleton, that is, the straight-line distance;
[0144] S44, setting a smoothness range, and marking the second image corresponding to the second crack feature within the smoothness range as the third image.
[0145] S5, calculating the crack width of each location of the second crack feature in the third image, and calculating the uniformity of the crack width of the second crack feature according to the skeleton length and the crack width; the crack width on the municipal pipeline made of concrete material has a certain uniformity, and the crack width of each location of the second crack feature fluctuates within a certain amplitude range, so it is determined that the second crack feature in the third image is a crack or an impurity. In step S5, the following steps are specifically included:
[0146] S51, establishing a normal line at any pixel point on the second skeleton in the third image; in order to facilitate the subsequent point selection on the second crack feature to calculate the crack width, the intersection of the normal line and the contour line of the second crack feature is used as the pixel point for crack width calculation. In step S51, the following steps are specifically included:
[0147] S511, establishing a tangent line passing through any pixel point on the second skeleton, and marking the pixel point as a reference point;
[0148] S512, obtaining a plurality of sequentially adjacent reference pixel points including a reference point on the second skeleton;
[0149] S513, calculating the equation of the tangent line when the sum of the distances from each reference pixel to the tangent line is the smallest; the equation of the tangent line satisfies the following relationship:
[0150] y 1 =kx 1 +b
[0151]
[0152] In the above formula, y 1 and x 1 They represent the dependent variable and independent variable of the tangent line equation, b is the first constant, K is the slope of the tangent line equation, and D min represents the minimum value of the sum of the distances from each reference pixel to the tangent line, j and t represent the jth and tth pixel points on the second skeleton respectively. and Respectively represent the X-axis and Y-axis coordinates of the i-th pixel point on the second skeleton;
[0153] S514. Establish a normal line according to the tangent line equation and the pixel coordinates of the reference point; the normal line equation is expressed as:
[0154]
[0155] In the above formula, y 2 and x 2 They represent the dependent variable and independent variable of the normal line equation respectively, and c is the second constant;
[0156] S52, starting from the pixel point, searching along the normal line to both sides to the first boundary point of the second crack feature;
[0157] S53, calculating the Euclidean distance between the two boundary points according to the coordinates of the two boundary points, so as to obtain the crack width of the second crack feature at the corresponding pixel point on the second skeleton;
[0158] S54, calculating the uniformity of the crack width according to the crack width of the second crack feature at each pixel point on the second skeleton; the calculation formula for the uniformity of the crack width of the second crack feature is:
[0159]
[0160] In the above formula, WU represents the uniformity of the crack width of the second crack feature, W i The crack width of the second crack feature at the i-th pixel point on the second skeleton, m represents the total number of pixels on the second skeleton, and L represents the skeleton length of the second skeleton.
[0161] S6, setting a uniformity range, and determining whether the corresponding third image is a crack image according to whether the uniformity of the second crack feature is within the uniformity range;
[0162] If yes, the third image is marked as a crack image and output;
[0163] If not, the third image and the first image not corresponding to the third image are marked as suspicious images and output.
[0164] The present invention obtains a first image containing a first crack feature that has been preliminarily identified. Since the first crack feature may be composed of different crack branches, and different crack branches may be real cracks and impurities, and real cracks may also be formed by different external forces, the first crack feature is segmented to obtain a plurality of second crack features, thereby facilitating the analysis of the second crack feature. Subsequently, the first inclination, the second inclination, smoothness and uniformity are further calculated, and the second crack feature is analyzed from multiple dimensions to determine whether the second crack feature is a real crack. Finally, a suspicious image is output at the same time to facilitate manual determination of the accuracy of the algorithm, and the parameters are continuously improved, thereby continuously improving the recognition accuracy of the algorithm for crack features, and providing more accurate reference data for the maintenance of municipal pipelines.
[0165] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for identifying defects in a trenchless municipal pipeline, characterized in that: The method includes: S1. Acquire a first image containing a first crack feature in a municipal pipeline; S2, establishing a first skeleton of the first crack feature, and segmenting the first skeleton at intersections in the first skeleton to obtain a plurality of second skeletons and second crack features; S3, establishing a minimum rectangle containing the second skeleton, and calculating the angles between the long side of the minimum rectangle and the central axis and the cross section of the municipal pipeline as the first inclination and the second inclination, and marking the first image whose first inclination or the second inclination is greater than the inclination threshold as the second image; S4, calculating the straight-line distance between the two ends of the second skeleton and the skeleton length in the second image, calculating the smoothness of the second crack feature, and marking the second image corresponding to the second crack feature within the smoothness range as the third image; S5, calculating the crack width of each location of the second crack feature in the third image, and calculating the uniformity of the crack width of the second crack feature according to the skeleton length and the crack width; S6, setting a uniformity range, and determining whether the corresponding third image is a crack image according to whether the uniformity of the second crack feature is within the uniformity range; If yes, the third image is marked as a crack image and output; If not, the third image and the first image not corresponding to the third image are marked as suspicious images and output.
2. The defect identification method according to claim 1, characterized in that: In step S2, the following steps are specifically included: S21, establishing a first skeleton of a first crack feature; S22, sequentially establishing a nine-square diagram centered on any pixel point on the first skeleton; S23, counting the number of pixel points on the first skeleton contained in the nine-square grid, marking the pixel points as overlapping pixel points, and when the number of overlapping pixel points is greater than 3, marking the overlapping pixel point at the center of the nine-square grid as the skeleton intersection point of the first skeleton; S24, removing skeleton intersections on the first crack feature to obtain a plurality of second skeletons; S25, taking the skeleton intersection as the center, establishing a skeleton circle with a gradually increasing radius, and gradually acquiring blank pixel points that are not pixels within the first crack feature and are not adjacent, until the number of blank pixel points is 1 less than the number of overlapping pixel points; S26, connecting each blank pixel point with the corresponding skeleton intersection point to obtain a plurality of segmentation lines; S27, deleting the pixel points on the first crack feature on the segmentation line to obtain a plurality of second crack features.
3. The defect identification method according to claim 2, characterized in that: In step S25, the following steps are specifically included: S251, establishing a skeleton circle with the skeleton intersection as the center and the initial radius as 1 pixel; S252, increasing the radius of the skeleton circle by 1 pixel; S253, counting the number and coordinates of blank pixels newly added on the non-first crack feature within the skeleton circle; S254, deleting newly added blank pixels adjacent to existing blank pixels according to the coordinates of the blank pixels; S255, counting the number of blank pixels, and determining whether the number of blank pixels is 1 less than the number of overlapping pixels; If yes, proceed to step S26; If not, return to step S252.
4. The defect identification method according to claim 1, characterized in that: In step S3, the following steps are specifically included: S31, obtaining the coordinates of all pixel points on the second skeleton; S32, respectively calculating the average values of the X-axis, Y-axis and Z-axis coordinates of each pixel point on the second skeleton to obtain the coordinates of the standard point; S33. Establish a normal plane using the coordinates of the standard point and the central axis of the municipal pipeline; S34, establishing a projection plane passing through the standard point and perpendicular to the normal plane; S35, unfolding the second skeleton corresponding to the standard point onto the projection surface starting from the standard point to obtain a second skeleton projection; S36, establishing a minimum rectangle of the second skeleton projection, and obtaining the long side vector of the minimum rectangle; S37, calculating the angle between the long side vector of the minimum rectangle and the central axis vector of the municipal pipeline as the first inclination; the calculation formula of the first inclination is: In the above formula, P1 represents the first inclination, and They represent the long side vector of the minimum rectangle and the center axis vector of the municipal pipeline respectively; S38, calculating the angle between the long side vector and the normal vector of the cross section of the municipal pipeline as the second inclination; the calculation formula of the second inclination is: In the above formula, P2 represents the second inclination, and They represent the long side vector of the minimum rectangle and the center axis vector of the municipal pipeline respectively. The center axis vector of the municipal pipeline is the normal vector of the cross section of the municipal pipeline. S39: Mark the first image whose first inclination or second inclination is greater than the inclination threshold as the second image.
5. The defect identification method according to claim 4, characterized in that: In step S35, the following steps are specifically included: S351, establishing a reference plane perpendicular to both the projection plane and the normal plane; S352, sequentially establishing a parallel plane parallel to the reference plane at each pixel point on the second skeleton; S353, sequentially obtaining perpendicular lines where each parallel surface intersects the reference surface; S354, obtaining the coordinates of the intersection of the vertical line on the inner wall of the municipal pipeline, and marking the intersection as a reference point; S355, obtaining the intersection of the second skeleton and the reference surface and marking it as a skeleton point, and calculating the arc length of the skeleton point and the reference point along the inner wall of the municipal pipeline; the calculation formula of the arc length is: S356, obtaining a straight line where the projection surface and the normal plane intersect and marking it as a reference line; S357, mark the pixel point on the projection plane that is an arc length away from the reference line and located on the reference plane where the corresponding skeleton point is located as the projection point, and make the first perpendicular point and the second perpendicular point of the skeleton point and the projection point relative to the perpendicular line respectively, and the unit vector of the line connecting the skeleton point and the first perpendicular point is the same as the unit vector of the projection point and the second perpendicular point; S358, obtaining projection points of all pixel points on the second skeleton expanded onto the projection plane to obtain a second skeleton projection.
6. The defect identification method according to claim 1, characterized in that: In step S4, the following steps are specifically included: S41, calculating the Euclidean distance between the two ends of the second skeleton according to the pixel coordinates at the two ends of the second skeleton in the second image as the straight-line distance; S42, sequentially calculating the unit distance between any two adjacent pixel points on the second skeleton, and calculating the skeleton length; the calculation formula for the skeleton length is: In the above formula, L represents the skeleton length of the second skeleton, D(i, i+1) represents the distance between the i-th pixel point on the second skeleton and its adjacent pixel point, i.e., the i+1-th pixel point on the second skeleton, and m represents the total number of pixels on the second skeleton; S43, calculating the skeleton length and the skeleton straight line distance to obtain the smoothness of the second crack feature; the calculation formula of the smoothness of the second crack feature is: In the above formula, ST represents the smoothness of the second crack feature, L represents the skeleton length of the second skeleton, and S represents the Euclidean distance between the two ends of the second skeleton, that is, the straight-line distance; S44, setting a smoothness range, and marking the second image corresponding to the second crack feature within the smoothness range as the third image.
7. The defect identification method according to claim 1, characterized in that: In step S5, the following steps are specifically included: S51, establishing a normal line using any pixel point on the second skeleton in the third image; S52, starting from the pixel point, searching along the normal line to both sides to the first boundary point of the second crack feature; S53, calculating the Euclidean distance between the two boundary points according to the coordinates of the two boundary points, so as to obtain the crack width of the second crack feature at the corresponding pixel point on the second skeleton; S54. Calculate the uniformity of the crack width according to the crack width at each pixel point on the second skeleton according to the second crack feature.
8. The defect identification method according to claim 7, characterized in that: In step S51, the following steps are specifically included: S511, establishing a tangent line passing through any pixel point on the second skeleton, and marking the pixel point as a reference point; S512, obtaining a plurality of sequentially adjacent reference pixel points including a reference point on the second skeleton; S513, calculating the tangent line equation when the sum of the distances from each reference pixel to the tangent line is the smallest; S514. Establish a normal line according to the tangent line equation and the pixel coordinates of the reference point; the normal line equation is expressed as: In the above formula, y 2 and x 2 They represent the dependent variable and independent variable of the normal line equation respectively, and c is the second constant.
9. The defect identification method according to claim 7, characterized in that: In step S54, the calculation formula for the uniformity of the crack width of the second crack feature is: In the above formula, WU represents the uniformity of the crack width of the second crack feature, W i The crack width of the second crack feature at the i-th pixel point on the second skeleton, m represents the total number of pixels on the second skeleton, and L represents the skeleton length of the second skeleton.
10. The defect identification method according to claim 8, characterized in that: In step S513, the tangent line equation satisfies the following relationship: yes 1 =kx 1 +b In the above formula, y 1 and x 1 They represent the dependent variable and independent variable of the tangent line equation, b is the first constant, K is the slope of the tangent line equation, and D min represents the minimum value of the sum of the distances from each reference pixel to the tangent line, j and t represent the jth and tth pixel points on the second skeleton respectively. and They respectively represent the X-axis and Y-axis coordinates of the i-th pixel point on the second skeleton.
