CN115131374A - Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment - Google Patents

Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment Download PDF

Info

Publication number
CN115131374A
CN115131374A CN202210869910.8A CN202210869910A CN115131374A CN 115131374 A CN115131374 A CN 115131374A CN 202210869910 A CN202210869910 A CN 202210869910A CN 115131374 A CN115131374 A CN 115131374A
Authority
CN
China
Prior art keywords
point cloud
main body
diameter
column main
dimensional point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210869910.8A
Other languages
Chinese (zh)
Inventor
潘念一
彭艳
孙佳诚
肖伟平
吴毅强
李经波
曹亮
李小毛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qingying Machine Visual Technology Co ltd
University of Shanghai for Science and Technology
Original Assignee
Beijing Qingying Machine Visual Technology Co ltd
University of Shanghai for Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qingying Machine Visual Technology Co ltd, University of Shanghai for Science and Technology filed Critical Beijing Qingying Machine Visual Technology Co ltd
Priority to CN202210869910.8A priority Critical patent/CN115131374A/en
Publication of CN115131374A publication Critical patent/CN115131374A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a petroleum drill pipe reducing positioning method, a petroleum drill pipe reducing positioning system and electronic equipment based on three-dimensional point cloud, which relate to the technical field of three-dimensional point cloud processing and mainly comprise the steps of denoising and filtering three-dimensional point cloud data of a pipe column main body; projecting the three-dimensional point cloud data of the tubular column main body after denoising and filtering onto a two-dimensional plane to obtain a main view of the tubular column main body, and equally dividing the three-dimensional point cloud data of the tubular column main body after denoising and filtering into a plurality of point cloud interval blocks along a y axis on the main view of the tubular column main body; determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm; and determining a reducing area of the tubular column main body based on a pipe diameter area identification algorithm and a pipe diameter median curve. The invention has the advantages of stronger safety, better real-time performance and higher accuracy.

Description

Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment
Technical Field
The invention relates to the technical field of three-dimensional point cloud processing, in particular to a petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment.
Background
The petroleum drill pipe is an important device for petroleum and crude oil drilling construction, and mainly provides a petroleum transmission channel. The tubular column main body in the petroleum drilling rod comprises an upper tubular column (a drilling rod male screw thread) and a lower tubular column (a drilling rod female screw thread), wherein the upper tubular column and the lower tubular column are connected in a threaded screwing mode through a coupling. The area where the pipe diameters of the upper pipe column and the lower pipe column are changed is variable diameter, as shown in fig. 1, the area where the pipe diameters of the upper pipe column are changed is upper variable diameter, and the area where the pipe diameters of the lower pipe column are changed is lower variable diameter.
Tripping is an important link in the construction of a drilling machine, the upper pipe column and the lower pipe column of the petroleum drill pipe need to be unscrewed after tripping, the tripping is industrially called, the upper pipe column and the lower pipe column of the petroleum drill pipe need to be screwed before tripping, and the tripping is industrially called. In the continuous make-up and break-out process, a driller is required to position the lower reducing diameter of the oil drill pipe in the traditional industry, and a hydraulic clamp is manually deployed to complete the operation, so that the manual operation efficiency is low, and the potential safety hazard is large under the complex industrial environment of oil drilling. The existing automatic hydraulic tong deployment device firstly needs manual auxiliary positioning to the position of the lower diameter-changing part of the petroleum drill rod, then moves the hydraulic tong to a designated area through the automatic hydraulic tong deployment device to carry out the operation of making up and breaking out, improves the operation efficiency to a certain extent through an automation technology, still has errors in the lower diameter-changing positioning of the petroleum drill rod, and fails to reduce manual operation to the maximum extent. The current advanced image recognition algorithm mainly takes a drill pipe diameter-changing positioning method for mapping from a two-dimensional image to three-dimensional point cloud data as a main part, the method needs to detect a wire outgoing section in the two-dimensional image by using a straight line detection algorithm and carry out aggregation, the calculated amount is large, the steps are complicated, and meanwhile, the finally positioned pipe column diameter-changing three-dimensional point cloud coordinate depends on the precision of a two-dimensional image detection result and cannot effectively utilize three-dimensional point cloud data information.
Disclosure of Invention
The invention aims to provide a petroleum drill rod diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment, and the method and system have the advantages of higher safety, better real-time performance and higher accuracy.
In order to achieve the purpose, the invention provides the following scheme:
in a first aspect, the invention provides a petroleum drill pipe diameter-changing positioning method based on three-dimensional point cloud, which comprises the following steps:
determining three-dimensional point cloud data of a tubular column main body;
denoising and filtering the three-dimensional point cloud data of the tubular column main body;
projecting the three-dimensional point cloud data of the pipe column main body subjected to denoising and filtering onto a two-dimensional plane to obtain a main view of the pipe column main body, and equally dividing the three-dimensional point cloud data of the pipe column main body subjected to denoising and filtering into a plurality of point cloud interval blocks along a y axis on the main view of the pipe column main body;
calculating the diameter of each point cloud interval block, and determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm;
and determining a reducing area of the tubular column main body based on a pipe diameter area identification algorithm and a pipe diameter median curve.
Optionally, the determining the three-dimensional point cloud data of the tubular column body specifically includes:
acquiring a three-dimensional point cloud original image of the petroleum drill pipe; the oil drill pipe at least comprises a pipe column main body;
and segmenting the three-dimensional point cloud original image according to the relative position relation between the three-dimensional matrix camera and the tubular column main body to obtain the three-dimensional point cloud data of the tubular column main body.
Optionally, the performing denoising and filtering processing on the three-dimensional point cloud data of the tubular column main body specifically includes:
processing the three-dimensional point cloud data of the tubular column main body by utilizing a voxel downsampling algorithm;
and (3) carrying out denoising and filtering processing on the three-dimensional point cloud data of the tubular column main body after down-sampling by adopting an outlier filtering algorithm.
Optionally, the processing the tubular column main body three-dimensional point cloud data by using a voxel downsampling algorithm specifically includes:
constructing a three-dimensional voxel grid based on the three-dimensional point cloud data of the tubular column main body; the three-dimensional voxel grid comprises a plurality of voxels;
calculating the mass center of each voxel, and replacing the mass center of the marked voxel with point cloud data in the marked voxel to further obtain the three-dimensional point cloud data of the tubular column main body after down sampling; the labeled voxel is any voxel.
Optionally, the calculating the diameter of each point cloud interval block specifically includes:
sequentially traversing the point cloud interval blocks along the y-axis direction, and determining the maximum value and the minimum value of each point cloud interval block in the x-axis direction;
and determining the difference between the maximum value and the minimum value of the point cloud interval block in the x-axis direction as the diameter of the point cloud interval block.
Optionally, the determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm specifically includes:
determining the diameter median of a neighborhood point cloud interval block near each point cloud interval block;
based on a sorting statistical theory, sorting the diameter median of the neighborhood point cloud interval blocks near the marked point cloud interval blocks to obtain a diameter median sorting queue corresponding to each point cloud interval block; the marked point cloud interval block is any point cloud interval block;
determining a diameter median positioned in the middle of the diameter median sorting queue as the diameter median of the point cloud interval block;
and determining a pipe diameter median curve according to the diameter median of each point cloud interval block.
In a second aspect, the present invention provides a three-dimensional point cloud based variable diameter positioning system for an oil drill pipe, including:
the pipe column main body three-dimensional point cloud data determining module is used for determining the pipe column main body three-dimensional point cloud data;
the de-noising and filtering processing module is used for de-noising and filtering the three-dimensional point cloud data of the tubular column main body;
the device comprises a point cloud interval block determining module, a data processing module and a data processing module, wherein the point cloud interval block determining module is used for projecting the three-dimensional point cloud data of the pipe column main body after denoising and filtering onto a two-dimensional plane to obtain a main view of the pipe column main body, and equally dividing the three-dimensional point cloud data of the pipe column main body after denoising and filtering into a plurality of point cloud interval blocks along a y axis on the main view of the pipe column main body;
the pipe diameter median curve determining module is used for calculating the diameter of each point cloud interval block and determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm;
and the diameter-changing area determining module of the tubular column main body is used for determining the diameter-changing area of the tubular column main body based on a pipe diameter area identification algorithm and a pipe diameter median curve.
Optionally, the denoising and filtering processing module specifically includes:
the down-sampling processing unit is used for processing the three-dimensional point cloud data of the tubular column main body by utilizing a voxel down-sampling algorithm;
and the denoising and filtering processing unit is used for denoising and filtering the three-dimensional point cloud data of the tubular column main body after down-sampling by adopting an outlier filtering algorithm.
In a third aspect, the present invention provides an electronic device, including a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to make the electronic device execute the method for positioning variable diameter of a petroleum drill pipe based on three-dimensional point cloud according to the first aspect.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
in view of the above description, the conventional purely manual operation, semi-automatic method and multi-dimensional combined image recognition method cannot be well applied to the drilling construction of the oil drill pipe. The invention provides a petroleum drill pipe reducing positioning method and system based on three-dimensional point cloud and electronic equipment. The method comprises the steps of firstly determining three-dimensional point cloud data of a pipe column main body, carrying out denoising and filtering processing on the three-dimensional point cloud data of the pipe column main body, then projecting the three-dimensional point cloud data of the pipe column main body subjected to denoising and filtering onto a two-dimensional plane to obtain a main view of the pipe column main body, partitioning the pipe column main body into blocks at equal intervals along a y axis, smoothing pipe diameter noise by using an improved median filtering algorithm to obtain a pipe diameter median curve, finally detecting a reducing area and filtering complex noise on the pipe diameter median curve by using a pipe diameter area identification algorithm, and finally realizing automatic reducing area positioning.
The petroleum drill pipe reducing positioning method and system based on the three-dimensional point cloud provided by the invention avoid the defects caused by a manual detection method and a two-stage method from a two-dimensional image to a three-dimensional point cloud space mapping.
The positioning method is applied to positioning of the diameter-variable area of the oil drill pipe in the oil drilling construction scene, effectively reduces labor cost, and has the advantages of higher safety, better real-time performance and higher accuracy.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic diagram of an upper pipe column, a lower pipe column, a parting surface and an upper and lower reducing area of an oil drill pipe;
FIG. 2 is a schematic flow chart of a petroleum drill pipe diameter-changing positioning method based on three-dimensional point cloud;
FIG. 3 is a schematic diagram of the relative positions of a three-dimensional matrix camera and a tubular column body according to the present invention;
FIG. 4 is a schematic view of the present invention with the main body of the column partitioned into equal intervals;
FIG. 5 is a schematic diagram of the missing point cloud and noise points outside the pipe string according to the present invention;
FIG. 6 is a schematic diagram of the noise peak of a diameter sampling curve caused by the absence of point clouds and noise points outside a pipe column according to the invention;
FIG. 7 is a graph showing the median diameter curve of the tube of the present invention;
FIG. 8 is a schematic diagram of the result of the tube diameter zone location algorithm of the present invention;
FIG. 9 is a schematic diagram of the result of dividing a pipe column point cloud into a variable diameter area and a noise area according to the present invention;
FIG. 10 is a schematic process diagram of a method for positioning a variable diameter petroleum drill pipe based on a three-dimensional point cloud;
FIG. 11 is a schematic structural diagram of an oil drill pipe reducing positioning system based on three-dimensional point cloud.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The first embodiment is as follows:
as shown in fig. 2, an embodiment of the present invention provides a method for positioning a variable diameter of an oil drill pipe based on a three-dimensional point cloud, including:
step 100: and determining three-dimensional point cloud data of the tubular column main body.
Step 200: and denoising and filtering the three-dimensional point cloud data of the tubular column main body.
Step 300: and projecting the three-dimensional point cloud data of the tubular column main body after denoising and filtering onto a two-dimensional plane to obtain a main view of the tubular column main body, and equally dividing the three-dimensional point cloud data of the tubular column main body after denoising and filtering into a plurality of point cloud interval blocks along a y axis on the main view of the tubular column main body.
Step 400: and calculating the diameter of each point cloud interval block, and determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm.
Step 500: and determining the diameter-changing area of the pipe column main body based on a pipe diameter area identification algorithm and a pipe diameter median curve.
As a preferred embodiment of step 100, specifically, the method includes:
step 1001: acquiring a three-dimensional point cloud original image of the petroleum drill pipe; the oil drill pipe includes at least a pipe string body.
Step 1002: and segmenting the three-dimensional point cloud original image according to the relative position relation between the three-dimensional matrix camera and the tubular column main body to obtain tubular column main body three-dimensional point cloud data of the petroleum drill pipe.
One example is: in an actual industrial scene, the relative position of the three-dimensional matrix camera shooting position and the column body is fixed, specifically, as shown in fig. 3, the column body is located 25 meters in front of the three-dimensional matrix camera, namely a in fig. 3, the center of the column body is flush with the three-dimensional matrix camera shooting center, the center of the column body is 8 meters higher relative to the ground, namely b in fig. 3, and the height of the column body is 15 meters, namely c in fig. 3.
According to the position of a three-dimensional matrix camera in an actual industrial scene, a relative area of a tubular column main body is obtained from a three-dimensional point cloud original image, then three-dimensional point cloud data of the tubular column main body is obtained by utilizing a point cloud segmentation technology, namely according to the relative position relation between the three-dimensional matrix camera and the tubular column main body in the actual industrial scene, point cloud data coordinates on the left side, the right side, the front side and the rear side of the tubular column can be respectively positioned on the x axis, the y axis and the z axis of the three-dimensional point cloud original image, and an area of interest (RoI, Region of interest) is segmented to obtain the three-dimensional point cloud data of the tubular column main body.
As a preferred embodiment of step 200, specifically, the method includes:
step 2001: and processing the three-dimensional point cloud data of the tubular column main body by utilizing a voxel downsampling algorithm. The method specifically comprises the following steps:
constructing a three-dimensional voxel grid based on the three-dimensional point cloud data of the tubular column main body; the three-dimensional voxel grid comprises a plurality of voxels; calculating the mass center of each voxel, and replacing the mass center of the marked voxel with point cloud data in the marked voxel to further obtain the three-dimensional point cloud data of the tubular column main body after down sampling; the labeled voxel is any voxel.
Step 2002: and denoising and filtering the three-dimensional point cloud data of the tubular column main body after down-sampling by adopting an outlier filtering algorithm.
One example is: due to the disorder of the point cloud, the calculation amount is large when the three-dimensional point cloud data of the tube column main body is searched. For this situation, the embodiment of the present invention performs processing using a voxel downsampling algorithm.
And (3) a voxel downsampling algorithm: and carrying out down-sampling on the three-dimensional point cloud data of the tubular column main body so as to reduce subsequent calculation amount. The specific implementation mode is as follows: and performing three-dimensional space voxelization on the three-dimensional point cloud data of the tubular column main body, and performing down-sampling in each voxel by using the mass center of the voxel as a sampling point.
Firstly, a three-dimensional voxel grid is created by utilizing the three-dimensional point cloud data of the divided tubular column main body, the size of the voxel is set to be V, the three-dimensional point cloud data of the tubular column main body is divided into the voxel grid of V, and the mass center of each voxel point cloud data is taken to replace all point cloud data in the voxel. The formula is as follows:
let the voxel size be V, each voxel contains n points, voxel centroid P c Expressed as:
Figure BDA0003760388530000071
wherein (x) c ,y c ,z c ) Is the centroid P c (x) three-dimensional coordinates of (c) i ,y i ,z i ) And n represents the number of point cloud data in one voxel for the three-dimensional coordinates of the ith point cloud data in the divided voxels.
This can complicate the characteristics of the local point cloud, interfering with the point cloud surface normal or curvature change estimation, due to the presence of discrete or clustered outliers in the point cloud data. The outlier filtering algorithm based on statistics can effectively remove outlier noise point cloud data, and pipe column main body three-dimensional point cloud data which obey Gaussian distribution are reserved.
Outlier filtering algorithm: and filtering noise points of the three-dimensional point cloud data of the tubular column main body after down-sampling so as to obtain a smoother curve in a subsequent experiment. The specific implementation mode is as follows: and removing the three-dimensional point cloud data of the tubular column main body after down-sampling by using an outlier filtering algorithm, and filtering out points which are far away from the average distance in the field points near the three-dimensional point cloud data of the tubular column main body after down-sampling so as to remove noise points far away from the point cloud of the tubular column main body.
Firstly, performing statistical analysis on the neighborhood of each point in the three-dimensional point cloud data of the tubular column main body after down sampling, and calculating the average distance of K adjacent points of each point. Setting the three-dimensional point cloud data of the tubular column main body to have m points, wherein each point P i If there are K neighboring points, the average distance D is i Comprises the following steps:
Figure BDA0003760388530000072
(x j ,y j ,z j ) Representing the three-dimensional coordinates of the jth neighbor.
For each point P i Calculating to obtain D obeying Gaussian distribution i Then calculating the average distance D i Mean value μ and standard deviation σ of (d).
Figure BDA0003760388530000081
Figure BDA0003760388530000082
Thus, the target threshold τ can be determined:
τ=μ+kσ (5);
where k is the standard deviation multiplier. If K neighbors of a certain point have an average distance D i Above the target threshold τ, the point is retained, otherwise removed.
As a preferred implementation manner of step 300, specifically, the method includes:
step 3001: and projecting the three-dimensional point cloud data of the tubular column main body after denoising and filtering onto a two-dimensional plane to obtain a main view of the tubular column main body.
Step 3002: and determining the maximum value and the minimum value of the y axis on the front view of the pipe column main body.
Step 3003: and based on the maximum value and the minimum value of the y axis, equally dividing the three-dimensional point cloud data of the denoised and filtered pipe column main body into a plurality of point cloud interval blocks along the y axis on the main view of the pipe column main body.
Based on the above operations, the denoised and filtered three-dimensional point cloud data of the tubular column main body is equally divided into a point cloud interval block set B with the interval s and the block number B, as shown in fig. 4.
Figure BDA0003760388530000083
Wherein, y max Denotes the maximum value of the y-axis, y min The minimum value of the y-axis is indicated.
As a preferred implementation manner of step 400, specifically, the method includes:
step 4001: and determining the diameter median of the neighborhood point cloud interval blocks near each point cloud interval block.
Step 4002: based on a sorting statistical theory, sorting the diameter median of the neighborhood point cloud interval blocks near the marked point cloud interval blocks to obtain a diameter median sorting queue corresponding to each point cloud interval block; the marked point cloud interval block is any point cloud interval block.
Step 4003: and determining the diameter median positioned in the middle position of the diameter median sorting queue as the diameter median of the point cloud interval block.
Step 4004: and determining a pipe diameter median curve according to the diameter median of each point cloud interval block.
One example is as follows: firstly, traversing the point cloud information in the point cloud interval block set B from bottom to top along the y axis, counting the maximum value and the minimum value of the point cloud data in the point cloud interval block in the x axis direction, calculating the diameter of the point cloud interval block by using the difference between the maximum value and the minimum value, setting the diameter to be 0 if the point cloud in the point cloud interval block is empty, and setting the y coordinate value of each point cloud interval block to be the average value of all the point y coordinates in the point cloud interval block.
Secondly, when a three-dimensional point cloud original image is generated, due to interference of factors such as scenes, discrete noise points or point cloud loss can occur on the outer side of the tubular column, as shown in fig. 5. For example, when a diameter curve image of a pipe string point cloud interval block is generated, the diameter data of the corresponding point cloud interval block is null under the condition of point cloud missing, the diameter data calculated by the point cloud interval block with noise point cloud is far larger than the diameter data of the other point cloud interval blocks, and the diameter characteristic curve shows a peak state under the above two conditions, as shown in fig. 6. The occurrence of the peak value can directly influence the diameter measurement result, so that the precision of the automatic diameter-changing positioning algorithm is reduced, abnormal point cloud data in a tubular column are filtered through an improved median filtering algorithm, the representativeness of the point cloud data is improved, and the pipe diameter median curve is closer to the numerical change of the actual diameter.
Determining a diameter median of a neighborhood point cloud interval block near each point cloud interval block; based on an ordering statistical theory, ordering the diameter median of the neighborhood point cloud interval blocks near the marked point cloud interval block to obtain a diameter median ordering queue corresponding to each point cloud interval block; the marked point cloud interval block is any point cloud interval block; determining a diameter median positioned in the middle of the diameter median sorting queue as the diameter median of the point cloud interval block; and determining a pipe diameter median curve according to the diameter median of each point cloud interval block.
One example is: based on the ordering statistical theory, the diameter median of each point cloud interval block is replaced by the diameter median of the adjacent neighborhood point cloud interval block, and the number of the neighborhood is set to be 3. The formula is as follows:
for the median diameter d of point cloud interval block i (0<i<b) First, a neighborhood with length S is defined, N is a positive integer:
Figure BDA0003760388530000091
then the point cloud data samples of the point cloud blocks in the neighborhood are sorted according to the value:
Figure BDA0003760388530000092
wherein d is m (or (d) m +d m+1 ) And/2) the median diameter of the neighborhood with odd (or even) length, respectively.
Traversing all tubular column point cloud interval blocks, and updating a diameter median set L of the tubular column point cloud interval blocks by using the diameter median obtained in the steps:
L={d 1 ,d 2 ,…,d b };
wherein, b is the block number of the three-dimensional point cloud data of the tubular column main body along the y axis, and the obtained pipe diameter median curve takes the y coordinate value of the point cloud interval block as the x axis and the set L as the y axis, as shown in fig. 7.
As a preferred embodiment of step 500, specifically, the method includes:
the lower reducing diameter of the pipe column main body is gradually increased from bottom to top along the y axis, and a plurality of increasing or decreasing intervals appearing after the pipe diameter median curve obtained in the step 400 is subjected to median filtering can interfere with automatic reducing positioning. The lower diameter change of the pipe column in an actual scene is the part with the largest deformation in the whole pipe column, and based on the prior information, the derivative of the pipe diameter median curve can be detected. When the derivative value of the diameter median value in the point cloud interval block is continuously larger than the set threshold value, the state value of the point cloud interval block is marked as 1, otherwise, the state value is 0(1 represents the position to be detected, and 0 represents null).
And traversing the point cloud data in the point cloud interval blocks from bottom to top along the y axis, wherein the distance of division of the point cloud interval blocks is the same, so that the calculation of the diameter median derivative can be simplified into the direct calculation of the difference of the diameter median of two adjacent point cloud interval blocks.
Setting the diameter median of point cloud interval block as d i (0<i<b-1),θ 2 For the set derivative threshold, the state value state in the point cloud interval block is represented as:
Figure BDA0003760388530000101
wherein, analyzing and comparing the experimental result, and taking theta 1 Is 1, theta 2 Is 8.
The method can obtain the detection result of the median change of the diameter of the pipe column by taking the y coordinate value of the point cloud interval block as the x axis and the state value as the y axis, which is specifically shown in fig. 8.
The lower variable diameter of the tubular column main body is an area in which the diameter of the tubular column continuously changes, so according to the result of the derivative detection, the area with the state value of 1 is grouped according to the tightness degree of the point cloud on the y axis, and the three-dimensional point cloud data of the tubular column main body after denoising and filtering is further divided into a variable diameter area and a noise area, as shown in fig. 9 specifically.
And obtaining the y-axis coordinate of the reducing area, and mapping the y-axis coordinate back to the three-dimensional point cloud data coordinate of the tubular column main body, so that the three-dimensional coordinate of the lower reducing of the tubular column can be calculated, and the position of the lower reducing of the tubular column can be accurately positioned.
The tubular column in industrial application is divided into five types of 2-7/8 inches, 3-1/2 inches, 4 inches, 5 inches and 5-1/2 inches, wherein the types of 4 inches and 5 inches are taken as main types, and the tubular column of each type has detailed data such as pipe body diameter, coupling diameter, external coupling length, internal coupling length and the like. And obtaining the distance parameters from the lower reducing to the parting surface and the upper reducing according to the model of the pipe column, and positioning the pipe column to the positions of the lower reducing and the parting surface.
By the method, mapping positioning from a two-dimensional image to a three-dimensional point cloud space is not used for diameter change detection of the petroleum pipe column, but block measurement is directly carried out on three-dimensional point cloud diameter change area data of the pipe column, three-dimensional point cloud data information can be fully utilized, accuracy of measuring and calculating the diameter of the pipe column in an actual industrial scene is improved, and labor cost is reduced compared with original manual measurement. The petroleum drill pipe reducing positioning method based on the three-dimensional point cloud has the advantages of higher safety, higher real-time performance and higher measurement precision.
Example two
The embodiment provides a three-dimensional point cloud-based petroleum drill pipe diameter-changing positioning method, as shown in fig. 10, the specific implementation steps are as follows:
the method comprises the following steps of firstly, cutting an oil drill pipe column main body.
And according to the relative position of the tubular column main body and the matrix camera in the actual scene, segmenting tubular column main body three-dimensional point cloud data from a three-dimensional point cloud original image generated by shooting by the matrix camera.
And step two, voxel down-sampling.
And performing three-dimensional space voxelization on the segmented three-dimensional point cloud data of the tubular column main body, and performing down-sampling on each voxel by using the mass center of each voxel as a sampling point.
And step three, filtering outliers.
And filtering the noise of the point cloud in the three-dimensional point cloud data of the tubular column main body after down-sampling by using an outlier removing method based on statistics, eliminating sparse abnormal values far away from the tubular column main body, and keeping the tubular column main body point cloud which obeys Gaussian distribution.
And step four, calculating the diameter of the pipe column.
And extracting the diameter median of the tubular column point cloud interval block, smoothing noise by using a median filtering algorithm, and improving the representativeness of the tubular column point cloud interval block diameter point cloud data.
Partitioning the pipe column: and dividing the tubular column point cloud into point cloud interval blocks at equal intervals according to the range of the tubular column point cloud data in the y axis.
Calculating the block diameter: and traversing point cloud data in the tubular column point cloud interval blocks, and respectively calculating the distance of the point clouds of the point cloud interval blocks along the x axis as the diameter median of each point cloud interval block.
And (3) median filtering algorithm: based on the ordering statistical theory, an improved median filtering algorithm is used to filter the abnormal data in the diameter median. And processing the diameter median in the point cloud interval block according to the block, acquiring the diameter median of the neighborhood 3 nearby, and replacing the diameter median of the point cloud interval block by the median.
And fifthly, positioning the variable diameter of the pipe column.
And (3) positioning the pipe diameter area, detecting the derivative of the median diameter of the pipe column, calculating the difference of the median diameters of the point cloud interval blocks of the adjacent pipe columns, and marking the state value of the point cloud interval block as 1 if the difference value is within a set threshold range. And counting the state value information of all point cloud interval blocks, and dividing the area with the state value of 1 into a reducing area and a noise area according to the closeness degree of the point cloud on the y axis. And mapping the point cloud interval threshold value of the reducing area to the three-dimensional point cloud coordinate of the pipe column to obtain the three-dimensional coordinate of the lower reducing of the pipe column and positioning the three-dimensional coordinate to the lower reducing position of the pipe column. And further obtaining the distance parameters from the lower reducing to the parting surface and the upper reducing according to the model of the pipe column, and positioning the distance parameters to the upper reducing and the parting surface of the pipe column.
Example two
In order to implement the method corresponding to the above embodiment to achieve the corresponding functions and technical effects, the following provides a three-dimensional point cloud-based oil drill pipe variable diameter positioning system.
As shown in fig. 11, an oil drill pipe reducing positioning system based on three-dimensional point cloud provided by an embodiment of the present invention includes:
the tubular column main body three-dimensional point cloud data determining module 1 is used for determining tubular column main body three-dimensional point cloud data.
And the denoising and filtering processing module 2 is used for denoising and filtering the three-dimensional point cloud data of the tubular column main body.
And the point cloud interval block determining module 3 is used for projecting the three-dimensional point cloud data of the denoised and filtered pipe column main body onto a two-dimensional plane to obtain a main view of the pipe column main body, and equally dividing the three-dimensional point cloud data of the denoised and filtered pipe column main body into a plurality of point cloud interval blocks along a y axis on the main view of the pipe column main body.
And the pipe diameter median curve determining module 4 is used for calculating the diameter of each point cloud interval block and determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm.
And the diameter-changing area determining module 5 of the tubular column main body is used for determining the diameter-changing area of the tubular column main body based on a pipe diameter area recognition algorithm and a pipe diameter median curve.
Further, the denoising and filtering processing module 2 specifically includes:
and the down-sampling processing unit is used for processing the three-dimensional point cloud data of the tubular column main body by utilizing a voxel down-sampling algorithm.
And the de-noising and filtering processing unit is used for carrying out de-noising and filtering processing on the three-dimensional point cloud data of the tubular column main body after down-sampling by adopting an outlier filtering algorithm.
Example four
The embodiment of the invention provides an electronic device which comprises a memory and a processor, wherein the memory is used for storing a computer program, and the processor runs the computer program to enable the electronic device to execute the petroleum drill pipe diameter-changing positioning method based on three-dimensional point cloud.
Alternatively, the electronic device may be a server.
In addition, the embodiment of the invention also provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method for positioning the variable diameter of the petroleum drill pipe based on the three-dimensional point cloud in the first embodiment is realized.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principle and the embodiment of the present invention are explained by applying specific examples, and the above description of the embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (9)

1. A petroleum drill pipe reducing positioning method based on three-dimensional point cloud is characterized by comprising the following steps:
determining three-dimensional point cloud data of a pipe column main body;
denoising and filtering the three-dimensional point cloud data of the tubular column main body;
projecting the three-dimensional point cloud data of the pipe column main body subjected to denoising and filtering onto a two-dimensional plane to obtain a main view of the pipe column main body, and equally dividing the three-dimensional point cloud data of the pipe column main body subjected to denoising and filtering into a plurality of point cloud interval blocks along a y axis on the main view of the pipe column main body;
calculating the diameter of each point cloud interval block, and determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm;
and determining the diameter-changing area of the pipe column main body based on a pipe diameter area identification algorithm and a pipe diameter median curve.
2. The method for positioning the variable diameter of the petroleum drill pipe based on the three-dimensional point cloud as claimed in claim 1, wherein the determining of the three-dimensional point cloud data of the pipe column body specifically comprises:
acquiring a three-dimensional point cloud original image of the petroleum drill pipe; the oil drill pipe at least comprises a pipe column main body;
and segmenting the three-dimensional point cloud original image according to the relative position relation between the three-dimensional matrix camera and the tubular column main body to obtain the three-dimensional point cloud data of the tubular column main body.
3. The method for positioning the variable diameter of the petroleum drill pipe based on the three-dimensional point cloud as claimed in claim 1, wherein the denoising and filtering process is performed on the three-dimensional point cloud data of the pipe column main body, and specifically comprises:
processing the three-dimensional point cloud data of the tubular column main body by utilizing a voxel downsampling algorithm;
and denoising and filtering the three-dimensional point cloud data of the tubular column main body after down-sampling by adopting an outlier filtering algorithm.
4. The petroleum drill pipe reducing positioning method based on the three-dimensional point cloud as claimed in claim 3, wherein the processing of the three-dimensional point cloud data of the pipe column main body by using a voxel down-sampling algorithm specifically comprises:
constructing a three-dimensional voxel grid based on the three-dimensional point cloud data of the tubular column main body; the three-dimensional voxel grid comprises a plurality of voxels;
calculating the mass center of each voxel, and replacing the mass center of the marked voxel with point cloud data in the marked voxel to further obtain the three-dimensional point cloud data of the tubular column main body after down sampling; the labeled voxel is any voxel.
5. The method for positioning the variable diameter of the petroleum drill pipe based on the three-dimensional point cloud as claimed in claim 1, wherein the calculating the diameter of each point cloud interval block specifically comprises:
sequentially traversing the point cloud interval blocks along the y-axis direction, and determining the maximum value and the minimum value of each point cloud interval block in the x-axis direction;
and determining the difference between the maximum value and the minimum value of the point cloud interval block in the x-axis direction as the diameter of the point cloud interval block.
6. The method for positioning the variable diameter of the petroleum drill pipe based on the three-dimensional point cloud as claimed in claim 1, wherein the determining the pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm specifically comprises:
determining the diameter median of a neighborhood point cloud interval block near each point cloud interval block;
based on a sorting statistical theory, sorting the diameter median of the neighborhood point cloud interval blocks near the marked point cloud interval blocks to obtain a diameter median sorting queue corresponding to each point cloud interval block; the marked point cloud interval block is any point cloud interval block;
determining a diameter median positioned in the middle of the diameter median sorting queue as the diameter median of the point cloud interval block;
and determining a pipe diameter median curve according to the diameter median of each point cloud interval block.
7. The utility model provides an oil drill pipe reducing positioning system based on three-dimensional point cloud which characterized in that includes:
the tubular column main body three-dimensional point cloud data determining module is used for determining tubular column main body three-dimensional point cloud data;
the de-noising and filtering processing module is used for de-noising and filtering the three-dimensional point cloud data of the tubular column main body;
the device comprises a point cloud interval block determining module, a data processing module and a data processing module, wherein the point cloud interval block determining module is used for projecting the three-dimensional point cloud data of the pipe column main body after denoising and filtering onto a two-dimensional plane to obtain a main view of the pipe column main body, and equally dividing the three-dimensional point cloud data of the pipe column main body after denoising and filtering into a plurality of point cloud interval blocks along a y axis on the main view of the pipe column main body;
the pipe diameter median curve determining module is used for calculating the diameter of each point cloud interval block and determining a pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm;
and the diameter-changing area determining module of the tubular column main body is used for determining the diameter-changing area of the tubular column main body based on a pipe diameter area identification algorithm and a pipe diameter median curve.
8. The system of claim 7, wherein the denoising and filtering processing module specifically comprises:
the down-sampling processing unit is used for processing the three-dimensional point cloud data of the tubular column main body by utilizing a voxel down-sampling algorithm;
and the denoising and filtering processing unit is used for denoising and filtering the three-dimensional point cloud data of the tubular column main body after down-sampling by adopting an outlier filtering algorithm.
9. An electronic device, comprising a memory for storing a computer program and a processor, wherein the processor runs the computer program to make the electronic device execute the method for positioning drill pipe diameter variation based on three-dimensional point cloud according to any one of claims 1 to 6.
CN202210869910.8A 2022-07-22 2022-07-22 Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment Pending CN115131374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210869910.8A CN115131374A (en) 2022-07-22 2022-07-22 Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210869910.8A CN115131374A (en) 2022-07-22 2022-07-22 Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment

Publications (1)

Publication Number Publication Date
CN115131374A true CN115131374A (en) 2022-09-30

Family

ID=83383225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210869910.8A Pending CN115131374A (en) 2022-07-22 2022-07-22 Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment

Country Status (1)

Country Link
CN (1) CN115131374A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116128850A (en) * 2023-02-18 2023-05-16 西安正实智能科技有限公司 Perforation measurement method, device, equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116128850A (en) * 2023-02-18 2023-05-16 西安正实智能科技有限公司 Perforation measurement method, device, equipment and readable storage medium
CN116128850B (en) * 2023-02-18 2023-11-21 西安正实智能科技有限公司 Perforation measurement method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN110084095B (en) Lane line detection method, lane line detection apparatus, and computer storage medium
CN109060836B (en) Machine vision-based high-pressure oil pipe joint external thread detection method
Yuan et al. Robust lane detection for complicated road environment based on normal map
CN108711158B (en) Pointer instrument image identification method based on contour fitting and radial segmentation
CN107895375B (en) Complex road route extraction method based on visual multi-features
CN110321933B (en) Fault identification method and device based on deep learning
CN109658454B (en) Pose information determination method, related device and storage medium
CN110530278B (en) Method for measuring clearance surface difference by utilizing multi-line structured light
CN109285163B (en) Laser point cloud based lane line left and right contour line interactive extraction method
CN110717872A (en) Method and system for extracting characteristic points of V-shaped welding seam image under laser-assisted positioning
CN114119998B (en) Vehicle-mounted point cloud ground point extraction method and storage medium
CN115131374A (en) Petroleum drill pipe diameter-changing positioning method and system based on three-dimensional point cloud and electronic equipment
CN103345743A (en) Image segmentation method for intelligent flaw detection of cell tail end
CN109543498B (en) Lane line detection method based on multitask network
CN112149495A (en) Video key frame extraction method based on parallax tracking
CN105260559B (en) A kind of paper pulp fiber morphological parameters calculation method based on contour area and contour thinning
CN115731257A (en) Leaf form information extraction method based on image
CN103578105A (en) Method for multisource different-type image registration based on region features
CN116091404A (en) Welding line defect detection and pattern recognition method based on image-point cloud information fusion
CN106570878A (en) Heavy oil microcosmic interface detection method based on gray scale difference
CN117830297A (en) Weld joint identification method, welding device and electronic equipment
CN113793384A (en) Petroleum drill pipe diameter-changing positioning method and system based on image processing
CN110751196A (en) Oil-like drop attachment identification method in oil-water two-phase flow transparent pipe wall
CN105677669A (en) Sorting method and device for panoramic splicing images
Zhang et al. Real-time Lane Detection Method Based On Region Of Interest

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