CN115234845A - Oil-gas pipeline inner wall defect image visual detection method based on projection model - Google Patents
Oil-gas pipeline inner wall defect image visual detection method based on projection model Download PDFInfo
- Publication number
- CN115234845A CN115234845A CN202210886992.7A CN202210886992A CN115234845A CN 115234845 A CN115234845 A CN 115234845A CN 202210886992 A CN202210886992 A CN 202210886992A CN 115234845 A CN115234845 A CN 115234845A
- Authority
- CN
- China
- Prior art keywords
- image
- pipeline
- radius
- projection
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000007547 defect Effects 0.000 title claims abstract description 52
- 238000001514 detection method Methods 0.000 title claims abstract description 36
- 230000000007 visual effect Effects 0.000 title claims abstract description 11
- 238000003384 imaging method Methods 0.000 claims abstract description 18
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 15
- 238000000034 method Methods 0.000 claims description 26
- 230000008569 process Effects 0.000 claims description 15
- 238000012800 visualization Methods 0.000 claims description 10
- 238000013507 mapping Methods 0.000 claims description 9
- 230000008859 change Effects 0.000 claims description 6
- 230000002950 deficient Effects 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 4
- 230000007797 corrosion Effects 0.000 claims description 4
- 238000005260 corrosion Methods 0.000 claims description 4
- 239000003086 colorant Substances 0.000 claims description 3
- 238000003708 edge detection Methods 0.000 claims description 3
- 238000012216 screening Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 239000002356 single layer Substances 0.000 claims description 3
- 230000002708 enhancing effect Effects 0.000 claims 1
- 230000009466 transformation Effects 0.000 claims 1
- 238000004458 analytical method Methods 0.000 abstract description 6
- 238000004445 quantitative analysis Methods 0.000 abstract description 3
- 238000011161 development Methods 0.000 description 7
- 230000018109 developmental process Effects 0.000 description 7
- 238000007689 inspection Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 238000003709 image segmentation Methods 0.000 description 2
- 239000003129 oil well Substances 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 239000003208 petroleum Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 201000004569 Blindness Diseases 0.000 description 1
- 241000238097 Callinectes sapidus Species 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000010339 dilation Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003912 environmental pollution Methods 0.000 description 1
- 230000003628 erosive effect Effects 0.000 description 1
- 230000003631 expected effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 230000000149 penetrating effect Effects 0.000 description 1
- 238000001931 thermography Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- F—MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
- F17—STORING OR DISTRIBUTING GASES OR LIQUIDS
- F17D—PIPE-LINE SYSTEMS; PIPE-LINES
- F17D5/00—Protection or supervision of installations
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8806—Specially adapted optical and illumination features
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/8851—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
- G01N2021/8887—Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
Landscapes
- Engineering & Computer Science (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Pathology (AREA)
- Immunology (AREA)
- Analytical Chemistry (AREA)
- General Physics & Mathematics (AREA)
- Mechanical Engineering (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Signal Processing (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
A visual detection method for defect images of inner walls of oil and gas pipelines based on a projection model is characterized in that a CCTV pipeline endoscopic detection system is adopted to feed back defect image information aiming at common oil and gas pipeline damage, a pipeline panoramic image with defect characteristics is subjected to automatic positioning of a pipeline image center through Otsu and an area marking algorithm, a projection function is derived through a proportional relation before and after imaging, a three-dimensional pipeline projection model is established, the panoramic image is matched and expanded, the influence of non-linear distortion can be eliminated, a pipeline defect characteristic area is clearly restored, the reliability of small defect quantitative analysis is improved, and a theoretical basis is provided for subsequent pipeline defect visual analysis.
Description
Technical Field
The invention relates to the technical field of pipeline defect detection, in particular to a projection model-based oil and gas pipeline inner wall defect image visual detection method.
Background
Petroleum, as an important industrial resource and a national strategic resource, largely affects the development of the national industrial field. At present, oil pipes and sleeves are damaged and various underground accidents are caused by the influence of various factors in the oil and gas transportation process at home and abroad, wherein the conditions of sleeve damage, sleeve deformation, underground fish falling, well leakage, scaling, corrosion and the like are common. These conditions not only affect the oil extraction work, but also may cause environmental pollution of the formation where the oil and gas transportation pipeline is located. In order to ensure efficient transportation of petroleum resources and formation environment protection, timely maintenance of oil and gas pipeline faults is very important. The defect analysis of the oil and gas pipelines is an important means for fault detection and exploration and development of the oil and gas transportation pipelines, and problems and degrees of oil wells need to be judged by some corresponding measuring means before the pipelines are repaired so as to provide a corresponding engineering operation scheme.
The most common problem with oil well tubing is casing damage, the location and extent of which can be determined by image inspection to facilitate the repair process. Distributed optical fiber is an effective method for detecting and locating pipeline leaks by monitoring pipeline pressure or temperature differences. Fiber optic systems have proven useful for monitoring deep well pipe leaks, such as oil field production wells. However, oil and gas transport consists of gravity pipelines rather than pressure pipelines, so the optical fiber is not suitable for breakage detection of underground oil and gas transport systems. Closed Circuit Television (CCTV) is currently the most popular oil and gas pipeline inspection facility because it costs less than sub-scanner evaluation technology (set) cameras, ground Penetrating Radar (GPR), sonar and thermography. However, due to the large number of images that need to be detected, human fatigue and subjectivity, as well as the time consumption of engineers, may be obstacles to detecting and analyzing pipe defects through closed-circuit television images. But as the image processing and artificial intelligence technology is used as a diagnosis system, the detection efficiency of the defects of the underground oil and gas pipelines in the interpretation and inspection images of engineers is effectively improved.
In image processing techniques, image segmentation based on mathematical morphology has been widely applied to pattern recognition studies. Erosion and dilation are two basic operations of morphological segmentation, usually tandem, for image enhancement of an object of interest. However, when the ambient noise or the closed-circuit television moves too fast in the pipeline, the images obtained by the camera often have nonlinear distortion, so that the naked eyes cannot accurately obtain detailed information of the defect area in the pipeline. For new pipeline inspection systems, local unfolding of a particular identification image is required to reduce or eliminate the distortion effect. In the panoramic image unfolding process, the traditional unfolding algorithm is usually based on direct mapping of images, the definition of the images is reduced after the algorithms are restored, and the influence of nonlinear distortion cannot be avoided when a camera deviates from the center.
The traditional detection technology is relatively lagged in finding and repairing the oil and gas pipeline defects, the actual condition of the pipeline defects is not clear and definite, the subjectivity and the blindness exist in the judgment process, and various cost of later-stage detection and repair can be increased.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a visual detection method of an oil-gas pipeline inner wall defect image based on a projection model, which uses a Closed Circuit Television (CCTV) to feed back defect image information and automatically positions a pipeline image center through Otsu and a region marking algorithm; deducing a projection function through a proportional relation before and after imaging of a pinhole camera, and establishing a three-dimensional pipeline linear projection model; fusing the expanded images through an SIFT feature point matching algorithm, and reconstructing an undistorted pipeline inner wall surface image; the developed defect image has high definition, eliminates the nonlinear distortion influence, effectively and accurately analyzes the defect area of the oil and gas pipeline, and provides a theoretical basis for the visual analysis of the subsequent oil and gas pipeline.
In order to achieve the purpose, the invention adopts the technical scheme that:
the oil and gas pipeline inner wall defect image visualization detection method based on the projection model specifically comprises the following steps:
step 1, acquiring a pipeline defect image; acquiring a pipeline image through a CCTV pipeline endoscopic detection system, detecting the conditions of scaling, corrosion, perforation and crack in the pipeline, observing and storing video data in real time, and transmitting the video to the ground;
step 2, segmenting a pipeline image region; setting a threshold value to segment the pipeline defect image area, dividing and marking each roundness area, comparing the roundness size, and determining a target area by sequencing and screening the maximum roundness one by one;
step 3, positioning the center point of the image and matching a three-dimensional projection model; taking the maximum roundness area as an area to which the center of the image belongs, calculating the centroid of the area as the center coordinate of the image of the defective pipeline, presetting the inner circle radius and the outer circle radius of fixed values, and determining the effective expansion area of each image with the same size;
step 4, carrying out area expansion mapping, storing a predetermined effective area, simulating the imaging process of a video camera through MATLAB, converting a three-dimensional pipeline represented by a physical unit into a two-dimensional linear fitting circle through a projection function, establishing a three-dimensional projection model, and matching the three-dimensional projection model with the effective area as a linear imaging model of an actual camera to eliminate the influence of nonlinear distortion;
and 5, converting the Cartesian coordinates I (x (r, theta), y (r, theta)) of the annular region into polar coordinates I (r, theta) by using the coordinates of the center point of the image determined in the step 3 as a polar coordinate origin, and dynamically expanding the annular effective region into a rectangular image by taking the difference between the outer circumference of the projection model and the projection radius as the length and the width.
Step 2, a single-frame pipeline image with defect characteristics is intercepted, and a central black area is enhanced by utilizing gray level conversion; automatically segmenting a pipe wall image by adopting an Otsu algorithm through comprehensive mathematical morphology edge detection, and removing invalid connected regions through setting a threshold value; in the remaining regions, the central region is closest to a circle, the remaining regions are marked with different colors by using a region marking algorithm, and the roundness of each region is calculated;
the roundness definition formula of the region in the step 2 is as follows:
wherein a is the number of pixels in the region, p is the length of the boundary of the region, and e is the similarity between the region and the circle.
The step 3 specifically comprises the following steps: and (3) setting a threshold range for the connected region marked in the step (2), eliminating the interference of the characteristic region lower than the maximum circularity value, extracting a central region, and calculating the centroid of the central region as the central point coordinate of the pipeline image.
And 3, the threshold range is 1.2-1.5.
Step 4, according to the three-dimensional space object projection relation, establishing a linear imaging model of the object plane and the image plane: the model assumes that s is the size of the pipeline projection image, in pix; d is the physical size of the space object in mm; b is the distance between the image plane and the lens in mm; a is the distance between the object plane and the lens, i.e. a = nf, unit mm; assuming that pixel dx = dy and side length is p and unit is mm/pix of a camera of the CCTV pipeline endoscopic detection system, a projection function relation can be obtained according to an object linear projection relation:
Wherein k = b/p is a camera constant and has a unit of pix, and the size of the object image is in direct proportion to the size of the object and in inverse proportion to the distance between the object and the plane where the lens is located; because the distance o between the image plane and the object plane is unknown, and the size of p cannot be determined, the size of k needs to be obtained by calibrating a camera;
according to the projection function relation, assuming that the depth of field of a pipeline is L, the distance between the pipeline and a plane where a camera lens of the CCTV pipeline endoscopic detection system is located is DL, the camera constant is k, the pipe diameter is OD and the distance a between an image plane and an object plane is known in the effective visual angle range of a camera, and determining the projection excircle radius r of the pipeline according to the parameters 1 And inner circle radius r 2 The size of (A) is as follows:
as the projection radius of the pipeline is a fixed value, each frame of image of the same video has the same model structure with the radius r of an outer circle 1 And inner circle radius r 2 The projection radius wrapping area is used as an effective area of the pipeline image to generate a rectangular image; the effective area is regarded as a two-dimensional image with a depth framework, the position of a camera lens is taken as a starting point, and the two-dimensional image is measured from the excircle radius r 1 And inner circle radius r 2 The retraction process reflects the imaging process of a camera of the CCTV pipeline endoscopic detection system from near to far; the dynamic variation trend of the projection radius r of the effective area along with the distance from DL to DL + L is as follows:
through radius value r i Positioning duct z = z i A single-layer annular active area; the area is equivalent to a fitted circular curve, a pipeline is scanned for a circle, points on a continuous area in a range of 360 degrees are calculated, and the pixel coordinates of a pipeline projection model corresponding to the current radius value are as follows:
x=r i ×cos(2πθ/360°)+x 0 +ox
y=r i ×sin(2πθ/360°)+y 0 +oy
wherein, theta is belonged to (0, 360 degree), (x) 0 ,y 0 ) For the coordinates of the center point of the automatic positioning, (ox, oy) is a compensation parameter.
Said step 5 is in the forward view image, O (x) 0 ,y 0 ) Is the central coordinate r of the camera of the CCTV pipeline endoscopic detection system 1 Is the outer radius of the circle, r 2 Is the radius of the inner circle, r 3 Is the central ring radius; p c (x c ,y c ) The method is characterized in that the method is a point on an annular effective area of an image, a corresponding point of the point in an expanded image is Q (u, v), a coordinate of a point P is calculated by utilizing a coordinate of the point Q, a pixel coordinate of the point P is assigned to the point Q, and the direct mapping relation of the two points in the space is as follows:
x c =x 0 +(r+v)sinθ
y c =y 0 +(r+v)cosθ
θ=u/R
where θ is the extreme angle of the pipeline image, (x) 0 ,y 0 ) Is the location center point coordinate of the image, (x) c ,y c ) Is the pixel coordinate of the P point, and (u, v) is the pixel coordinate of the Q point;
matching a linear camera projection model with a pipeline image, registering an eccentric image through a reference model, and delimiting an effective expansion area; establishing a one-to-one corresponding relation between the pipeline image and coordinate points in the rectangular image through the coordinate mapping; wherein, the excircle radius r of the effective area 1 And minimum outer circle radius r 2 Comprises the following steps:
r 1 =OD/DL×k
r 2 =OD/(DL+L)
according to the excircle radius r of the upper projection model 1 And inner circle radius r 2 The calculation of (2) can result in a width w of the unfolded image of 2 π r 1 The height h is L/DL multiplied by k; the pixel points in the effective area of the pipeline image can be regarded as the pixel coordinates on the fitting circle with the radius change of the projection model, and the pixel coordinates are obtained through r 1 To r 2 The change of radius scans all pixel points corresponding to different radii in the effective area in sequence and arranges the pixel points on a rectangular image, and the reverse dynamic expansion formula is as follows:
u=r i cos(2π(w 1 →w 2 )/w)+x 0 +ox
v=r i sin(2π(w 1 →w 2 )/w)+y 0 +oy
wherein, w 1 =2πr 1 Fitting the outer circle radius to the circumference, w 2 =2πr2 Is composed of Inner circle radius fitting circumference, r i And (u, v) are the coordinates of the pixels in the annular effective area.
Compared with the prior art, the invention has the following advantages:
the invention relates to a visual analysis method of a pipeline defect image based on three-dimensional projection, which can preliminarily judge whether a detected pipeline has defects or not according to a pipeline image obtained by CCTV endoscopic detection. Aiming at a pipeline panoramic image with defect characteristics, the center of the pipeline image is automatically positioned through Otsu and a region marking algorithm, a projection function is deduced through the proportional relation before and after the pinhole camera imaging, a three-dimensional pipeline projection model is established, and the panoramic image is matched and expanded. The design can eliminate the nonlinear distortion influence, clearly reduce the characteristic region of the pipeline defect, improve the reliability of small-defect quantitative analysis, provide a theoretical basis for subsequent visual analysis of the pipeline defect, and has innovative significance and wide application prospect. The method has simple operation process, enables non-professionals to realize simple and quick analysis of the characteristic region of the defective pipeline, and has certain practicability and popularization significance.
Drawings
FIG. 1 is a flow chart of the system operation of the present invention.
Fig. 2 is a working block diagram of a closed circuit television monitoring system.
FIG. 3 is a schematic diagram of the center of the pipeline image and the geometric center of the image.
FIG. 4 shows the positioning result of the center point of the pipeline defect image.
FIG. 5 is a graph of the roundness calculation result of a pipe defect image.
Fig. 6 is a schematic three-dimensional projection of a pipeline.
Fig. 7 is a schematic diagram showing the matching result between the reference model and the pipeline image, wherein fig. 7A is a pipeline center image, and fig. 7B is a pipeline eccentricity image.
Fig. 8 is a schematic diagram illustrating a development result of a defect, in which fig. 8a is a development view of an effective region from an outer circle to a central circle of fig. 7A, fig. 8B is a development view of an effective region from a central circle to an inner circle of fig. 7A, fig. 8c is a development view of an effective region from an outer circle to a central circle of fig. 7B, and fig. 8d is a development view of an effective region from a central circle to an inner circle of fig. 7B.
Fig. 9 is an expanded view of a panoramic image in the camera view field of the CCTV pipe endoscopic inspection system, wherein fig. 9a is a schematic view of the fusion of the effective areas in fig. 7A, and fig. 9B is a schematic view of the fusion of the effective areas in fig. 7B.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
The oil and gas pipeline inner wall defect image visualization detection method based on the projection model specifically comprises the following steps:
step 1, acquiring a pipeline defect image; acquiring a pipeline image through a CCTV pipeline endoscopic detection system, detecting the conditions of scaling, corrosion, perforation and crack in the pipeline, observing and storing video data in real time, and transmitting the video to the ground;
step 2, segmenting a pipeline image region; setting a threshold value to segment the pipeline defect image area, dividing and marking each roundness area, comparing the roundness size, and determining a target area by sequencing and screening the maximum roundness one by one;
step 3, positioning the center point of the image and matching a three-dimensional projection model; taking the maximum roundness area as an area to which the center of the image belongs, calculating the centroid of the area as the center coordinate of the image of the defective pipeline, presetting the inner circle radius and the outer circle radius of fixed values, and determining the effective expansion area of each image with the same size;
step 4, area expansion mapping, wherein a predetermined effective area is saved, a camera imaging process of a CCTV pipeline endoscopic detection system is simulated through MATLAB, a three-dimensional pipeline represented by a physical unit is converted into a two-dimensional linear fitting circle through a projection function, a three-dimensional projection model is established and is matched with the effective area as a linear imaging model of an actual camera, and the influence of nonlinear distortion is eliminated;
and 5, converting the Cartesian coordinates I (x (r, theta), y (r, theta)) of the annular region into polar coordinates I (r, theta) by using the coordinates of the center point of the image determined in the step 3 as a polar coordinate origin, and dynamically expanding the annular effective region into a rectangular image by taking the difference between the outer circumference of the projection model and the projection radius as the length and the width.
Step 2, a single-frame pipeline image with defect characteristics is intercepted, and a central black area is enhanced by utilizing gray level conversion; automatically segmenting a pipe wall image by adopting an Otsu algorithm through comprehensive mathematical morphology edge detection, and removing invalid connected regions through setting a threshold value; in the remaining area, the central area is closest to the circle, the remaining area is marked with different colors by using an area marking algorithm, and the roundness of each area is calculated;
the roundness definition formula of the region in the step 2 is as follows:
wherein a is the number of pixels in the region, p is the length of the boundary of the region, and e is the similarity between the region and the circle.
And 3, specifically, setting a threshold range for the connected region marked in the step 2, eliminating the interference of the characteristic region lower than the maximum circularity value, extracting a central region, and calculating the centroid of the central region as the coordinate of the central point of the pipeline image. Because the center of the pipeline is positioned near the center of the image, the roundness of a non-central area is obviously smaller than that of the central area, and the purpose of extracting the central area can be effectively achieved through the setting of a threshold value; the camera of the CCTV pipeline endoscopic detection system moves in an offset manner, the effective area also generates overall offset, and the effective area of each frame of pipeline image is not influenced by the offset by positioning the central point of the image.
Step 3) the threshold range is between about 1.2 and about 1.5.
Step 4, according to the three-dimensional space object projection relation, establishing a linear imaging model of the object plane and the image plane: the model assumes that s is the size of the pipeline projection image, in pix; d is the physical size of the space object in mm; b is the distance between the image plane and the lens in mm; a is the distance between the object plane and the lens, i.e. a = nf, unit mm; assuming that pixel dx = dy and side length is p and unit is mm/pix of a camera of the CCTV pipeline endoscopic detection system, a projection function relation can be obtained according to an object linear projection relation:
Wherein k = b/p is a camera constant and has a unit of pix, and the size of the object image is in direct proportion to the size of the object and in inverse proportion to the distance between the object and the plane where the lens is located; because the distance o between the image plane and the object plane is unknown, and the size p cannot be determined, the size k needs to be obtained by calibrating a camera of the CCTV pipeline endoscopic detection system;
according to the projection function relation, the pipeline depth of field is L, the distance between the pipeline and the plane where a camera lens of the CCTV pipeline endoscopic detection system is located is DL, the camera constant is k, the pipe diameter is OD, and the distance a from an image plane to an object plane is known in the effective visual angle range of a camera of the CCTV pipeline endoscopic detection system, and according to the parameters, the projection excircle radius r of the pipeline is determined 1 And inner circle radius r 2 The size of (A) is as follows:
as the projection radius of the pipeline is a fixed value, each frame of image of the same video has the same model structure with the radius r of an excircle 1 And inner circle radius r 2 The projection radius wrapping area is used as an effective area of the pipeline image to generate a rectangular image; the effective area is regarded as a two-dimensional image with a depth framework, the position of a camera lens is taken as a starting point, and the two-dimensional image is measured from the excircle radius r 1 And inner circle radius r 2 The retraction process reflects the imaging process of the camera from near to far; the dynamic variation trend of the projection radius r of the effective area along with the distance from DL to DL + L is as follows:
through radius value r i Positioning duct z = z i A single-layer annular active area; the area is equivalent to a fitted circular curve, a pipeline is scanned for a circle, points on a continuous area in a 360-degree range are calculated, and the pixel coordinates of a pipeline projection model corresponding to the current radius value are as follows:
x=r i ×cos(2πθ/360°)+x 0 +ox
y=r i ×sin(2πθ/360°)+y 0 +oy
wherein, theta is belonged to (0, 360 degree), (x) 0 ,y 0 ) For the center coordinates of the automatic positioning, (ox, oy) is a compensation parameter.
Said step 5 is in the forward view image, O (x) 0 ,y 0 ) Is the central coordinate r of the camera of the CCTV pipeline endoscopic detection system 1 Is the outer radius of the circle, r 2 Is the radius of the inner circle, r 3 Is the central ring radius; p is c (x c ,y c ) The method is characterized in that the method is a point on an annular effective area of an image, a corresponding point of the point in an expanded image is Q (u, v), a coordinate of a point P is calculated by using a coordinate of the point Q, a pixel coordinate of the point P is assigned to the point Q, and two points in a space are directly mapped according to the relation:
x c =x 0 +(r+v)sinθ
y c =y 0 +(r+v)cosθ
θ=u/R
where θ is the extreme angle of the image of the pipe, (x) 0 ,y 0 ) Is the location center point coordinate of the image, (x) c ,y c ) Is the pixel coordinate of the P point, and (u, v) is the pixel coordinate of the Q point;
matching a linear camera projection model with a pipeline image, registering an eccentric image through a reference model, and delimiting an effective expansion area; establishing a one-to-one corresponding relation between the pipeline image and coordinate points in the rectangular image through the coordinate mapping; wherein, the excircle radius r of the effective area 1 And minimum outer circle radius r 2 Comprises the following steps:
r 1 =OD/DL×k
r 2 =OD/(DL+L)
according to the excircle radius r of the upper projection model 1 And inner circle radius r 2 The calculation of (2) can obtain the width w of the unfolded image as 2 pi r 1 The height h is L/DL multiplied by k; the pixel points in the effective area of the pipeline image can be regarded as pixel coordinates on a fitting circle with the radius change of the projection model, and the pixel coordinates are obtained through r 1 To r 2 The change of the radius scans all the pixel points corresponding to different radii in the effective area in turn,and arranged on the rectangular image, and the reverse dynamic expansion formula is as follows:
u=r i cos(2π(w 1 →w 2 )/w)+x 0 +ox
v=r i sin(2π(w 1 →w 2 )/w)+y 0 +oy
wherein, w 1 =2πr 1 Fitting the outer circle radius to the circumference, w 2 =2πr 2 Fitting the inner circle radius to the circumference, r i And (u, v) are the coordinates of the pixels in the annular effective area.
Referring to fig. 1, the design system of the present invention is divided into a defect image acquisition part, an image center point positioning part and a feature area expansion part, and the closed-loop television monitoring system is used for acquiring pipeline image information in real time and recording the picture of each frame. The image segmentation is to divide different color areas of the pipeline image with the defects. The value of the roundness is an estimate that the different regions are approximated as circles. And the center positioning is to calculate the coordinates of the center point of the panoramic pipeline image. The three-dimensional projection model is a reference model established by utilizing actual pipeline information according to a projection function. The model matching shown is a process of correcting a distorted image. The region expansion is to rearrange the defective region pixel coordinate points according to a coordinate map.
Referring to fig. 2, the defect recognition of the present invention employs an endoscopic CCTV pipe inspection system, and the endoscopic CCTV pipe inspection system of step 1 includes a main controller, a cable rack, and a "robot" with a camera; the main controller controls the advancing speed and direction of the robot in the pipeline, and controls the camera to transmit video images in the pipeline to the display screen of the main controller through a cable, so that the internal condition of the pipeline can be detected, and original image records are stored.
Referring to fig. 3, the randomly intercepted image of the defective pipe in the monitoring device has a resolution of 640 × 480 pixels. And (3) intercepting three frames of images with defects, and marking the geometric center of the images as a blue point and the center of the pipeline as a red point. In this embodiment, statistics is performed on coordinate points of the pipeline center and the geometric center of the three frames of images in fig. 3, and the result is shown in table 1. The data show that the center of the pipe is shifted in either the vertical or horizontal direction for different frames, while the geometric center of the pipe remains unchanged. When the center is used as the center of a circle and the center is deviated after the same inner and outer circle radiuses are preset, the effective area of each frame of image can also generate overall deviation.
TABLE 1 pipeline center and image geometric center coordinates
Referring to fig. 4-5, the center point of each acquired pipeline image is used as the center of a circle by the proposed automatic positioning algorithm, and the inner and outer circle radii with fixed values are preset, so that the effective expansion areas of the images with the same size can be determined. According to the imaging characteristics of the pipe wall, the image of the pipe wall can be enhanced by utilizing gray level conversion, and the central black area is highlighted. And automatically segmenting the tube wall image by adopting an Otsu algorithm, wherein the image after threshold segmentation comprises an invalid noise area. And then removing invalid small communication areas by setting a proper threshold, marking the central areas in the remaining communication areas to be closest to a circle by using an area marking method, and calculating the roundness of each area. As the center of the pipeline is positioned near the center of the image, the roundness of a non-central area is obviously smaller than that of the central area, the interference of the non-central area is eliminated by setting a proper threshold range, and the centroid of the central area is calculated and can be used as the center point coordinate of the forward-looking pipeline image.
Referring to fig. 6-7, the model building and matching process after the center coordinates are determined assumes that the depth of field of the pipeline is L, the distance between the pipeline and the plane where the camera lens is located is DL, and the camera constant is k within the effective view angle range of the camera according to the projection relationship. When the camera is centered in the pipeline (the central axis of the camera is coincident with the central axis of the pipeline), the target pipeline (a section of cylinder with the height h on the pipeline) is like a concentric ring in the camera. The center of the circle corresponds to the projection image point of the central axis of the camera. The coordinates (oox, ooy) of the fixed point are coincident with the center (ox, oy) of the pipeline, and the distance d = L + DL-z (z is more than or equal to 0 and less than or equal to h) is parallel to the lens plane of the camera according to the imaging principleThe image of the section of the pipeline is that the circle center is (ox, oy) and the radius is r 0 Circle of/d. And (4) projecting pixel points according to the pipeline, and fitting a similar foresight imaging graph as a reference model of a pipeline undistorted image through the change of the radius. The forward-looking image and the model are imaged by a camera in the same illumination area, and the central point positioning coordinates are used as the central position of the reference model and the matched image, so that the effective area is normalized, and the nonlinear distortion influence of the image is eliminated.
Referring to fig. 8, the defect image expansion result after model matching is shown, and a pipeline linear projection model is constructed through the projection function relationship of equations (6) and (7). And taking the three fitting curves as area reference lines, wherein blue represents the maximum effective area radius, green represents the depth of field median of the forward-looking pipeline image, and red represents the minimum effective area radius. And taking the automatic positioning result of the central point as a model center to match with a reference model. In this embodiment, a camera is calibrated to obtain a camera constant k of 200, assuming that the length of an illumination effective area L is 120mm, the distance DL from a camera lens to the effective area is 40mm, and the radius OD of a pipeline is known to be 50mm, and an expansion experiment is performed on an image 7A and an image 7B matched with a reference model respectively. The unfolded image eliminates the influence of nonlinear distortion, the length and the width of the unfolded image are kept consistent, and the image characteristics are basically reserved.
Referring to fig. 9, which is an expanded view of a panoramic image in the field of view of a camera, effective areas from the outer circle to the inner circle of fig. 7A and 7B are respectively registered and fused by a SIFT algorithm. And obtaining a fused image in a 360-degree area of the forward looking shaft. The length and width of the fused image are basically kept unchanged, the image transition after the pixel accumulation of each line is smooth, gaps between the spliced images obviously disappear, and except the pixel loss of a deeper area, other data of the image are basically kept complete and accord with the expected effect. Meanwhile, a favorable reference value is provided for the feature evaluation and quantitative analysis and statistics of the subsequent universe image, and the generation of unnecessary statistical errors is avoided.
Claims (7)
1. The oil and gas pipeline inner wall defect image visualization detection method based on the projection model is characterized in that: the method specifically comprises the following steps:
step 1, acquiring a pipeline defect image; acquiring a pipeline image through a CCTV pipeline endoscopic detection system, detecting the conditions of scaling, corrosion, perforation and crack in the pipeline, observing and storing video data in real time, and transmitting the video to the ground;
step 2, segmenting a pipeline image region; setting a threshold value to segment the pipeline defect image area, dividing and marking each roundness area, comparing the roundness size, and determining a target area by sequencing and screening the maximum roundness one by one;
step 3, positioning the image center point and matching a three-dimensional projection model; taking the maximum roundness area as an area to which the center of the image belongs, calculating the centroid of the area as the center coordinate of the image of the defective pipeline, presetting the inner circle radius and the outer circle radius of fixed values, and determining the effective expansion area of each image with the same size;
step 4, unfolding and mapping the region, storing a predetermined effective region, simulating the imaging process of a video camera through MATLAB, converting a three-dimensional pipeline represented by a physical unit into a two-dimensional linear fitting circle through a projection function, establishing a three-dimensional projection model, matching the three-dimensional projection model with the effective region as a linear imaging model of an actual camera, and eliminating the influence of nonlinear distortion;
and 5, converting the Cartesian coordinates I (x (r, theta), y (r, theta)) of the annular region into polar coordinates I (r, theta) by using the coordinates of the center point of the image determined in the step 3 as a polar coordinate origin, and dynamically expanding the annular effective region into a rectangular image by taking the difference between the outer circumference of the projection model and the projection radius as the length and the width.
2. The oil and gas pipeline inner wall defect image visualization detection method based on the projection model as claimed in claim 1, characterized in that: and 2, enhancing a central black area by intercepting the single-frame pipeline image with the defect characteristics and utilizing gray level transformation. And automatically segmenting the image of the pipe wall by integrating mathematical morphology edge detection and adopting an Otsu algorithm, and removing invalid small connected regions by setting a proper threshold value. And in the remaining regions, the central region is closest to the circle, the remaining regions are marked with different colors by using a region marking algorithm, and the roundness of each region is calculated.
3. The oil and gas pipeline inner wall defect image visualization detection method based on the projection model as claimed in claim 1 or 2, wherein: the roundness of the region in the step 2 is defined by the following formula:
wherein a is the number of pixels in the region, p is the length of the boundary of the region, and e is the similarity between the region and the circle.
4. The projection model-based oil and gas pipeline inner wall defect image visualization detection method according to claim 1, characterized in that: the step 3 specifically comprises the following steps: and (3) setting a threshold range for the connected region marked in the step (2), eliminating the interference of the characteristic region lower than the maximum circularity value, extracting the central region, and calculating the centroid of the central region as the coordinate of the central point of the pipeline image.
5. The oil and gas pipeline inner wall defect image visualization detection method based on the projection model as claimed in claim 1, characterized in that: step 3 the threshold range is between about 1.2 and about 1.5.
6. The projection model-based oil and gas pipeline inner wall defect image visualization detection method according to claim 1, characterized in that: and 4, establishing a linear imaging model of the object plane and the image plane according to the three-dimensional space object projection relation: the model assumes that s is the size of the pipeline projection image, in pix; d is the physical size of the space object in mm; b is the distance between the image plane and the lens in mm; a is the distance between the object plane and the lens, i.e. a = nf, unit mm; assuming that the pixel dx = dy and the side length is p, and the unit is mm/pix, a projection function relation can be obtained according to the linear projection relation of the object:
Wherein k = b/p is a camera constant and has a unit of pix, and the size of the object image is in direct proportion to the size of the object and in inverse proportion to the distance between the object and the plane where the lens is located; because the distance o between the image plane and the object plane is unknown, and the size of p cannot be determined, the size of k needs to be obtained by calibrating a camera;
according to the projection function relation, assuming that the depth of field of the pipeline is L, the distance between the pipeline and the plane where the camera lens is located is DL, the camera constant is k, the pipe diameter is OD and the distance a between the image plane and the object plane is known in the effective visual angle range of the camera, and determining the projection excircle radius r of the pipeline according to the parameters 1 And inner circle radius r 2 The size of (A) is as follows:
as the projection radius of the pipeline is a fixed value, each frame of image of the same video has the same model structure with the radius r of an excircle 1 And inner circle radius r 2 The projection radius wrapping area is used as an effective area of the pipeline image to generate a rectangular image; the effective area is regarded as a two-dimensional image with a depth framework, the position of a camera lens is taken as a starting point, and the two-dimensional image is measured from the excircle radius r 1 And inner circle radius r 2 The retraction process reflects the imaging process of the camera from near to far; the dynamic variation trend of the projection radius r of the effective area along with the distance from DL to DL + L is as follows:
through radius value r i Positioning duct z = z i A single-layer annular active area; the area is equivalent to a fitted circular curve, a pipeline is scanned for a circle, points on a continuous area in a 360-degree range are calculated, and the pixel coordinates of a pipeline projection model corresponding to the current radius value are as follows:
x=r i ×cos(2πθ/360°)+x 0 +ox
y=r i ×sin(2πθ/360°)+y 0 +oy
wherein, theta is belonged to (0, 360 degree), (x) 0 ,y 0 ) For the coordinates of the center point of the automatic positioning, (ox, oy) is a compensation parameter.
7. The oil and gas pipeline inner wall defect image visualization detection method based on the projection model as claimed in claim 1, characterized in that: said step 5 is in the forward-looking image, O (x) 0 ,y 0 ) Is the camera center coordinate, r 1 Is the radius of the outer circle, r 2 Is the radius of the inner circle, r 3 Is the center circle radius; p c (x c ,y c ) The method is characterized in that the method is a point on an annular effective area of an image, a corresponding point of the point in an expanded image is Q (u, v), a coordinate of a point P is calculated by utilizing a coordinate of the point Q, a pixel coordinate of the point P is assigned to the point Q, and the direct mapping relation of the two points in the space is as follows:
x c =x 0 +(r+v)sinθ
y c =y 0 +(r+v)cosθ
θ=u/R
where θ is the extreme angle of the pipeline image, (x) 0 ,y 0 ) Is the location center point coordinate of the image, (x) c ,y c ) Is the pixel coordinate of the P point, and (u, v) is the pixel coordinate of the Q point;
matching a linear camera projection model with a pipeline image, registering an eccentric image through a reference model, and delimiting an effective expansion area; establishing a one-to-one corresponding relation between the pipeline image and coordinate points in the rectangular image through the coordinate mapping; wherein, the excircle radius r of the effective area 1 And minimum outer circle radius r 2 Comprises the following steps:
r 1 =OD/DL×k
r 2 =OD/(DL+L)
according to the excircle radius r of the upper projection model 1 And inner circle radius r 2 The calculation of (2) can obtain the width w of the unfolded image as 2 pi r 1 The height h is L/DL multiplied by k; the pixel points in the effective area of the pipeline image can be regarded as pixel coordinates on a fitting circle with the radius change of the projection model, and the pixel coordinates are obtained through r 1 To r 2 The radius changes, scans all the pixel points corresponding to different radii in the effective area in sequence, and arranges on the rectangular image, and the reverse dynamic expansion formula is:
u=r i cos(2π(w 1 →w 2 )/w)+x 0 +ox
v=r i sin(2π(w 1 →w 2 )/w)+y 0 +oy
wherein, w 1 =2πr 1 Is the radius r of the outer circle 1 Fitting circumference, w 2 =2πr 2 Is the radius r of the inner circle 2 Fitting circumference r i And (u, v) are the coordinates of the pixels in the annular effective area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210886992.7A CN115234845B (en) | 2022-07-26 | 2022-07-26 | Projection model-based oil and gas pipeline inner wall defect image visualization detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210886992.7A CN115234845B (en) | 2022-07-26 | 2022-07-26 | Projection model-based oil and gas pipeline inner wall defect image visualization detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115234845A true CN115234845A (en) | 2022-10-25 |
CN115234845B CN115234845B (en) | 2024-07-23 |
Family
ID=83674937
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210886992.7A Active CN115234845B (en) | 2022-07-26 | 2022-07-26 | Projection model-based oil and gas pipeline inner wall defect image visualization detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115234845B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117309903A (en) * | 2023-10-10 | 2023-12-29 | 青岛峻海物联科技有限公司 | Method and device for positioning defects in tunnel |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7162073B1 (en) * | 2001-11-30 | 2007-01-09 | Cognex Technology And Investment Corporation | Methods and apparatuses for detecting classifying and measuring spot defects in an image of an object |
CN102135236A (en) * | 2011-01-05 | 2011-07-27 | 北京航空航天大学 | Automatic non-destructive testing method for internal wall of binocular vision pipeline |
WO2015051225A1 (en) * | 2013-10-03 | 2015-04-09 | Schlumberger Canada Limited | Pipe damage assessment system and method |
CN110390649A (en) * | 2019-07-16 | 2019-10-29 | 西安石油大学 | A method of for oil-gas pipeline weld image noise reduction |
CA3138073A1 (en) * | 2020-11-18 | 2022-05-18 | Georg Fischer Rohrleitungssysteme Ag | Monitoring of pipeline systems |
CN114742797A (en) * | 2022-04-12 | 2022-07-12 | 清华大学 | Defect detection method for drainage pipeline inner wall panoramic image and image acquisition robot |
-
2022
- 2022-07-26 CN CN202210886992.7A patent/CN115234845B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7162073B1 (en) * | 2001-11-30 | 2007-01-09 | Cognex Technology And Investment Corporation | Methods and apparatuses for detecting classifying and measuring spot defects in an image of an object |
CN102135236A (en) * | 2011-01-05 | 2011-07-27 | 北京航空航天大学 | Automatic non-destructive testing method for internal wall of binocular vision pipeline |
WO2015051225A1 (en) * | 2013-10-03 | 2015-04-09 | Schlumberger Canada Limited | Pipe damage assessment system and method |
CN110390649A (en) * | 2019-07-16 | 2019-10-29 | 西安石油大学 | A method of for oil-gas pipeline weld image noise reduction |
CA3138073A1 (en) * | 2020-11-18 | 2022-05-18 | Georg Fischer Rohrleitungssysteme Ag | Monitoring of pipeline systems |
CN114742797A (en) * | 2022-04-12 | 2022-07-12 | 清华大学 | Defect detection method for drainage pipeline inner wall panoramic image and image acquisition robot |
Non-Patent Citations (3)
Title |
---|
巨佳;王银强;刘天时;: "计算机超声检测装置在管道焊缝缺陷检测中的应用", 中小企业管理与科技(下旬刊), no. 08, 25 August 2013 (2013-08-25) * |
汤一平;鲁少辉;吴挺;韩国栋;: "基于主动式全景视觉的管道形貌缺陷检测系统", 红外与激光工程, no. 11, 25 November 2016 (2016-11-25), pages 1117005 - 1 * |
董晴晴;王宏涛;李灏;: "基于图像处理技术的管道裂缝检测方法研究", 应用科技, no. 01, 28 April 2017 (2017-04-28), pages 96 - 100 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117309903A (en) * | 2023-10-10 | 2023-12-29 | 青岛峻海物联科技有限公司 | Method and device for positioning defects in tunnel |
CN117309903B (en) * | 2023-10-10 | 2024-05-07 | 青岛峻海物联科技有限公司 | Method and device for positioning defects in tunnel |
Also Published As
Publication number | Publication date |
---|---|
CN115234845B (en) | 2024-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109544679B (en) | Three-dimensional reconstruction method for inner wall of pipeline | |
CN102135236B (en) | Automatic non-destructive testing method for internal wall of binocular vision pipeline | |
CN111047568B (en) | Method and system for detecting and identifying steam leakage defect | |
CN101109715B (en) | Optical method for detecting defect on inner wall of holes | |
US10902664B2 (en) | System and method for detecting damage using two-dimensional imagery and three-dimensional model | |
CN102927448A (en) | Undamaged detection method for pipeline | |
CN110378884B (en) | Method for carrying out eccentricity correction and expansion transformation on in-tube visual detection video | |
CN107218928A (en) | A kind of complicated multi- piping branch system detection method | |
KR101607078B1 (en) | Method of measuring curvature and mapping of underground pipeline using vision | |
CN106996748A (en) | Wheel diameter measuring method based on binocular vision | |
CA3027904C (en) | Quantitative surface measurements by combining image and height profile data | |
CN111667470A (en) | Industrial pipeline flaw detection inner wall detection method based on digital image | |
CN115841449B (en) | Monocular distance measurement method for longitudinal positioning of structural defect of drainage pipeline and storage medium | |
CN115234845B (en) | Projection model-based oil and gas pipeline inner wall defect image visualization detection method | |
CN114941807A (en) | Unmanned aerial vehicle-based rapid monitoring and positioning method for leakage of thermal pipeline | |
CN116804359A (en) | Virtual rock core imaging equipment and method based on forward-looking panoramic drilling shooting | |
CN116878748A (en) | Laser and image fusion intelligent gas leakage positioning method and device | |
CN117214172A (en) | Method and device for detecting defects of inner wall of long barrel cylinder and storage medium | |
CN112102395A (en) | Autonomous inspection method based on machine vision | |
CN109767426B (en) | Shield tunnel water leakage detection method based on image feature recognition | |
Mangayarkarasi et al. | Influence of computer vision and iot for pipeline inspection-a review | |
CN115598131B (en) | Positioning method suitable for welding lines in pipeline | |
CN113506208B (en) | Annular image plane unfolding method of forward-looking drilling visual observer | |
CN115266932A (en) | Gearbox gear shaft flaw detection method | |
CN110634136B (en) | Pipeline wall damage detection method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |