Oil drill pipe variable diameter positioning method, system and electronic equipment based on three-dimensional point cloud

By performing denoising, filtering and block processing on the three-dimensional point cloud data of oil drill pipes, combined with the median filter algorithm and pipe diameter area identification, efficient automatic positioning of oil drill pipe diameter changes is achieved, which solves the problem of traditional manual positioning errors and secondary problems. It solves the problem of high computational complexity of dimensional image mapping and improves accuracy and security.

CN115131374BInactive Publication Date: 2024-09-20SHANGHAI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210869910.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2024-09-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the process of making up and unfastening oil drill pipes, traditional methods rely on manual positioning, which has errors and is inefficient. The existing automation system cannot fully reduce manual operations, and the method of mapping two-dimensional images to three-dimensional point clouds is computationally intensive. Moreover, the steps are cumbersome and the three-dimensional point cloud data cannot be effectively utilized.

Method used

By determining the three-dimensional point cloud data of the oil drill pipe, perform denoising filtering and project it to a two-dimensional plane, divide it into equal distances along the y-axis, use an improved median filter algorithm to smooth the noise, and combine the pipe diameter area identification algorithm to determine the diameter. area to achieve automated positioning.

Benefits of technology

It improves the accuracy and efficiency of oil drill pipe variable diameter positioning, reduces labor costs, enhances safety and real-time performance, avoids the defects of two-dimensional image dependence, and makes full use of three-dimensional point cloud data information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131374B
    Figure CN115131374B
Patent Text Reader

Abstract

The present invention discloses a method, system and electronic device for oil drill pipe variable diameter positioning based on three-dimensional point cloud, which relates to the technical field of three-dimensional point cloud processing, and mainly includes denoising and filtering the three-dimensional point cloud data of the pipe column body; projecting the three-dimensional point cloud data of the pipe column body after denoising and filtering onto a two-dimensional plane to obtain a main view of the pipe column body, and dividing the three-dimensional point cloud data of the pipe column body after denoising and filtering into a number of point cloud interval blocks at equal distances along the y-axis on the main view of the pipe column body; determining the pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm; determining the variable diameter area of ​​the pipe column body based on the pipe diameter area recognition algorithm and the pipe diameter median curve. The present invention has the advantages of stronger safety, better real-time performance and higher accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional point cloud processing, and in particular to a method, system and electronic equipment for oil drill pipe variable diameter positioning based on three-dimensional point cloud. Background Art

[0002] Oil drill pipe is an important equipment used in oil and crude oil drilling construction, mainly providing a channel for oil transmission. The main body of the pipe string in the oil drill pipe includes an upper pipe string (drill pipe male thread) and a lower pipe string (drill pipe female thread). The upper pipe string and the lower pipe string are connected by threaded connection through a coupling. The area where the diameter of the upper pipe string and the lower pipe string changes is called a variable diameter, such as Figure 1 As shown, the area where the diameter of the upper pipe string changes is the upper diameter change, and the area where the diameter of the lower pipe string changes is the lower diameter change.

[0003] Drilling is an important part of drilling rig construction. After drilling, the upper and lower pipes of the oil drill pipe need to be loosened, which is called unbuckling in the industry. Before drilling, the upper and lower pipes of the oil drill pipe need to be tightened, which is called make-up in the industry. In the continuous make-up and make-out process, drillers are required to locate the lower diameter change of the oil drill pipe in the traditional industry, and manually deploy hydraulic pliers to complete the operation. This manual operation is inefficient and has great safety hazards in the complex industrial environment of oil drilling. The existing automated hydraulic pliers deployment device first needs manual assistance to locate the lower diameter change of the oil drill pipe, and then the hydraulic pliers are moved to the designated area through the automated hydraulic pliers deployment device to perform make-up and make-out operations. The automated hydraulic pliers deployment device improves the operating efficiency to a certain extent through automation technology, but there are still errors in the positioning of the lower diameter change of the oil drill pipe, and manual operation is not minimized. The current advanced image recognition algorithms are mainly based on the drill pipe variable diameter positioning method that maps from two-dimensional images to three-dimensional point cloud data. This method requires the use of a straight line detection algorithm in the two-dimensional image to detect line segments and aggregate them. The calculation is large and the steps are cumbersome. At the same time, the final located three-dimensional point cloud coordinates of the pipe variable diameter depend on the accuracy of the two-dimensional image detection results, and fail to effectively utilize the three-dimensional point cloud data information. Summary of the invention

[0004] The purpose of the present invention is to provide a method, system and electronic equipment for oil drill pipe variable diameter positioning based on three-dimensional point cloud, which has the advantages of greater safety, better real-time performance and higher accuracy.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] In a first aspect, the present invention provides a method for oil drill pipe variable diameter positioning based on three-dimensional point cloud, comprising:

[0007] Determine the three-dimensional point cloud data of the pipe string body;

[0008] Performing denoising and filtering processing on the three-dimensional point cloud data of the pipe string body;

[0009] Projecting the denoised filtered three-dimensional point cloud data of the pipe string body onto a two-dimensional plane to obtain a main view of the pipe string body, and dividing the denoised filtered three-dimensional point cloud data of the pipe string body into a number of point cloud interval blocks at equal distances along the y-axis on the main view of the pipe string body;

[0010] Calculating the diameter of each of the point cloud interval blocks, and determining the pipe diameter median curve based on the diameter of each of the point cloud interval blocks and an improved median filtering algorithm;

[0011] Based on the pipe diameter area recognition algorithm and the pipe diameter median curve, the variable diameter area of ​​the pipe string body is determined.

[0012] Optionally, determining the three-dimensional point cloud data of the pipe string body specifically includes:

[0013] Acquire a three-dimensional point cloud original image of an oil drill pipe; the oil drill pipe at least includes a pipe string body;

[0014] According to the relative position relationship between the three-dimensional matrix camera and the pipe column body, the three-dimensional point cloud original image is segmented to obtain the three-dimensional point cloud data of the pipe column body.

[0015] Optionally, the performing denoising and filtering processing on the three-dimensional point cloud data of the pipe string body specifically includes:

[0016] Processing the three-dimensional point cloud data of the pipe string body by using a voxel downsampling algorithm;

[0017] The outlier filtering algorithm is used to perform denoising and filtering on the downsampled 3D point cloud data of the pipe string body.

[0018] Optionally, the processing of the three-dimensional point cloud data of the pipe string body by using a voxel downsampling algorithm specifically includes:

[0019] Based on the three-dimensional point cloud data of the pipe string body, construct a three-dimensional voxel grid; the three-dimensional voxel grid includes a plurality of voxels;

[0020] The centroid of each voxel is calculated, and the centroid of the marked voxel is used to replace the point cloud data in the marked voxel, thereby obtaining the downsampled three-dimensional point cloud data of the pipe string body; the marked voxel is any voxel.

[0021] Optionally, the calculating the diameter of each of the point cloud interval blocks specifically includes:

[0022] Traversing the point cloud interval blocks in sequence 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;

[0023] The difference between the maximum value and the minimum value of the point cloud interval block in the x-axis direction is determined as the diameter of the point cloud interval block.

[0024] Optionally, the determining of the pipe diameter median curve based on the diameter of each point cloud interval block and an improved median filtering algorithm specifically includes:

[0025] Determine the median diameter of the neighboring point cloud interval blocks near each of the point cloud interval blocks;

[0026] Based on the sorting statistics theory, the diameter medians of the neighborhood point cloud interval blocks near the marked point cloud interval block are sorted to obtain the diameter median sorting queue corresponding to each point cloud interval block; the marked point cloud interval block is any point cloud interval block;

[0027] Determine the median diameter value located in the middle of the median diameter sorting queue as the median diameter value of the point cloud interval block;

[0028] According to the median diameter of each point cloud interval block, a pipe diameter median curve is determined.

[0029] In a second aspect, the present invention provides a petroleum drill pipe variable diameter positioning system based on three-dimensional point cloud, comprising:

[0030] A pipe string main body three-dimensional point cloud data determination module is used to determine the pipe string main body three-dimensional point cloud data;

[0031] A denoising and filtering processing module, used for performing denoising and filtering processing on the three-dimensional point cloud data of the pipe string body;

[0032] A point cloud interval block determination module is used to project the denoised and filtered three-dimensional point cloud data of the pipe string body onto a two-dimensional plane to obtain a main view of the pipe string body, and divide the denoised and filtered three-dimensional point cloud data of the pipe string body into a number of point cloud interval blocks at equal distances along the y-axis on the main view of the pipe string body;

[0033] A pipe diameter median curve determination module, used to calculate the diameter of each of the point cloud interval blocks, and determine the pipe diameter median curve based on the diameter of each of the point cloud interval blocks and an improved median filtering algorithm;

[0034] The variable diameter area determination module of the pipe string body is used to determine the variable diameter area of ​​the pipe string body based on the pipe diameter area recognition algorithm and the pipe diameter median curve.

[0035] Optionally, the denoising filter processing module specifically includes:

[0036] A downsampling processing unit, used for processing the three-dimensional point cloud data of the pipe string body by using a voxel downsampling algorithm;

[0037] The denoising and filtering processing unit is used to perform denoising and filtering processing on the down-sampled three-dimensional point cloud data of the pipe string body by using an outlier filtering algorithm.

[0038] In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the oil drill pipe variable diameter positioning method based on three-dimensional point cloud according to the first aspect.

[0039] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0040] In view of the above description, traditional purely manual operations, semi-automatic methods and multi-dimensional combined image recognition methods cannot be well applied in oil drill pipe drilling construction. The present invention provides a method, system and electronic equipment for oil drill pipe variable diameter positioning based on three-dimensional point cloud. The invention first determines the three-dimensional point cloud data of the pipe column body, and performs denoising and filtering on the three-dimensional point cloud data of the pipe column body, and then projects the three-dimensional point cloud data of the pipe column body after denoising and filtering onto a two-dimensional plane to obtain the main view of the pipe column body, and divides it into blocks at equal distances along the y-axis, and then uses an improved median filtering algorithm to smooth the pipe diameter noise and obtain the pipe diameter median curve, and finally uses the pipe diameter area recognition algorithm to detect the variable diameter area and filter out complex noise on the pipe diameter median curve, and finally realizes automated variable diameter area positioning.

[0041] The oil drill pipe variable diameter positioning method and system based on three-dimensional point cloud provided by the present invention avoids the defects brought about by using manual detection methods and a two-stage method of spatial mapping from two-dimensional images to three-dimensional point clouds. The present invention makes fuller use of the three-dimensional point cloud data information by directly measuring the three-dimensional point cloud data of the pipe column body in blocks, thereby improving the detection efficiency and measurement accuracy of the pipe column variable diameter area in actual industrial scenarios.

[0042] The present invention is applied to the positioning of the variable diameter area of ​​the oil drill pipe in the oil drilling construction scene, effectively reducing the labor cost, and has the advantages of greater safety, better real-time performance, and higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 It is a schematic diagram of the upper and lower pipe strings, parting surface and upper and lower diameter-changing areas of the oil drill pipe;

[0045] Figure 2 A schematic diagram of a flow chart of a petroleum drill pipe variable diameter positioning method based on three-dimensional point cloud according to the present invention;

[0046] Figure 3 A schematic diagram of the relative positions of the three-dimensional matrix camera and the column body of the present invention;

[0047] Figure 4 This is a schematic diagram of the pipe column main body section being divided into blocks with equal distances according to the present invention;

[0048] Figure 5 Schematic diagram of missing point cloud and noise points on the outer side of the pipe string of the present invention;

[0049] Figure 6 A schematic diagram of the noise peak of the diameter sampling curve caused by missing point clouds and noise points on the outer side of the pipe string of the present invention;

[0050] Figure 7 It is a schematic diagram of the median curve of the pipe diameter of the present invention;

[0051] Figure 8 This is a schematic diagram of the pipe diameter area positioning algorithm result of the present invention;

[0052] Fig. 9 This is a schematic diagram of the result of dividing the pipe string point cloud into the variable diameter area and the noise area according to the present invention;

[0053] Fig.10 A schematic diagram of a process of a petroleum drill pipe variable diameter positioning method based on three-dimensional point cloud according to the present invention;

[0054] Fig.11 The present invention is a schematic structural diagram of a petroleum drill pipe variable diameter positioning system based on three-dimensional point cloud. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0057] Embodiment 1:

[0058] like Figure 2 As shown, an embodiment of the present invention provides a petroleum drill pipe variable diameter positioning method based on three-dimensional point cloud, comprising:

[0059] Step 100: Determine the three-dimensional point cloud data of the pipe string body.

[0060] Step 200: performing denoising and filtering processing on the three-dimensional point cloud data of the pipe string body.

[0061] Step 300: Project the denoised and filtered three-dimensional point cloud data of the pipe column body onto a two-dimensional plane to obtain a main view of the pipe column body, and divide the denoised and filtered three-dimensional point cloud data of the pipe column body into a number of point cloud interval blocks at equal distances along the y-axis on the main view of the pipe column body.

[0062] Step 400: Calculate the diameter of each of the point cloud interval blocks, and determine the pipe diameter median curve based on the diameter of each of the point cloud interval blocks and an improved median filtering algorithm.

[0063] Step 500: Determine the variable diameter region of the pipe string body based on the pipe diameter region identification algorithm and the pipe diameter median curve.

[0064] As a preferred implementation of step 100, it specifically includes:

[0065] Step 1001: Acquire a three-dimensional point cloud original image of an oil drill pipe; the oil drill pipe at least includes a pipe string body.

[0066] Step 1002: Segment the original three-dimensional point cloud image according to the relative position relationship between the three-dimensional matrix camera and the main body of the pipe string to obtain the three-dimensional point cloud data of the main body of the oil drill pipe.

[0067] An example is: in an actual industrial scene, the relative position between the 3D matrix camera shooting position and the pipe column body is fixed, as shown in the following example: Figure 3 As shown, the main body of the pipe column is located 25 meters in front of the three-dimensional matrix camera, that is, Figure 3 In a, the center of the pipe column is flush with the shooting center of the three-dimensional matrix camera, and the center of the pipe column is 8 meters higher than the ground, that is, Figure 3 b in the figure, the height of the pipe column is 15 meters, that is, Figure 3 c in.

[0068] According to the position of the 3D matrix camera in the actual industrial scene, the relative area of ​​the pipe column body is obtained from the 3D point cloud original image, and then the 3D point cloud data of the pipe column body is obtained by using the point cloud segmentation technology. That is, according to the relative position relationship between the 3D matrix camera and the pipe column body in the actual industrial scene, the point cloud data coordinates of the left and right and front and back of the pipe column can be located on the x-axis, y-axis, and z-axis of the 3D point cloud original image respectively, and the region of interest (RoI, Region of Interest) can be segmented to obtain the 3D point cloud data of the pipe column body.

[0069] As a preferred implementation of step 200, it specifically includes:

[0070] Step 2001: Process the three-dimensional point cloud data of the pipe string body using a voxel downsampling algorithm. Specifically:

[0071] Based on the three-dimensional point cloud data of the pipe string body, a three-dimensional voxel grid is constructed; the three-dimensional voxel grid includes multiple voxels; the center of mass of each voxel is calculated, and the center of mass of the marked voxel replaces the point cloud data in the marked voxel, thereby obtaining the downsampled three-dimensional point cloud data of the pipe string body; the marked voxel is any voxel.

[0072] Step 2002: using an outlier filtering algorithm to perform denoising filtering on the downsampled three-dimensional point cloud data of the pipe string body.

[0073] One example is that due to the disorder of the point cloud, the amount of calculation required to search the three-dimensional point cloud data of the pipe string body is large. In view of this situation, the embodiment of the present invention adopts a voxel downsampling algorithm for processing.

[0074] Voxel downsampling algorithm: downsample the 3D point cloud data of the pipe string to reduce the amount of subsequent calculations. The specific implementation method is: voxelize the 3D point cloud data of the pipe string in 3D space, and use the centroid of each voxel as the sampling point for downsampling.

[0075] First, use the segmented 3D point cloud data of the pipe column to create a 3D voxel grid. Assume that the voxel size is V, segment the 3D point cloud data of the pipe column into a V*V*V voxel grid, and take the centroid of each voxel point cloud data to replace all the point cloud data in the voxel. The formula is as follows:

[0076] Assume that the voxel size is V, each voxel contains n points, and the centroid of the voxel is P c It is expressed as:

[0077]

[0078] Where (x c ,y c ,z c ) is the center of mass P c The three-dimensional coordinates (x i ,y i ,z i ) is the three-dimensional coordinate of the i-th point cloud data in the divided voxel, and n represents the number of point cloud data in a voxel.

[0079] Since there are discrete or clustered outliers in the point cloud data, this will complicate the characteristics of the local point cloud and interfere with the estimation of the normal or curvature change of the point cloud surface. The use of a statistical outlier filtering algorithm can effectively remove outlier noise point cloud data and retain the three-dimensional point cloud data of the pipe body that obeys the Gaussian distribution.

[0080] Outlier filtering algorithm: Filter out the noise points of the downsampled 3D point cloud data of the pipe body, so as to obtain a smoother curve in subsequent experiments. The specific implementation method is: use the outlier filtering algorithm to remove the downsampled 3D point cloud data of the pipe body, and filter out the points far from the average distance in the nearby area points of the downsampled 3D point cloud data of the pipe body, so as to remove the noise points far away from the pipe body point cloud.

[0081] First, statistical analysis is performed on the neighborhood of each point in the downsampled 3D point cloud data of the pipe string body, and the average distance of the K nearest neighbors of each point is calculated. Assume that there are m points in the 3D point cloud data of the pipe string body, where each point P i There are K nearest neighbors, so their average distance D i for:

[0082]

[0083] (x j ,y j ,z j ) represents the three-dimensional coordinates of the jth neighbor point.

[0084] For each point P i Calculate a D that follows a Gaussian distribution i , then calculate the average distance D i The mean μ and standard deviation σ of .

[0085]

[0086]

[0087] Therefore, the target threshold τ can be determined:

[0088] τ=μ+kσ (5);

[0089] Where k is the standard deviation multiplier. If the average distance D of the K nearest neighbors of a point is i If it is greater than the target threshold τ, the point is retained, otherwise it is removed.

[0090] As a preferred implementation of step 300, it specifically includes:

[0091] Step 3001: Project the denoised and filtered three-dimensional point cloud data of the pipe string body onto a two-dimensional plane to obtain a main view of the pipe string body.

[0092] Step 3002: Determine the maximum and minimum values ​​of the y-axis on the main view of the pipe column body.

[0093] Step 3003: Based on the maximum and minimum values ​​of the y-axis, the 3D point cloud data of the pipe string body after denoising and filtering is divided into a number of point cloud interval blocks with equal distances along the y-axis on the main view of the pipe string body.

[0094] Based on the above operation, the 3D point cloud data of the pipe string after denoising and filtering is equally divided into a point cloud interval block set B with a spacing of s and a number of blocks b. Figure 4 shown.

[0095]

[0096] Among them, y max Indicates the maximum value of the y-axis, y min Indicates the minimum value of the y-axis.

[0097] As a preferred implementation of step 400, it specifically includes:

[0098] Step 4001: Determine the median diameter of the neighborhood point cloud interval blocks near each of the point cloud interval blocks.

[0099] Step 4002: Based on the sorting statistics theory, sort the median diameters of the neighborhood point cloud interval blocks near the marked point cloud interval block 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.

[0100] Step 4003: Determine the median diameter value located in the middle position of the median diameter sorting queue as the median diameter value of the point cloud interval block.

[0101] Step 4004: Determine the pipe diameter median curve according to the diameter median of each point cloud interval block.

[0102] An example: First, traverse the point cloud information in the point cloud interval block set B from bottom to top along the y-axis, count the maximum and minimum values ​​of the point cloud data in the point cloud interval block in the x-axis direction, and use the difference between the maximum and minimum values ​​to calculate the diameter of the point cloud interval block. If the point cloud in the point cloud interval block is empty, the diameter is set to 0, and the y-coordinate value of each point cloud interval block is the average of the y-coordinates of all points in the point cloud interval block.

[0103] Secondly, when generating the original 3D point cloud image, due to interference from factors such as the scene, discrete noise points or missing point clouds will appear on the outside of the pipe string. Figure 5 For example, when generating the diameter curve image of the pipe string point cloud interval block, the missing point cloud will cause the corresponding point cloud interval block diameter data to be null, and the diameter data calculated for the point cloud interval block with noise point cloud will be much larger than the diameter data of the other point cloud interval blocks. The above two situations will cause the diameter characteristic curve to show a peak state, as shown in the following figure. Figure 6As shown. The appearance of such peaks will directly affect the result of diameter measurement, thereby reducing the accuracy of the automatic variable-diameter positioning algorithm. Therefore, an improved median filtering algorithm is needed to filter the abnormal point cloud data in the pipe string, so as to improve the representativeness of the point cloud data and make the median curve of the pipe diameter closer to the numerical change of the actual diameter.

[0104] Determine the median diameter of the neighborhood point cloud interval blocks near each of the point cloud interval blocks; based on the sorting statistics theory, sort the median diameters of the neighborhood point cloud interval blocks near the marked point cloud interval block to obtain a median diameter sorting queue corresponding to each point cloud interval block; the marked point cloud interval block is any point cloud interval block; determine the median diameter located in the middle position of the median diameter sorting queue as the median diameter of the point cloud interval block; according to the median diameter of each of the point cloud interval blocks, determine the median curve of the pipe diameter.

[0105] An example is: based on the sorting statistics theory, replace the median diameter of each point cloud interval block with the median diameter of the neighborhood point cloud interval blocks near it, and set the value of the neighborhood to 3. The formula is as follows:

[0106] For the median diameter d of the point cloud interval block i (0 < i < b), first define a neighborhood with a length of S, where N is a positive integer:

[0107]

[0108] Then the point cloud data samples of the point cloud interval blocks within the neighborhood are sorted by value as:

[0109]

[0110] Among them, d m (or (d m + d m+1 ) / 2) are the median diameters when the neighborhood length is odd (or even), respectively.

[0111] Traverse all the pipe string point cloud interval blocks, and update the set L of the median diameters of the pipe string point cloud interval blocks with the median diameters obtained in the above steps:

[0112] L = {d1, d2, …, d b};

[0113] Among them, b is the number of blocks of the three-dimensional point cloud data of the pipe string main body along the y-axis, and obtain the median curve of the pipe diameter with the y-coordinate value of the point cloud interval block as the x-axis and the set L as the y-axis, as specifically shown in Figure 7 As shown.

[0114] As a preferred implementation manner of step 500, it specifically includes:

[0115] The lower reduced diameter of the pipe string body gradually increases from bottom to top along the y-axis. Multiple increasing or decreasing intervals that appear after median filtering of the pipe diameter median curve obtained in step 400 will interfere with the automatic reduced diameter positioning. In the actual scenario, the lower reduced diameter of the pipe string is the part with the largest deformation in the entire pipe string. Based on this prior information, the derivative of the pipe diameter median curve can be detected. When the derivative value of the diameter median in the point cloud interval block continuously exceeds the set threshold, its status value is marked as 1, otherwise it is 0 (1 indicates the position to be detected, 0 indicates empty).

[0116] Traverse the point cloud data in the point cloud interval block from bottom to top along the y-axis. Since the spacing of the point cloud interval block division is the same, the calculation of the derivative of the diameter median can be simplified to directly calculate the difference between the diameter medians of two adjacent point cloud interval blocks.

[0117] Let the diameter median of the point cloud interval block be d i (0 < i < b - 1), θ2 is the set derivative threshold, then the status value state in the point cloud interval block is expressed as:

[0118]

[0119] Among them, analyzing and comparing the experimental results, take θ1 as 1 and θ2 as 8.

[0120] From the above method, the detection result of the change in the pipe diameter median with the y-coordinate value of the point cloud interval block as the x-axis and the status value as the y-axis can be obtained, specifically as Figure 8 shown.

[0121] The lower reduced diameter of the pipe string body is the area where the pipe diameter changes continuously. Therefore, according to the result of the derivative detection, the areas with a status value of 1 are grouped according to the density of the points on the y-axis, and the three-dimensional point cloud data of the pipe string body after denoising and filtering is further divided into reduced diameter areas and noise areas, specifically as Fig. 9 shown.

[0122] Obtain the y-axis coordinates of the reduced diameter area and map them back to the coordinates of the three-dimensional point cloud data of the pipe string body, then the three-dimensional coordinates of the lower reduced diameter of the pipe string can be calculated, and the position of the lower reduced diameter of the pipe string can be accurately located.

[0123] The pipe strings in industrial applications are divided into five models: 2-7 / 8 inches, 3-1 / 2 inches, 4 inches, 5 inches, and 5-1 / 2 inches, mainly the 4-inch and 5-inch models. Each model of pipe string has specific detailed data such as the pipe body diameter, coupling diameter, external thread coupling length, and internal thread coupling length. According to the model of the pipe string, obtain the distance parameters from the lower reduced diameter to the parting surface and the upper reduced diameter, and locate the positions of the upper reduced diameter and the parting surface of the pipe string.

[0124] Through the method of the present invention, the diameter change detection of the oil pipe string no longer uses the mapping positioning from the two-dimensional image to the three-dimensional point cloud space, but directly measures the three-dimensional point cloud diameter change area data of the pipe string in blocks, which can make fuller use of the three-dimensional point cloud data information, improve the accuracy of measuring the pipe string diameter in actual industrial scenes, and reduce the labor cost compared with the original manual measurement. The oil drill pipe diameter change positioning method based on the three-dimensional point cloud has the advantages of greater safety, greater real-time performance, and higher measurement accuracy.

[0125] Embodiment 2

[0126] This embodiment provides a method for positioning a petroleum drill pipe based on a three-dimensional point cloud. Fig.10 As shown, the specific implementation steps are as follows:

[0127] Step 1: split the main body of the oil drill pipe string.

[0128] According to the relative position of the pipe column body and the matrix camera in the actual scene, the 3D point cloud data of the pipe column body is segmented from the original 3D point cloud image generated by the matrix camera.

[0129] Step 2: Voxel downsampling.

[0130] The segmented 3D point cloud data of the pipe body is voxelized in 3D space, and each voxel is downsampled using its centroid as the sampling point.

[0131] Step 3: Filter outliers.

[0132] The statistical outlier removal method is used to filter out the internal point cloud noise of the sampled three-dimensional point cloud data of the pipe body, remove the sparse outliers far away from the pipe body, and retain the point cloud of the pipe body that obeys the Gaussian distribution.

[0133] Step 4: Calculate the diameter of the pipe string.

[0134] The median diameter of the pipe string point cloud interval block is extracted, and the median filter algorithm is used to smooth the noise to improve the representativeness of the diameter point cloud data of the pipe string point cloud interval block.

[0135] Pipe string interval block: According to the range of the pipe string point cloud data on the y-axis, the pipe string point cloud is divided into equally spaced point cloud interval blocks.

[0136] Block diameter calculation: traverse the point cloud data in the pipe string point cloud interval block, and calculate the distance of the point cloud of the point cloud interval block along the x-axis as the median diameter of each point cloud interval block.

[0137] Median filter algorithm: Based on the theory of sorting statistics, an improved median filter algorithm is used to filter out abnormal data in the median diameter. The median diameter in the point cloud interval block is processed block by block, and the median diameter of the three neighboring areas is obtained, and the median diameter is used to replace the median diameter of the point cloud interval block.

[0138] Step 5: Pipe string diameter reduction and positioning.

[0139] Using the pipe diameter area positioning, the derivative of the median diameter of the pipe string is detected, and the difference between the median diameters of adjacent pipe string point cloud interval blocks is calculated. If the difference is within the set threshold range, the state value of the point cloud interval block is marked as 1. The state value information of all point cloud interval blocks is counted, and the area with a state value of 1 is divided into a variable diameter area and a noise area according to the density of the y-axis point cloud. The point cloud interval threshold where the variable diameter area is located is mapped to the three-dimensional point cloud coordinates of the pipe string, and the three-dimensional coordinates of the lower diameter change of the pipe string are obtained, and the lower diameter change position of the pipe string is located. Further, according to the model of the pipe string, the distance parameters from the lower diameter change to the parting surface and the upper diameter change are obtained, and the position of the upper diameter change and the parting surface of the pipe string is located.

[0140] Embodiment 2

[0141] In order to execute the method corresponding to the above-mentioned embodiment 1 and realize the corresponding functions and technical effects, a petroleum drill pipe variable diameter positioning system based on three-dimensional point cloud is provided below.

[0142] like Fig.11 As shown, an embodiment of the present invention provides a petroleum drill pipe variable diameter positioning system based on three-dimensional point cloud, comprising:

[0143] The pipe string main body three-dimensional point cloud data determination module 1 is used to determine the pipe string main body three-dimensional point cloud data.

[0144] The denoising and filtering processing module 2 is used to perform denoising and filtering processing on the three-dimensional point cloud data of the pipe string body.

[0145] The point cloud interval block determination module 3 is used to project the denoised and filtered three-dimensional point cloud data of the pipe string body onto a two-dimensional plane to obtain a main view of the pipe string body, and divide the denoised and filtered three-dimensional point cloud data of the pipe string body into a number of point cloud interval blocks at equal distances along the y-axis on the main view of the pipe string body.

[0146] The pipe diameter median curve determination module 4 is used to calculate the diameter of each of the point cloud interval blocks, and determine the pipe diameter median curve based on the diameter of each of the point cloud interval blocks and the improved median filtering algorithm.

[0147] The pipe string main body variable diameter region determination module 5 is used to determine the pipe string main body variable diameter region based on the pipe diameter region identification algorithm and the pipe diameter median curve.

[0148] Furthermore, the denoising filter processing module 2 specifically includes:

[0149] The downsampling processing unit is used to process the three-dimensional point cloud data of the pipe string body by using a voxel downsampling algorithm.

[0150] The denoising and filtering processing unit is used to perform denoising and filtering processing on the down-sampled three-dimensional point cloud data of the pipe string body by using an outlier filtering algorithm.

[0151] Embodiment 4

[0152] An embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the oil drill pipe variable diameter positioning method based on three-dimensional point cloud of embodiment 1.

[0153] Optionally, the above-mentioned electronic device may be a server.

[0154] In addition, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the oil drill pipe variable diameter positioning method based on three-dimensional point cloud of embodiment 1.

[0155] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0156] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for oil drill pipe variable diameter positioning based on three-dimensional point cloud, characterized in that: include: Determine the three-dimensional point cloud data of the pipe string body; Performing denoising and filtering processing on the three-dimensional point cloud data of the pipe string body; Projecting the denoised filtered three-dimensional point cloud data of the pipe string body onto a two-dimensional plane to obtain a main view of the pipe string body, and dividing the denoised filtered three-dimensional point cloud data of the pipe string body into a number of point cloud interval blocks at equal distances along the y-axis on the main view of the pipe string body; Calculate the diameter of each of the point cloud interval blocks, and determine the pipe diameter median curve based on the diameter of each of the point cloud interval blocks and the improved median filtering algorithm, specifically including: determine the median diameter of the neighborhood point cloud interval blocks near each of the point cloud interval blocks; based on the sorting statistics theory, sort the median diameters of the neighborhood point cloud interval blocks near the marked point cloud interval block 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; determine the diameter median at the middle position of the diameter median sorting queue as the diameter median of the point cloud interval block; determine the pipe diameter median curve according to the diameter median of each of the point cloud interval blocks; Based on the pipe diameter area recognition algorithm and the pipe diameter median curve, the variable diameter area of ​​the pipe string body is determined.

2. The oil drill pipe variable diameter positioning method based on three-dimensional point cloud according to claim 1 is characterized in that: The determining of the three-dimensional point cloud data of the pipe string body specifically includes: Acquire a three-dimensional point cloud original image of an oil drill pipe; the oil drill pipe at least includes a pipe string body; According to the relative position relationship between the three-dimensional matrix camera and the pipe column body, the three-dimensional point cloud original image is segmented to obtain the three-dimensional point cloud data of the pipe column body.

3. The oil drill pipe variable diameter positioning method based on three-dimensional point cloud according to claim 1 is characterized in that: The denoising and filtering processing of the three-dimensional point cloud data of the pipe string body specifically includes: Processing the three-dimensional point cloud data of the pipe string body by using a voxel downsampling algorithm; The outlier filtering algorithm is used to perform denoising and filtering on the downsampled 3D point cloud data of the pipe string body.

4. The oil drill pipe variable diameter positioning method based on three-dimensional point cloud according to claim 3 is characterized in that: The processing of the three-dimensional point cloud data of the pipe string body by using a voxel downsampling algorithm specifically includes: Based on the three-dimensional point cloud data of the pipe string body, construct a three-dimensional voxel grid; the three-dimensional voxel grid includes a plurality of voxels; The centroid of each voxel is calculated, and the centroid of the marked voxel is used to replace the point cloud data in the marked voxel, thereby obtaining the downsampled three-dimensional point cloud data of the pipe string body; the marked voxel is any voxel.

5. The oil drill pipe variable diameter positioning method based on three-dimensional point cloud according to claim 1 is characterized in that: The calculating the diameter of each point cloud interval block specifically includes: Traversing the point cloud interval blocks in sequence 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; The difference between the maximum value and the minimum value of the point cloud interval block in the x-axis direction is determined as the diameter of the point cloud interval block.

6. A petroleum drill pipe variable diameter positioning system based on three-dimensional point cloud, characterized in that: include: A pipe string main body three-dimensional point cloud data determination module is used to determine the pipe string main body three-dimensional point cloud data; A denoising and filtering processing module, used for performing denoising and filtering processing on the three-dimensional point cloud data of the pipe string body; A point cloud interval block determination module is used to project the denoised and filtered three-dimensional point cloud data of the pipe string body onto a two-dimensional plane to obtain a main view of the pipe string body, and divide the denoised and filtered three-dimensional point cloud data of the pipe string body into a number of point cloud interval blocks at equal distances along the y-axis on the main view of the pipe string body; The pipe diameter median curve determination module is used to calculate the diameter of each of the point cloud interval blocks, and determine the pipe diameter median curve based on the diameter of each of the point cloud interval blocks and the improved median filtering algorithm, specifically including: determining the median diameter of the neighborhood point cloud interval blocks near each of the point cloud interval blocks; based on the sorting statistics theory, sorting the median diameters of the neighborhood point cloud interval blocks near the marked point cloud interval block 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 the diameter median at the middle position of the diameter median sorting queue as the diameter median of the point cloud interval block; determining the pipe diameter median curve according to the diameter median of each of the point cloud interval blocks; The variable diameter area determination module of the pipe string body is used to determine the variable diameter area of ​​the pipe string body based on the pipe diameter area recognition algorithm and the pipe diameter median curve.

7. The oil drill pipe variable diameter positioning system based on three-dimensional point cloud according to claim 6 is characterized in that: The denoising filter processing module specifically includes: A downsampling processing unit, used for processing the three-dimensional point cloud data of the pipe string body by using a voxel downsampling algorithm; The denoising and filtering processing unit is used to perform denoising and filtering processing on the down-sampled three-dimensional point cloud data of the pipe string body by using an outlier filtering algorithm.

8. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the oil drill pipe variable diameter positioning method based on three-dimensional point cloud according to any one of claims 1 to 5.