A method and device for evaluating the sedimentation degree of drainage pipelines based on image graphics fitting algorithm
Through the method based on the image graphics fitting algorithm, the degree of deposition of drainage pipelines is detected, and the problems of low detection efficiency and low accuracy in the prior art are solved, and a more accurate and efficient assessment of pipeline health status is achieved.
Patent Information
- Application Number
- CN202411751415.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the prior art, the detection efficiency of the degree of deposition of drainage pipelines is low and the accuracy is not high, resulting in errors in the grading of pipeline health conditions, affecting maintenance and safety.
Using a method based on image graphics fitting algorithm, the drainage pipeline deposition pictures are collected through the image acquisition module, and the median filtering and global thresholding method are used for denoising and binarization. The effective arc and line segments are fitted in combination with Canny edge detection and least squares method, and the length and fan area of the deposition line are calculated, and the degree of deposition is then judged.
The detection accuracy of the degree of deposition of drainage pipelines is improved, manual interpretation errors are reduced, detection efficiency is improved, and accurate classification of pipeline health is ensured.
Smart Images

Figure CN119600008B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and a device for evaluating the degree of sedimentation in a drainage pipeline, and in particular to a method and a device for evaluating the degree of sedimentation in a drainage pipeline based on an image graph fitting algorithm, and belongs to the technical field of pipeline detection and sedimentation identification. Background Art
[0002] In the existing technology, it is important to conduct a comprehensive inspection of the inside of the pipeline and discover the problems inside the pipeline without damaging the pipeline. When conducting pipeline inspections and recording images for quality inspection, the proportion of water level rise caused by sedimentation is sometimes difficult to accurately identify manually, resulting in incorrect classification of the pipeline health status, affecting internal pipeline maintenance and leaving safety hazards.
[0003] At present, the drainage pipeline inspection industry usually uses manual identification to conduct quality inspection, but the workload is large and it is easy to make mistakes and miss judgments. Although there is software for auxiliary detection of the sedimentation degree of drainage pipelines, the recognition accuracy is low and manual review is required, resulting in low detection efficiency and low detection accuracy.
[0004] In summary, a method and device for evaluating the sedimentation degree of a drainage pipeline based on an image graphics fitting algorithm is needed. Summary of the invention
[0005] A brief overview of the present invention is provided below in order to provide a basic understanding of certain aspects of the present invention. It should be understood that this overview is not an exhaustive overview of the present invention. It is not intended to identify key or important parts of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to a more detailed description discussed later.
[0006] In view of this, in order to solve the problem of low detection efficiency and low accuracy caused by reliance on manual labor in traditional drainage pipeline sedimentation degree evaluation methods in the prior art, the present invention provides a drainage pipeline sedimentation degree evaluation method and device based on an image graphics fitting algorithm.
[0007] Technical solution 1 is as follows: A method for evaluating the sedimentation degree of a drainage pipeline based on an image graphics fitting algorithm comprises the following steps:
[0008] S1. Use the image acquisition module to collect drainage pipeline sedimentation images and input them into the generation analysis module;
[0009] S2. The generation and analysis module uses a median filter method to denoise the drainage pipeline deposition image to obtain a denoised image;
[0010] S3. binarize the denoised image using a global threshold method to obtain a binarized image;
[0011] S4. Using the Canny edge detection algorithm, extract the edge of the arc connecting the top of the drainage pipeline with the sedimentation line and the line segment connecting the sedimentation line with the inner diameter of the pipeline in the binarized image to obtain the effective arc and effective line segment;
[0012] S5. Fit the effective arc using the least squares method to obtain the center, radius and area of the fitted circle;
[0013] S6. Extend the effective line segment and calculate the coordinates of the fitting intersection of the extended effective line segment using Cramer's rule;
[0014] S7. construct a straight line according to the coordinates of the fitted intersection point combined with the extended effective line segment, and obtain the length of the deposition line by calculating the intersection point of the straight line and the fitted circle;
[0015] S8. Calculate the area of the sector with the center of the circle as the starting point and intersecting the fitted circle and the area of the triangle intersecting the radius and the deposition line by using the length of the deposition line and the radius of the fitted circle to obtain the arc area under the deposition line;
[0016] S9. Compare the arc area below the deposition line with the fitted circle area to determine the deposition degree of the deposition line and give a final evaluation.
[0017] Furthermore, in S2, a neighborhood selection is performed on the drainage pipeline deposition image, that is, a square image area X is selected from the pixel values of the drainage pipeline deposition image. ab (a,b),X ab (a,b)∈I 2 , a is the first pixel value of each point on the drainage pipeline deposition image, b is the second pixel value of each point on the drainage pipeline deposition image, I is the area of the square image region, median filtering is performed on the square image region, and the square image region is repeatedly shifted until the entire square image region is traversed to complete denoising and obtain the denoised image.
[0018] Furthermore, in S3, a global threshold is selected by the depth of the pipeline color, and each pixel in the denoised image is traversed. If the grayscale value of the pixel is greater than the global threshold, the pixel is set to white and its grayscale value is 0; otherwise, the pixel is set to black and its grayscale value is 255, thereby obtaining a binary processed image.
[0019] Furthermore, in S4, a Gaussian filter is used to smooth the binarized image, a first-order finite difference is used to calculate the gradient amplitude G and direction θ, non-maximum suppression is performed on the gradient amplitude, pseudo edge points are removed by double threshold processing, and connectivity analysis is used to link the edges, that is, the detection and extraction of the edge, i.e., the arc connecting the top of the drainage pipeline with the deposition line, and the line segment connecting the deposition line with the inner diameter of the pipeline are completed, and valid arcs and valid line segments are obtained;
[0020] The gradient amplitude G is expressed as:
[0021]
[0022] Among them, G x is the partial derivative in the horizontal direction, G y is the partial derivative in the vertical direction;
[0023] The direction θ is expressed as:
[0024]
[0025] Furthermore, in S5, the feature points and the center of the fitted circle (t 0 ,s 0 ), with the center (t 0 ,s 0 ) is used as the origin (0,0) to establish the first rectangular coordinate system. According to the optimization objective function M of the square error, the radius r and the fitted circle area YU are obtained. 1 ;
[0026] The optimization objective function M of the square error is expressed as:
[0027]
[0028] Among them, (t i ,s i ) is the coordinate of the feature point on the fitted circle, t i is the horizontal coordinate of the feature point, s i is the ordinate of the feature point, i=1,2,...,n, n is the number of feature points involved in fitting;
[0029] The area of the fitted circle YU 1 It is expressed as:
[0030] YU 1 =πr 2 .
[0031] Furthermore, in S6, the coordinates of two arbitrary points in the two valid line segments are respectively selected, and the two line segments are extended to obtain the extended valid line segments, and the lower left corner of the binarized image is overlapped with the origin (0,0) of the first rectangular coordinate system, and A is used to obtain the extended valid line segments. 1 x+B 1 y=C 1 represents the first valid line segment after extension, where A 1 is the first constant, B 1 is the second constant, C 1 is the third constant, x is the abscissa of the first effective line segment after extension, y is the ordinate of the first effective line segment after extension, and 2 x'+B 2 y'=C 2 represents the second valid line segment after extension, where A 2 is the fourth constant, B 2 is the fifth constant, C 2 is the sixth constant, x' is the horizontal coordinate of the extended second effective line segment, y' is the vertical coordinate of the extended second effective line segment, and the fitting intersection coordinate P(x 0 ,y 0 ),
[0032] Furthermore, in S7, an arbitrary point is selected from the extended first valid line segment and the extended second valid line segment, namely, the first arbitrary point R 1 (x 1 ,y 1 ) and the second arbitrary point R 2 (x 2 ,y 2 ), combined with the fitting intersection coordinates P(x 0 ,y 0 ) Determine the slope m of the first straight line 1 , the slope of the second straight line m 2 , the intercept w of the first straight line 1 and the intercept w of the second line 2 , construct the first straight line y 1 =m 1 x+w 1 and the second straight line y 2 =m 2 x+w 2 , and substitute them into the equation of the fitted circle r 2 =(α-cα) 2 +(β-cβ) 2In which c is a constant, α is the horizontal coordinate of the observed data point of the circle, and β is the vertical coordinate of the observed data point of the circle. The coordinates of the four intersection points of the first straight line, the second straight line and the fitted circle are obtained, which are the first intersection point T 1 (x 3 ,y 3 ), the second intersection point T 2 (x 4 ,y 4 ), the third intersection point T 3 (x 5 ,y 5 ) and the fourth intersection point T 4 (x 6 ,y 6 ), where x 3 is the horizontal coordinate of the first intersection point, y 3 is the ordinate of the first intersection point, x 4 is the horizontal coordinate of the second intersection point, y 3 is the ordinate of the second intersection point, x 5 is the horizontal coordinate of the third intersection point, y 5 is the ordinate of the third intersection point, x 6 is the horizontal coordinate of the fourth intersection point, y 6 The ordinate of the fourth intersection point is selected, and the intersection coordinate corresponding to the minimum value of the two ordinates is selected as the coordinates of the two intersection points of the deposition line and the pipe wall, and the abscissas of the two intersection points are subtracted and the absolute value is taken to obtain the length of the deposition line.
[0033] Further, in S8, the length of the deposition line and the radius r are used to calculate the center of the circle (t 0 ,s 0 ) is the sector area SH that intersects the fitted circle from the starting point 0 , The area of the triangle Tr that intersects the radius r and the deposition line is calculated using Heron's formula 1 , in, j is the length of the first side of the triangle, k is the length of the second side of the triangle, l is the length of the three sides of the triangle, and the sector area SH 0 and the area of the triangle Tr 1 Subtract and get the arc area SH below the deposition line 1 .
[0034] Furthermore, in S9, the arc area SH 1 and the fitted circle area YU 1By comparison, the percentage of the pipe diameter occupied was calculated respectively, and the two areas were divided into four deposition stages according to their percentage of the pipe diameter, namely, below 30%, between 30% and 40%, between 40% and 50%, and above 50%. The deposition degree of the deposition line was determined and the final evaluation was given.
[0035] Technical solution 2 is as follows: a drainage pipeline sedimentation degree evaluation device based on an image graphic fitting algorithm, used to implement a drainage pipeline sedimentation degree evaluation method based on an image graphic fitting algorithm described in technical solution 1, comprising an image acquisition module, a generation and analysis module, a processor and a memory;
[0036] The processor is connected to the image acquisition module, the generation and analysis module and the memory respectively, the processor is used to control the image acquisition module and the generation and analysis module by executing instructions, and the memory is used to store the execution instructions of the processor;
[0037] The image acquisition module is connected to the generation and analysis module, and the image acquisition module is used to collect drainage pipeline sedimentation pictures;
[0038] The generation and analysis module includes a receiving submodule, an identification submodule and an analysis submodule connected in sequence, the receiving submodule is used to receive the drainage pipeline deposition picture collected by the image acquisition module, the identification submodule is used to identify the image area of the pipe wall and the deposition part, and the analysis submodule is used to calculate and analyze the deposition degree and give an evaluation based on the identified image area of the pipe wall and the deposition part.
[0039] The beneficial effects of the present invention are as follows: Based on the application of image processing technology in the direction of data quality inspection for the degree of sedimentation in drainage pipelines, the present invention uses the least squares method to perform nonlinear and linear fitting on pipelines and sedimentation positions, and obtains the ratio of the pipeline area and the fan-shaped area of the sedimentation blockage area, and then obtains the sediment height, accurately indicating the degree of sedimentation in drainage pipelines, and solving the problem of large errors in manual interpretation. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings described herein are used to provide a further understanding of the present invention and constitute a part 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 an improper limitation of the present invention. In the drawings:
[0041] Figure 1 It is a flow chart of a method for evaluating the sedimentation degree of a drainage pipeline based on an image graphics fitting algorithm;
[0042] Figure 2 It is a structural schematic diagram of a drainage pipeline sedimentation degree evaluation device based on an image graphics fitting algorithm;
[0043] Figure 3It is a schematic diagram of an embodiment of a method for evaluating the sedimentation degree of a drainage pipeline based on an image graphics fitting algorithm;
[0044] Figure 4 It is a schematic diagram of an embodiment of the first rectangular coordinate system. Description of the drawings:
[0046] 1. Image acquisition module; 2. Generation and analysis module; 3. Processor; 4. Memory; 5. Receiving submodule; 6. Recognition submodule; 7. Analysis submodule. DETAILED DESCRIPTION
[0047] In order to make the technical solutions and advantages of the embodiments of the present invention more clearly understood, the exemplary embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0048] Example 1: Reference Figure 1 and Figure 2 The present embodiment is described in detail. A method for evaluating the sedimentation degree of a drainage pipeline based on an image graph fitting algorithm specifically comprises the following steps:
[0049] S1. Use the image acquisition module to collect drainage pipeline sedimentation images and input them into the generation analysis module;
[0050] S2. The generation and analysis module uses a median filter method to denoise the drainage pipeline deposition image to obtain a denoised image;
[0051] S3. binarize the denoised image using a global threshold method to obtain a binarized image;
[0052] S4. Using the Canny edge detection algorithm, extract the edge of the arc connecting the top of the drainage pipeline with the sedimentation line and the line segment connecting the sedimentation line with the inner diameter of the pipeline in the binarized image to obtain the effective arc and effective line segment;
[0053] S5. Fit the effective arc using the least squares method to obtain the center, radius and area of the fitted circle;
[0054] S6. Extend the effective line segment and calculate the coordinates of the fitting intersection of the extended effective line segment using Cramer's rule;
[0055] S7. construct a straight line according to the coordinates of the fitted intersection point combined with the extended effective line segment, and obtain the length of the deposition line by calculating the intersection point of the straight line and the fitted circle;
[0056] S8. Calculate the area of the sector with the center of the circle as the starting point and intersecting the fitted circle and the area of the triangle intersecting the radius and the deposition line by using the length of the deposition line and the radius of the fitted circle to obtain the arc area under the deposition line;
[0057] S9. Compare the arc area below the deposition line with the fitted circle area to determine the deposition degree of the deposition line and give a final evaluation.
[0058] Furthermore, in S2, a neighborhood selection is performed on the drainage pipeline deposition image, that is, a 3×3 square image area X is selected from the pixel values of the drainage pipeline deposition image. ab (a,b),X ab (a,b)∈I 2 , a is the first pixel value of each point on the drainage pipeline deposition image, b is the second pixel value of each point on the drainage pipeline deposition image, I is the area of the square image region, median filtering is performed on the square image region, and the square image region is repeatedly shifted until the entire square image region is traversed to complete denoising and obtain the denoised image.
[0059] Furthermore, in S3, a global threshold is selected according to the depth of the pipeline color, and each pixel in the denoised image is traversed. If the gray value of the pixel is greater than the global threshold, the pixel is set to white, and its gray value is 0; otherwise, the pixel is set to black, and its gray value is 255, to obtain a binary processed image;
[0060] Specifically, the global threshold method is used to binarize the remote sensing image, which can construct the visual effect of a black and white image and facilitate subsequent analysis.
[0061] Furthermore, in S4, a Gaussian filter is used to smooth the binarized image, a first-order finite difference is used to calculate the gradient amplitude G and direction θ, non-maximum suppression (NMS) is performed on the gradient amplitude, pseudo edge points are removed by double threshold processing, and connectivity analysis is used to link the edges, that is, the edge, i.e., the arc connecting the drainage line above the drainage line and the sedimentation line, and the line segment connecting the sedimentation line and the inner diameter of the pipeline are detected and extracted, and valid arcs and valid line segments are obtained;
[0062] The gradient amplitude G is expressed as:
[0063]
[0064] Among them, G x is the partial derivative in the horizontal direction, G y is the partial derivative in the vertical direction;
[0065] The direction θ is expressed as:
[0066]
[0067] Specifically, the edge of the arc connecting the water level line above the drainage pipeline and the connecting segment between the water level line and the inner diameter of the pipeline in the binarized image is extracted. The boundary contour of the object can be obtained by boundary extraction using the Canny edge detection algorithm. The boundary extraction of the binary image is mainly based on the boundary search of the black and white areas. Compared with many boundary search algorithms, the boundary extraction using the Canny edge detection algorithm is more suitable for binary images.
[0068] Furthermore, in S5, the feature points and the center of the fitted circle (t 0 ,s 0 ), with the center (t 0 ,s 0 ) is used as the origin (0,0) to establish the first rectangular coordinate system. According to the optimization objective function M of the square error, the radius r and the fitted circle area YU are obtained. 1 ;
[0069] The optimization objective function M of the square error is expressed as:
[0070]
[0071] Among them, (t i ,s i ) is the coordinate of the feature point on the fitted circle, which is in the same coordinate system as the effective line segment, t i is the horizontal coordinate of the feature point, s i is the ordinate of the feature point, i=1,2,...,n, n is the number of feature points involved in fitting;
[0072] The area of the fitted circle YU 1 It is expressed as:
[0073] YU 1 =πr 2
[0074] Specifically, the best function matching of a set of data is obtained by minimizing the sum of squares of errors. The least squares method can be used to easily obtain unknown data and minimize the sum of squares of errors between the obtained data and the actual data.
[0075] refer to Figure 4 , the X axis is the horizontal axis of the first rectangular coordinate system, and the Y axis is the vertical axis of the first rectangular coordinate system;
[0076] The diameter z is obtained by adding the horizontal coordinates of the feature points on the rightmost and leftmost fitted circles on the first rectangular coordinate system, and the radius r is further obtained after averaging.
[0077] Further, in S6, two arbitrary point coordinates of the two valid line segments are respectively selected, and the two line segments are extended to obtain the extended valid line segments, and the lower left corner of the binarized image is overlapped with the origin of the first rectangular coordinate system (0,0), and the coordinates are obtained by A. 1 x+B 1 y=C 1 represents the first valid line segment after extension, where A 1 is the first constant, B 1 is the second constant, C 1 is the third constant, x is the abscissa of the first effective line segment after extension, y is the ordinate of the first effective line segment after extension, and 2 x'+B 2 y'=C 2 represents the second valid line segment after extension, where A 2 is the fourth constant, B 2 is the fifth constant, C 2 is the sixth constant, x' is the horizontal coordinate of the extended second effective line segment, y' is the vertical coordinate of the extended second effective line segment, and the fitting intersection coordinate P(x 0 ,y 0 ),
[0078] Furthermore, in S7, an arbitrary point is selected from the first extended valid line segment and the second extended valid line segment, namely, the first arbitrary point R 1 (x 1 ,y 1 ) and the second arbitrary point R 2 (x 2 ,y 2 ), combined with the fitting intersection coordinates P(x 0 ,y 0 ) Determine the slope m of the first straight line 1 , the slope of the second straight line m 2 , the intercept w of the first straight line 1 and the intercept w of the second line 2 , construct the first straight line y 1 =m 1 x+w 1 and the second straight line y 2 =m 2 x+w 2 , and substitute them into the equation of the fitted circle r 2 =(α-cα) 2 +(β-cβ) 2, where c is a constant, α is the horizontal coordinate of the observed data point of the circle, and β is the vertical coordinate of the observed data point of the circle. The coordinates of the four intersection points of the first straight line, the second straight line and the fitted circle are obtained, which are the first intersection point T 1 (x 3 ,y 3 ), the second intersection point T 2 (x 4 ,y 4 ), the third intersection point T 3 (x 5 ,y 5 ) and the fourth intersection point T 4 (x 6 ,y 6 ), where x 3 is the horizontal coordinate of the first intersection point, y 3 is the ordinate of the first intersection point, x 4 is the horizontal coordinate of the second intersection point, y 3 is the ordinate of the second intersection point, x 5 is the horizontal coordinate of the third intersection point, y 5 is the ordinate of the third intersection point, x 6 is the horizontal coordinate of the fourth intersection point, y 6 The ordinate of the fourth intersection point is selected, and the intersection coordinate corresponding to the minimum value of the two ordinates is selected as the coordinates of the two intersection points of the deposition line and the pipe wall, and the abscissas of the two intersection points are subtracted and the absolute value is taken to obtain the length of the deposition line.
[0079] Further, in S8, the length of the deposition line and the radius r are used to calculate the center of the circle (t 0 ,s 0 ) is the sector area SH of the starting point intersecting the fitted circle 0 , The area of the triangle Tr that intersects the radius r and the deposition line is calculated using Heron's formula 1 , in, j is the length of the first side of the triangle, k is the length of the second side of the triangle, l is the length of the three sides of the triangle, and the area of the sector SH 0 and the area of the triangle Tr 1 Subtract and get the arc area SH below the deposition line 1 .
[0080] Furthermore, in S9, the arc area SH 1 and the fitted circle area YU 1Compare and calculate the percentage of the pipe diameter respectively. According to the percentage of the two areas in the pipe diameter, the four deposition stages are divided, namely, below 30%, between 30% and 40%, between 40% and 50%, and above 50%. The deposition degree of the deposition line is determined and the final evaluation is given.
[0081] Refer to Table 1, the final evaluation is given according to the corresponding score based on the percentage.
[0082] Table 1 Functional defect names, codes, levels and scores
[0083]
[0084]
[0085] Example 2: Reference Figure 1 and Figure 2 The present embodiment is described in detail, a drainage pipeline sedimentation degree evaluation device based on an image graphic fitting algorithm, which is used to implement a drainage pipeline sedimentation degree evaluation method based on an image graphic fitting algorithm described in embodiment 1, comprising an image acquisition module 1, a generation and analysis module 2, a processor 3 and a memory 4;
[0086] The processor 3 is connected to the image acquisition module 1, the generation and analysis module 2 and the memory 4 respectively. The processor 3 is used to control the image acquisition module 1 and the generation and analysis module 2 by executing instructions, and the memory 4 is used to store the execution instructions of the processor 3;
[0087] The image acquisition module 1 is connected to the generation and analysis module 2, and the image acquisition module 1 is used to collect drainage pipeline sedimentation pictures;
[0088] The generation and analysis module 2 includes a receiving submodule 5, an identification submodule 6 and an analysis submodule 7 connected in sequence, wherein the receiving submodule 5 is used to receive the drainage pipeline deposition picture acquired by the image acquisition module, the identification submodule 6 is used to identify the image area of the pipe wall and the deposition part, and the analysis submodule 7 is used to calculate and analyze the deposition degree and give an evaluation based on the image area of the pipe wall and the deposition part.
[0089] Specifically, the image acquisition module 1 is arranged in the pipeline during the acquisition and detection process. When the pipeline detection is carried out, the detection camera of the image acquisition module 1 can selectively collect one or more drainage pipeline deposition pictures;
[0090] The generation and analysis module 2, the processor 3 and the memory 4 can be arranged outside the pipeline, and the pipeline deposition condition is analyzed according to the drainage pipeline deposition picture, and the pipeline deposition condition is one of the pipeline deposition evaluation levels;
[0091] When conducting pipeline inspection, the processor 3 controls the image acquisition module 1 to selectively acquire the internal image of the pipeline through the detection camera, and controls the generation and analysis module 2 to perform situation analysis based on the internal image of the pipeline. In this embodiment, an external calculator can also be connected to send the acquired images and analysis evaluation to the computer for display through the processor.
[0092] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.
Claims
1. A method for evaluating the sedimentation degree of a drainage pipeline based on an image graphics fitting algorithm, characterized in that: The following steps are involved: S1. Use the image acquisition module to collect drainage pipeline sedimentation images and input them into the generation analysis module; S2. The generation and analysis module uses a median filter method to denoise the drainage pipeline deposition image to obtain a denoised image; S3. binarize the denoised image using a global threshold method to obtain a binarized image; S4. Using the Canny edge detection algorithm, extract the edge of the arc connecting the top of the drainage pipeline with the sedimentation line and the line segment connecting the sedimentation line with the inner diameter of the pipeline in the binarized image to obtain the effective arc and effective line segment; S5. Fit the effective arc using the least squares method to obtain the center, radius and area of the fitted circle; S6. Extend the effective line segment and calculate the coordinates of the fitting intersection of the extended effective line segment using Cramer's rule; S7. construct a straight line according to the coordinates of the fitted intersection point combined with the extended effective line segment, and obtain the length of the deposition line by calculating the intersection point of the straight line and the fitted circle; S8. Calculate the area of the sector with the center of the circle as the starting point and intersecting the fitted circle and the area of the triangle intersecting the radius and the deposition line by using the length of the deposition line and the radius of the fitted circle to obtain the arc area under the deposition line; S9. Compare the arc area below the deposition line with the fitted circle area to determine the deposition degree of the deposition line and give a final evaluation.
2. The method for evaluating the sedimentation degree of a drainage pipeline based on an image graph fitting algorithm according to claim 1, characterized in that: In S2, a neighborhood selection is performed on the drainage pipeline deposition image, that is, a square image area X is selected from the pixel values of the drainage pipeline deposition image. ab (a,b),X ab( a,b ) ∈I 2 , a is the first pixel value of each point on the drainage pipeline deposition image, b is the second pixel value of each point on the drainage pipeline deposition image, I is the area of the square image region, median filtering is performed on the square image region, and the square image region is repeatedly shifted until the entire square image region is traversed to complete denoising and obtain the denoised image.
3. The method for evaluating the sedimentation degree of a drainage pipeline based on an image graph fitting algorithm according to claim 2 is characterized in that: In S3, a global threshold is selected according to the depth of the pipeline color, and each pixel in the denoised image is traversed. If the grayscale value of the pixel is greater than the global threshold, the pixel is set to white, and its grayscale value is 0; otherwise, the pixel is set to black, and its grayscale value is 255, to obtain a binary processed image.
4. The method for evaluating the sedimentation degree of a drainage pipeline based on an image graph fitting algorithm according to claim 3 is characterized in that: In S4, a Gaussian filter is used to smooth the binarized image, a first-order finite difference is used to calculate the gradient amplitude G and direction θ, non-maximum suppression is performed on the gradient amplitude, pseudo edge points are removed by double threshold processing, and connectivity analysis is used to link the edges, that is, the detection and extraction of the edge, i.e., the arc connecting the top of the drainage pipeline with the deposition line, and the line segment connecting the deposition line with the inner diameter of the pipeline are completed, and the valid arc and valid line segment are obtained; The gradient amplitude G is expressed as: Among them, G x is the partial derivative in the horizontal direction, G y is the partial derivative in the vertical direction; The direction θ is expressed as:
5. The method for evaluating the sedimentation degree of a drainage pipeline based on an image graph fitting algorithm according to claim 4 is characterized in that: In S5, the characteristic points of the fitted circle and its center (t0, s0) are obtained by the least square method, a first rectangular coordinate system is established with the center (t0, s0) as the origin (0, 0), and the radius r and the area of the fitted circle YU1 are obtained according to the optimization objective function M of the square error; The optimization objective function M of the square error is expressed as: Among them, (t i ,s i ) is the coordinate of the feature point on the fitted circle, t i is the horizontal coordinate of the feature point, s i is the ordinate of the feature point, i=1,2,...,n, n is the number of feature points involved in fitting; The fitted circle area YU1 is expressed as: YU1=πr 2 。 6. The method for evaluating the sedimentation degree of a drainage pipeline based on an image graph fitting algorithm according to claim 5, characterized in that: In S6, the coordinates of two arbitrary points in the two valid line segments are respectively selected, and the two line segments are extended to obtain the extended valid line segment, and the lower left corner of the binarized image is overlapped with the origin (0,0) of the first rectangular coordinate system, and the extended first valid line segment is represented by A1x+B1y=C1, wherein A1 is the first constant, B1 is the second constant, C1 is the third constant, x is the horizontal coordinate of the extended first valid line segment, and y is the vertical coordinate of the extended first valid line segment, and the extended second valid line segment is represented by A2x'+B2y'=C2, wherein A2 is the fourth constant, B2 is the fifth constant, C2 is the sixth constant, x' is the horizontal coordinate of the extended second valid line segment, and y' is the vertical coordinate of the extended second valid line segment, and the fitting intersection coordinates P(x0,y0) are calculated.
7. The method for evaluating the sedimentation degree of drainage pipelines based on an image graph fitting algorithm according to claim 6, characterized in that: In S7, an arbitrary point is selected from the extended first valid line segment and the extended second valid line segment, namely, the first arbitrary point R1 (x1, y1) and the second arbitrary point R2 (x2, y2), and the slope m1 of the first straight line, the slope m2 of the second straight line, the intercept w1 of the first straight line and the intercept w2 of the second straight line are determined in combination with the coordinates of the fitting intersection point P (x0, y0), and the first straight line y1 = m1x + w1 and the second straight line y2 = n2x + w2 are constructed, and they are respectively substituted into the equation r of the fitted circle. 2 =(α-cα) 2 +(β-cβ) 2 , where c is a constant, α is the horizontal coordinate of the observed data point of the circle, and β is the vertical coordinate of the observed data point of the circle. The coordinates of the four intersections of the first straight line, the second straight line and the fitted circle are obtained, which are the first intersection T1 (x3, y3), the second intersection T2 (x4, y4), the third intersection T3 (x5, y5) and the fourth intersection T4 (x6, y6). Where x3 is the horizontal coordinate of the first intersection, y3 is the vertical coordinate of the first intersection, x4 is the horizontal coordinate of the second intersection, y3 is the vertical coordinate of the second intersection, x5 is the horizontal coordinate of the third intersection, y5 is the vertical coordinate of the third intersection, x6 is the horizontal coordinate of the fourth intersection, and y6 is the vertical coordinate of the fourth intersection. The coordinates of the intersections corresponding to the minimum values of the two vertical coordinates are selected as the coordinates of the two intersections of the deposition line and the pipe wall, and the horizontal coordinates of the two intersections are subtracted and the absolute values are taken to obtain the length of the deposition line.
8. The method for evaluating the sedimentation degree of drainage pipelines based on an image graph fitting algorithm according to claim 7, characterized in that: In S8, the sector area SH0 that intersects the fitted circle with the center (t0, s0) as the starting point is calculated by the deposition line length and radius r. The area of the triangle Tr1 that intersects the radius r and the deposition line is calculated using Heron's formula. in, j is the first side length of the triangle, k is the second side length of the triangle, and l is the third side length of the triangle. Subtract the sector area SH0 from the triangle area Tr1 to obtain the arc area SH1 of the lower part of the deposition line.
9. The method for evaluating the sedimentation degree of drainage pipelines based on an image graph fitting algorithm according to claim 8, characterized in that: In S9, the arc area SH1 is compared with the fitted circular area YU1, and the percentage of the pipe diameter occupied is calculated respectively. The percentage of the two areas occupied by the pipe diameter is divided into four deposition stages, namely, less than 30%, between 30% and 40%, between 40% and 50%, and above 50%. The deposition degree of the deposition line is determined and a final evaluation is given.
10. A device for evaluating the sedimentation degree of a drainage pipeline based on an image graphics fitting algorithm, characterized in that: A method for evaluating the sedimentation degree of a drainage pipeline based on an image graphic fitting algorithm for implementing any one of claims 1 to 9, comprising an image acquisition module (1), a generation and analysis module (2), a processor (3) and a memory (4); The processor (3) is connected to the image acquisition module (1), the generation and analysis module (2) and the memory (4) respectively; the processor (3) is used to control the image acquisition module (1) and the generation and analysis module (2) by executing instructions; and the memory (4) is used to store the execution instructions of the processor (3); The image acquisition module (1) is connected to the generation and analysis module (2), and the image acquisition module (1) is used to acquire drainage pipeline sedimentation images; The generation and analysis module (2) comprises a receiving submodule (5), an identifying submodule (6) and an analyzing submodule (7) which are connected in sequence, wherein the receiving submodule (5) is used to receive the drainage pipeline deposition image acquired by the image acquisition module, the identifying submodule (6) is used to identify the image area of the pipe wall and the deposition part, and the analyzing submodule (7) is used to calculate and analyze the deposition degree and give an evaluation based on the image area of the pipe wall and the deposition part.
Citation Information
Patent Citations
Method and system for detecting inter-ring slab staggering of shield tunnel
CN115797258A
Sediment deposition depth marking method and device based on sonar and medium
CN118887129A