Pipeline welding seam identification method, medium and equipment
By acquiring the point cloud of pipeline workpieces and determining the weld location, the problems of low welding efficiency and poor accuracy in the prior art are solved, and efficient and accurate automated welding is achieved.
Patent Information
- Application Number
- CN202411617773.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the welding efficiency of compressor pipelines is low, consumes a long time, and has low consistency and accuracy, resulting in the impact of welding quality and product performance.
By obtaining the point cloud of pipeline workpieces, determining the cylindrical equation and weld plane equation, accurately positioning the weld position, improving welding accuracy, and finally obtaining the weld trajectory points to achieve automated welding.
Improves the consistency and accuracy of welding, reduces the time consumed for positioning before welding, and improves welding efficiency.
Smart Images

Figure CN119426836A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automated welding, and in particular to a pipeline weld identification method, medium and equipment. Background Art
[0002] The air conditioning compressor is the core of the refrigeration system. Whether it is air conditioning, cold storage, or chemical refrigeration process, the compressor is a key component. The copper pipes, connectors and shells of the compressor need to be welded to ensure the sealing and structural strength of the system. Therefore, high-quality welding can not only effectively prevent refrigerant leakage, but also ensure the stable operation of the system.
[0003] At present, the welding of compressor pipelines mostly relies on manual operation, and the welding process usually adopts traditional methods such as gas welding and brazing. However, the manual operation-based welding method requires a high level of technical skills of the operator, and the welding process is relatively time-consuming and has low production efficiency. In addition, manual welding has certain limitations in consistency and accuracy, which may affect the final welding quality and product performance.
[0004] Therefore, how to improve the existing welding technology, such as low efficiency, long time consumption, low consistency and accuracy, is a technical problem to be solved urgently in this field. Summary of the invention
[0005] Based on this, the purpose of this application is to provide a pipeline weld identification method, medium and equipment to solve at least one technical problem mentioned in the above background technology.
[0006] In a first aspect, the present application provides a pipeline weld identification method, comprising:
[0007] Obtain the pipeline workpiece point cloud;
[0008] According to the point cloud of the pipeline workpiece, the cylinder equation is determined, and the axis line equation and the direction vector of the cylinder equation are obtained;
[0009] According to the direction vector of the cylinder equation, the pipe workpiece point cloud is divided to obtain the weld plane point cloud to determine the weld plane equation;
[0010] The intersection of the axis line equation and the weld plane equation is obtained as the weld center point, and the weld circle equation is determined according to the weld center point and the weld plane point cloud, and downsampled to obtain the final weld trajectory point.
[0011] Furthermore, the step of obtaining the pipeline workpiece point cloud includes:
[0012] Obtaining the initial workpiece point cloud;
[0013] Perform straight-through filtering to obtain the optimized workpiece point cloud;
[0014] The optimized workpiece point cloud is clustered, and the largest point cloud cluster is the pipeline workpiece point cloud.
[0015] Further, the steps of determining the weld plane equation include:
[0016] Get the normal vector of each point in the pipe workpiece point cloud, and get the cosine value of the angle between the normal vector of each point and the direction vector of the cylinder equation;
[0017] Determine whether the cosine value of each angle is greater than the cosine threshold. If so, keep the point corresponding to the angle. If not, remove the point corresponding to the angle to obtain the weld plane point cloud.
[0018] Perform plane fitting on the weld plane point cloud to determine the weld plane equation.
[0019] Furthermore, the step of determining the weld plane equation also includes:
[0020] S331: setting a plane model, randomly selecting a number of points from the weld plane point cloud, fitting and determining the parameters of the plane model, and obtaining the current plane equation;
[0021] S332: determining the optimized inner points according to the distance between each point in the weld plane point cloud and the current plane equation, and counting the number of optimized inner points;
[0022] S333: Determine whether the number of optimized internal points is greater than the quantity threshold. If so, return to step S331; if not, obtain the final plane equation.
[0023] Further, the step of obtaining the final weld trajectory point includes:
[0024] Get the intersection of the axis line equation and the weld plane equation as the weld center point;
[0025] The radius threshold is set and traversed to construct a circle equation according to the center point of the weld circle and the currently traversed radius, and a plurality of circle equations are obtained;
[0026] Obtain the number of inner points of each circular equation, and take the circular equation corresponding to the maximum number of inner points as the circular equation of the weld;
[0027] The weld circle equation is downsampled to obtain several sampling points, which are the final weld trajectory points.
[0028] Further, the step of obtaining the center point of the weld includes:
[0029] t=-(A·x+B·y+C·z+D) / (A·dx+B·dy+C·dz)
[0030] cx=x+dx*t
[0031] cy=y+dy*t
[0032] cz=x+dx*t
[0033] Among them, t is the intermediate variable, (x, y, z, dx, dy, dz) is the axis line equation, (A, B, C, D) is the weld plane parameters, and C (cx, cy, cz) is the center point of the weld.
[0034] Furthermore, it also includes:
[0035] Obtain the centroid point of the pipe workpiece point cloud to determine the weld tangent vector according to the projection point of the centroid point on the cylinder axis;
[0036] Perform a cross product operation on the weld tangent vector and the cylinder equation direction vector to determine the weld pipe posture.
[0037] Further, the step of determining the weld tangent vector includes:
[0038] Obtain the centroid point of the pipeline workpiece point cloud and project it to the cylinder axis to obtain the centroid projection point;
[0039] The direction from the centroid projection point to the weld center point is taken as the weld normal, and it is normalized to obtain the weld tangent vector.
[0040] In a second aspect, the present application further provides a computer storage medium storing an executable program code; the executable program code is used to execute the pipeline weld identification method described in any one of the first aspects.
[0041] In a third aspect, the present application further provides a terminal device, comprising a memory and a processor; the memory stores a program code executable by the processor; the program code is used to execute the pipeline weld identification method described in any one of the first aspects.
[0042] The present invention provides a pipeline weld identification method, medium and device, which obtains a pipeline workpiece point cloud, determines a cylinder equation according to the pipeline workpiece point cloud, obtains the axis line equation of the cylinder equation and the cylinder equation direction vector, and divides the pipeline workpiece point cloud according to the cylinder equation direction vector to obtain a weld plane point cloud, so as to determine the weld plane equation, and accurately locate the weld position by using the geometric relationship between the weld plane point normal vector and the axis normal vector with a small angle, improve the welding accuracy, and finally obtain the intersection of the axis line equation and the weld plane equation as the weld circle center point, so as to determine the weld circle equation according to the weld circle center point and the weld plane point cloud, and downsample it to obtain the final weld trajectory point, obtain the final weld trajectory point based on the geometric relationship, and at the same time, the parameter selection requirements are not high, and it has strong robustness to noise, which reduces the time consumed by locating the weld before welding, and at the same time improves the consistency and accuracy of the weld when welding. The prior art solves the problems of low welding efficiency, long consumption time, low consistency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flow chart of a pipeline weld identification method according to an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of segmenting a pipeline workpiece point cloud to obtain a weld plane point cloud according to an embodiment of the present invention;
[0045] Figure 3 Schematic diagram of the final weld trajectory points of an embodiment of the present invention. DETAILED DESCRIPTION
[0046] 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.
[0047] It should be noted that if the embodiments of the present invention involve directional indications, such as up, down, left, right, front, back, etc., then the directional indication is only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly. In addition, if the embodiments of the present invention involve descriptions of "first, second", "S1, S2", "step one, step two", etc., then such descriptions are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features or indicating the execution order of the method, etc. Those skilled in the art can understand that anything that does not violate the gist of the invention under the technical concept of the invention should be included in the protection scope of the present invention.
[0048] like Figure 1 As shown, the present invention provides a pipeline weld identification method:
[0049] S1: Obtain the pipeline workpiece point cloud;
[0050] Specifically, it is optional but not limited to obtaining an image of the pipeline workpiece by photographing with a collection device to obtain point cloud data of the pipeline workpiece and obtain a point cloud of the pipeline workpiece.
[0051] More specifically, the acquisition equipment may be, but is not limited to, 3D line scan cameras, 3D structured light cameras, TOF cameras, laser scanners, multi-view stereo vision systems, grating projection measuring instruments, and other commonly used scanning devices that can be used to acquire three-dimensional data of the surface of an object.
[0052] Taking the acquisition of the workpiece point cloud of the compressor pipeline as an example, the compressor is first transported to the predetermined position by the conveyor belt. Assuming that the compressor is in the preset most ideal position at this time, it can be fixed with a fixture to ensure that the compressor will not be displaced during the shooting process. The compressor surface can be scanned to collect the point cloud of the compressor at this time to ensure that the accurate workpiece point cloud of the compressor pipeline part is obtained.
[0053] S11: Obtaining the initial workpiece point cloud;
[0054] S12: performing straight-through filtering to obtain an optimized workpiece point cloud;
[0055] Specifically, after the initial workpiece point cloud is obtained by the acquisition device, since the installation position of the acquisition device and the height of the placement position of the pipeline workpiece are fixed, the initial workpiece point cloud can be filtered according to the straight-through filtering method to remove outliers and noise points in the point cloud, and then the point cloud is uniformly down-sampled to simplify the point cloud data structure to obtain the processed workpiece point cloud, so as to optimize the workpiece point cloud.
[0056] It is worth noting that parameters such as the filtering range in the straight-through filtering method and the downsampling rate in the uniform downsampling method are arbitrarily set by those skilled in the art.
[0057] Preferably, since the straight-through filtering cannot remove all noise points in the workpiece point cloud, it is optional but not limited to adopting common clustering methods such as region growing clustering algorithm or Euclidean clustering method to remove the residual noise points in the point cloud.
[0058] S13: Clustering the optimized workpiece point cloud, and taking the largest point cloud cluster as the pipeline workpiece point cloud.
[0059] Specifically, it is optional but not limited to clustering the optimized workpiece point cloud based on region growing clustering algorithm, and the technicians in this field can arbitrarily set the normal vector angle threshold and the curvature threshold, and then preferably use the principal component analysis (PCA) method to estimate the normal vector of each point in the optimized workpiece point cloud, so as to divide the optimized workpiece point cloud into several clusters according to the set normal vector angle threshold and the curvature threshold. Since the pipeline part occupies the largest position in the entire collected workpiece point cloud, the maximum cluster center is retained and other clusters are removed to obtain the final pipeline workpiece point cloud.
[0060] S2: According to the point cloud of the pipeline workpiece, determine the cylinder equation, and obtain the axis line equation and the direction vector of the cylinder equation;
[0061] Specifically, it is optional but not limited to setting the pipeline workpiece model according to the equations that the pipeline workpiece needs to satisfy based on its features. For example, the cylindrical model is set with the three-dimensional coordinates of the central axis of the cylinder, the axis direction vector and the cylinder radius as parameters; more specifically, the cylindrical model parameters are optional but not limited to being defined as: (x, y, z, d x ,d y ,d z ,r), where c(x,y,z) is a three-dimensional coordinate on the central axis of the cylinder, and u(d x ,d y ,d z ) represents the direction vector of the axis, r is the radius of the cylinder. It is worth noting that the equations that the cylindrical model needs to satisfy and the parameters used are for illustration only and are not limited to this.
[0062] Specifically, it is optional but not limited to randomly selecting 8 points p in the pipeline workpiece point cloud i ,i=1,2,...,8, is the current internal point, which is the initial sample set P∈{p1,p2,...,p m}, m = 8, substituted into the cylinder equation, and the parameters of the cylinder model are fitted by randomly selecting 8 points. The calculation formula of a three-dimensional coordinate on the central axis of the cylinder is: The calculation formula of the axis direction vector is: | | operation represents vector modulus, p i The distance from the cylinder axis is |p i -c-ru|, by the least squares method according to the formula Get the radius r and the equation coefficient of the current cylinder equation.
[0063] S3: Segment the pipe workpiece point cloud according to the direction vector of the cylinder equation to obtain the weld plane point cloud to determine the weld plane equation;
[0064] Specifically, Figure 2As shown, it is optional but not limited to setting the cosine threshold, and it is optional to obtain the normal vector of each point in the pipeline workpiece point cloud according to the principal component analysis (PCA) method, and then calculate the normal vector of each point and the direction vector V of the cylinder equation x The cosine value of the angle between them is used to segment the pipeline workpiece point cloud according to the cosine threshold to obtain the weld plane point cloud, and a plane fitting is performed on it to obtain the weld plane equation.
[0065] Preferably, the step of segmenting the pipe workpiece point cloud according to the direction vector of the cylinder equation to obtain the weld plane point cloud to determine the weld plane equation may include but is not limited to:
[0066] S31: Obtain the normal vector of each point in the pipeline workpiece point cloud, and obtain the cosine value corresponding to the angle between the normal vector of each point and the direction vector of the cylinder equation;
[0067] Specifically, it is optional but not limited to obtaining the normal vector V of each point in the pipeline workpiece point cloud according to the principal component analysis (PCA) method i (i=1,2,...,n), where n is the number of pipe workpiece point clouds, and then substitute the normal vector corresponding to each point and the value of the direction vector of the cylinder equation into the angle cosine value calculation formula to obtain the cosine value cosθ corresponding to the angle between the normal vector of each point and the direction vector of the cylinder equation i .
[0068] Preferably, the angle cosine value calculation formula can be optionally expressed as formula 3-1:
[0069]
[0070] Among them, cosθ i is the cosine value of the angle corresponding to the i-th point, (i=1,2,...,n, n is the number of pipeline workpiece point clouds), V x is the direction vector of the cylinder equation, V i is the direction vector corresponding to the i-th point.
[0071] S32: Determine whether the cosine value of each angle is greater than the cosine threshold. If so, retain the point corresponding to the angle. If not, remove the point corresponding to the angle to obtain a weld plane point cloud.
[0072] Specifically, it is optional but not limited to setting a cosine threshold angleThreshold, and judging whether the cosine value of the angle corresponding to each point obtained in step S31 is greater than the threshold according to the judgment formula, and retaining all points whose corresponding cosine values are greater than the threshold, and removing points whose corresponding cosine values are not greater than the threshold. After all point clouds are judged, all remaining point clouds are the weld plane point clouds P i .
[0073] Preferably, the judgment formula can be optionally expressed as Formula 3-2:
[0074]
[0075] Among them, cosθ i is the cosine value of the angle corresponding to the i-th point, (i=1,2,...,n, n is the number of pipeline workpiece point clouds), angleThreshold is the set cosine threshold, P i It is the weld plane point cloud.
[0076] S33: Perform plane fitting on the weld plane point cloud to determine the weld plane equation.
[0077] Specifically, it is optional but not limited to determining the equation that needs to be satisfied based on the plane features, substituting the weld plane point cloud into the equation to screen out the points that satisfy the equation, calculating the equation coefficients based on the points that satisfy the equation, and obtaining the final weld plane equation:
[0078] Preferably, the step of determining the weld plane equation according to the weld plane point cloud may optionally include:
[0079] S331: setting a plane model, randomly selecting a number of points from the weld plane point cloud, fitting and determining the parameters of the plane model, and obtaining the current plane equation;
[0080] Specifically, it is optional but not limited to setting the plane model according to the plane features and the equations that need to be satisfied. For example, the plane model is set with the plane normal vector and the constant term as parameters; more specifically, the plane model parameters can be optionally but not limited to be defined as: (A, B, C, D), where A, B, C are the components of the plane normal vector, and D is the constant term of the plane equation. The plane equation can be expressed as formula 3-3:
[0081] D=-(A·x+B·y+C·z) 3-3
[0082] It is worth noting that the equations that the plane model needs to satisfy and the parameters used are for illustration only and are not intended to be limiting.
[0083] More specifically, it is optional but not limited to randomly selecting three points P1, P2, and P3 in the weld plane point cloud.
[0084] is the current interior point, which is substituted into the plane equation to fit and calculate the parameters of the plane model. The plane normal vector calculation formula is: × is the cross multiplication operation, which substitutes the normal vector and any point into the plane equation to obtain the equation coefficients of the current plane equation.
[0085] S332: determining the optimized inner points according to the distance between each point in the weld plane point cloud and the current plane equation, and counting the number of optimized inner points;
[0086] Specifically, it is optional but not limited to using the existing distance calculation formula to calculate the distance from each point in the weld plane point cloud to the current plane equation, and determine whether the distance is greater than a preset threshold. If not, the point is counted as an internal point of the plane model, and the number of internal points is optimized.
[0087] For example, assuming that the weld plane point cloud includes 100 points, and the distances from 40 points to the plane equation are calculated to be no greater than a preset threshold, these 40 points are the optimized internal points, and the number of optimized internal points is recorded as 40.
[0088] S333: Determine whether the number of optimized internal points is greater than the quantity threshold. If so, return to step S331; if not, obtain the final plane equation.
[0089] Specifically, if the number of optimized inner points is not less than the number threshold, it means that these inner points are sufficient to calculate the accurate parameters of the plane equation, and the plane equation fitted this time is confirmed as the final accurate plane equation. If it is less than the number threshold, return to step S331.
[0090] For example, assuming that there are 100 points in the weld plane point cloud, the distances from these 100 points to the current plane equation are calculated respectively. There are 30 points in the point cloud whose distances are not greater than the threshold. These 30 points are counted as the optimized number of internal points, and the preset internal point number threshold is 50. If the optimized number of internal points is less than the internal point number threshold, then return to step S331, randomly select 3 points from the weld plane point cloud again, fit and calculate the parameters of the plane model, and then iteratively optimize the number of internal points according to step S332 until the optimized number of internal points is not less than the number threshold.
[0091] More specifically, if it is assumed that after multiple iterations, the number of internal points does not meet the preset threshold, but in order to improve computing efficiency and avoid iterative cycles, it is optional but not limited to pre-setting the iteration end condition, such as reaching the maximum number of iterations, and ending the iteration process early.
[0092] S4: The intersection of the axis line equation and the weld plane equation is obtained as the weld center point, and the weld circle equation is determined according to the weld center point and the weld plane point cloud, and downsampled to obtain the final weld trajectory point.
[0093] Specifically, it is optional but not limited to obtaining the intersection of the axis line equation and the weld plane equation as the weld center point, then setting several preset radii, fitting circular equations with the weld center point and each preset radius respectively, and obtaining the number of inner points of each circular equation from the weld plane point cloud, taking the circular equation corresponding to the maximum number of inner points as the final weld trajectory, and sampling the circular equation at set distances to obtain several sampling points, which are the final weld trajectory points.
[0094] S41: Obtain the intersection of the axis line equation and the weld plane equation as the weld center point;
[0095] Specifically, it is optional but not limited to calculating the coordinates of the center point of the weld according to formula 4-1, 4-2, 4-3, 4-4:
[0096] t=-(A·x+B·y+C·z+D) / (A·dx+B·dy+C·dz) 4-1
[0097] cx=x+dx*t 4-2
[0098] cy=y+dy*t 4-3
[0099] cz=x+dx*t 4-4
[0100] Among them, t is the intermediate variable, (x, y, z, dx, dy, dz) is the axis line equation, (A, B, C, D) is the weld plane parameters, and C (cx, cy, cz) is the weld center point.
[0101] S42: setting and traversing a radius threshold value to construct a circle equation according to the weld center point and the currently traversed radius, and obtaining a plurality of circle equations;
[0102] Specifically, it is optional but not limited to taking the weld center point as the circle center and setting the radius threshold [R1,R n ], including several set radii R1, R2, R3........R n , n is the number of radii, and all radii in the radius threshold are traversed to construct the current circle equation according to the coordinates of the weld center point and the currently traversed radius. After the traversal is completed, several circle equations can be obtained; the number of radii included in the radius threshold and the length of each radius are arbitrarily set by those skilled in the art.
[0103] S43: Obtain the number of inner points of each circular equation, and take the circular equation corresponding to the maximum number of inner points as the circular equation of the weld;
[0104] Specifically, the distance between each point of the boundary point cloud and the current circle equation is calculated, a distance threshold is set, and it is determined whether the distance is less than the distance threshold. If so, the point is counted as an inner point of the circle model, and the number of inner points is optimized.
[0105] For example, assuming that the boundary point cloud includes 50 points, the distances from 30 points to the circular equation are calculated to be no greater than a preset threshold, and the distances from 20 points to the circular equation are greater than the preset threshold. The 30 points whose distances are no greater than the preset threshold are the optimized internal points, and the number of optimized internal points is recorded as 30.
[0106] S44: Down-sampling the weld circle equation to obtain a number of sampling points, which are the final weld trajectory points.
[0107] Specifically, it is optional but not limited to setting a sampling interval, sampling the circumference of the weld circle equation according to the sampling interval, and the following can be obtained: Figure 3 The several sampling points shown are the final weld trajectory points.
[0108] In this embodiment, a pipeline weld identification method of the present invention is provided, by obtaining a pipeline workpiece point cloud, determining a cylinder equation according to the pipeline workpiece point cloud, obtaining an axis line equation of the cylinder equation and a cylinder equation direction vector, and dividing the pipeline workpiece point cloud according to the cylinder equation direction vector to obtain a weld plane point cloud, so as to determine the weld plane equation, and using the geometric relationship of the small angle between the weld plane point normal vector and the axis normal vector, accurately locate the weld position, improve the welding accuracy, and finally obtain the intersection of the axis line equation and the weld plane equation as the weld circle center point, so as to determine the weld circle equation according to the weld circle center point and the weld plane point cloud, and downsample it to obtain the final weld trajectory point, and obtain the final weld trajectory point based on the geometric relationship, and at the same time, the parameter selection requirements are not high, and it has strong robustness to noise, reducing the time consumed by locating the weld before welding, and improving the consistency and accuracy of the weld when welding. The problem of low welding efficiency, long consumption time, low consistency and accuracy in the prior art is solved.
[0109] Preferably, since the pipeline posture will also affect the welding accuracy when the pipeline workpiece is welded according to the final weld trajectory point, and it is convenient for different welding equipment to generate corresponding welding trajectories according to the pipeline posture, it is optional to determine the pipeline posture according to the weld tangent vector and the cylinder equation direction vector to improve the welding accuracy of the pipeline workpiece.
[0110] S5: obtaining the centroid point of the pipe workpiece point cloud, so as to determine the weld tangent vector according to the projection point of the centroid point on the cylinder axis;
[0111] Specifically, it is optional but not limited to obtaining the projection of the centroid point of the pipeline workpiece point cloud on the cylindrical axis to obtain the centroid projection point proj, normalizing the direction of the centroid projection point pointing to the centroid point, and obtaining the weld tangent vector.
[0112] Preferably, the specific steps of determining the weld tangent vector include:
[0113] S51: Obtain the centroid point of the pipeline workpiece point cloud, and project it to the cylinder axis to obtain the centroid projection point;
[0114] Specifically, it is optional but not limited to obtaining the coordinates of all points in the pipeline workpiece point cloud, calculating the average value of all coordinates, which is the centroid point of the pipeline workpiece point cloud, and then projecting the centroid point vertically to the cylinder axis, and the obtained projection point is the centroid projection point.
[0115] S52: The direction from the centroid projection point to the centroid point is taken as the weld tangent direction, and it is normalized to obtain the weld tangent vector.
[0116] For example, assuming that the coordinates of the centroid projection point are (2,3,4) and the coordinates of the centroid point are (5,7,8), the vector V can be calculated according to formula 5-1:
[0117] V=(5-2,7-3,8-4)=(3,4,4) 5-1
[0118] Then calculate the length |V| according to formula 5-2:
[0119]
[0120] Finally, the weld tangent vector N is obtained by normalization according to formula 5-3:
[0121]
[0122] S6: Perform a cross product operation on the weld tangent vector and the cylinder equation direction vector to determine the weld pipeline posture.
[0123] For example, the weld tangent vector and the cylinder equation direction vector are substituted into the posture calculation formula 6-1, and the cross product calculation is performed on the two to obtain the final pipeline posture:
[0124] V y =cross(V x ,V z ) 6-1
[0125] Among them, (V x ,V y ,V z ) is the final pipeline posture, V y is the component vector of the pipeline attitude in the y direction, V x is the component vector of the pipeline attitude in the x direction, that is, the direction vector of the cylinder equation, V z It is the component vector of pipeline posture in z direction, that is, weld tangent vector.
[0126] On the other hand, the present invention further provides a computer storage medium storing executable program code; the executable program code is used to execute any of the above-mentioned pipeline weld identification methods.
[0127] On the other hand, the present invention further provides a terminal device, comprising a memory and a processor; the memory stores a program code executable by the processor; the program code is used to execute any of the above-mentioned pipeline weld identification methods.
[0128] Exemplarily, the program code may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the program code in the terminal device.
[0129] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the terminal device may also include an input / output device, a network access device, a bus, etc.
[0130] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0131] The memory may be an internal storage unit of the terminal device, such as a hard disk or a memory. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used to store the program code and other programs and data required by the terminal device. The memory may also be used to temporarily store data that has been output or is to be output.
[0132] The above-mentioned computer storage medium and terminal device are created based on the above-mentioned pipeline weld identification method, and their technical functions and beneficial effects are no longer repeated here. The various technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0133] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A pipeline weld identification method, characterized in that: include: Obtain the pipeline workpiece point cloud; According to the point cloud of the pipeline workpiece, the cylinder equation is determined, and the axis line equation and the direction vector of the cylinder equation are obtained; According to the direction vector of the cylinder equation, the pipe workpiece point cloud is divided to obtain the weld plane point cloud to determine the weld plane equation; The intersection of the axis line equation and the weld plane equation is obtained as the weld center point, and the weld circle equation is determined according to the weld center point and the weld plane point cloud, and downsampled to obtain the final weld trajectory point.
2. The method according to claim 1, characterized in that The steps to obtain the point cloud of the pipeline workpiece include: Obtaining the initial workpiece point cloud; Perform straight-through filtering to obtain the optimized workpiece point cloud; The optimized workpiece point cloud is clustered, and the largest point cloud cluster is the pipeline workpiece point cloud.
3. The method according to claim 1, characterized in that The steps to determine the weld plane equation include: Get the normal vector of each point in the pipe workpiece point cloud, and get the cosine value of the angle between the normal vector of each point and the direction vector of the cylinder equation; Determine whether the cosine value of each angle is greater than the cosine threshold. If so, keep the point corresponding to the angle. If not, remove the point corresponding to the angle to obtain the weld plane point cloud. Perform plane fitting on the weld plane point cloud to determine the weld plane equation.
4. The method according to claim 3, characterized in that The steps of determining the weld plane equation also include: S331: setting a plane model, randomly selecting a number of points from the weld plane point cloud, fitting and determining the parameters of the plane model, and obtaining the current plane equation; S332: determining the optimized inner points according to the distance between each point in the weld plane point cloud and the current plane equation, and counting the number of optimized inner points; S333: Determine whether the number of optimized internal points is greater than the quantity threshold. If so, return to step S331; if not, obtain the final plane equation.
5. The method according to claim 1, characterized in that The steps to obtain the final weld trajectory points include: Get the intersection of the axis line equation and the weld plane equation as the weld center point; The radius threshold is set and traversed to construct a circle equation according to the center point of the weld circle and the currently traversed radius, and a plurality of circle equations are obtained; Obtain the number of inner points of each circular equation, and take the circular equation corresponding to the maximum number of inner points as the circular equation of the weld; The weld circle equation is downsampled to obtain several sampling points, which are the final weld trajectory points.
6. The method according to claim 5, characterized in that The steps to obtain the center point of the weld circle include: t=-(A·x+B·y+C·z+D) / (A·dx+B·dy+C·dz) cx=x+dx*t cy=y+dy*t cz=x+dx*t Among them, t is the intermediate variable, (x, y, z, dx, dy, dz) is the axis line equation, (A, B, C, D) is the weld plane parameters, and C (cx, cy, cz) is the center point of the weld.
7. The method according to any one of claims 1 to 6, characterized in that: Also includes: Obtain the centroid point of the pipe workpiece point cloud to determine the weld tangent vector according to the projection point of the centroid point on the cylinder axis; Perform a cross product operation on the weld tangent vector and the cylinder equation direction vector to determine the weld pipe posture.
8. The method according to claim 7, characterized in that The steps for determining the weld tangent vector include: Obtain the centroid point of the pipeline workpiece point cloud and project it to the cylinder axis to obtain the centroid projection point; The direction from the centroid projection point to the weld center point is taken as the weld normal, and it is normalized to obtain the weld tangent vector.
9. A computer storage medium, characterized in that An executable program code is stored; the executable program code is used to execute the pipeline weld identification method according to any one of claims 1 to 8.
10. A terminal device, characterized in that: It comprises a memory and a processor; the memory stores a program code executable by the processor; the program code is used to execute the pipeline weld identification method according to any one of claims 1 to 8.