Pipe machining deformation detection grading method and system based on three-dimensional point cloud
Patent Information
- Application Number
- CN202611204933.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-27
AI Technical Summary
[0005]为此,本发明提供一种基于三维点云的管材机加工变形量检测分级方法及系统,解决现有管材变形检测中接触式方式效率低,易伤工件且无法全尺寸检测;二维视觉无法准确量化空间变形参数,无法适配高速产线在线全检与自动化质量管控需求的问题
[0057]本发明采用非接触式激光扫描与自动化计算,无需人工逐点测量与记录,检测速度相较于传统接触式检测方式实现跨越式提升,可无缝嵌入高速机加工产线,实现管材百分之百全检,消除抽检带来的漏检风险,显著提升生产质量管控水平。
Smart Images

Figure CN122989666A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pipe deformation detection technology, specifically relating to a method and system for detecting and classifying pipe machining deformation based on three-dimensional point clouds. Background Technology
[0002] Pipes, as essential industrial components, are widely used in automotive manufacturing, aerospace, petrochemicals, and construction machinery. During pipe machining, various factors such as cutting stress release, uneven clamping force, thermal deformation during heat treatment, and impacts during transport can easily cause spatial deformation defects like bending and twisting in finished pipes. These defects directly affect the subsequent assembly accuracy and performance of the pipes. For example, in hydraulic piping systems, excessive bending can lead to deviations in pipe routing and installation difficulties, while twisting can damage the sealing surface and cause leakage risks. Therefore, deformation detection is a core aspect of pipe quality control before shipment.
[0003] Currently, the mainstream pipe deformation detection method in the industry is still mainly contact-based. Operators use V-blocks, dial indicators, and specialized gauges to measure point by point along the pipe's axis, manually reading and recording the measurements to determine parameters such as bending and torsion. Completing multi-parameter, full-length testing of a single pipe typically takes several minutes. For high-speed machining lines, this speed is insufficient for full inspection, necessitating sampling and introducing the risk of missed defects. Contact measurement can easily scratch the finished pipe surface, especially for high-precision polished or thin-walled pipes, potentially leading to workpiece scrap and unnecessary economic losses. The test results are highly dependent on manual operation; operator reading errors, clamping errors, and measurement position deviations all introduce significant random errors, resulting in insufficient stability and consistency, and making it difficult to guarantee product quality traceability. This method can only obtain test data from a limited number of discrete points, failing to characterize the dimensions and deformation of the entire pipe's length and cross-section. It easily misses local deformation defects and cannot effectively quantify spatial torsion deformations such as torsion.
[0004] In recent years, with the rapid development of machine vision technology, some two-dimensional vision inspection solutions have begun to be applied to the online inspection of pipe outer diameter and roundness. However, two-dimensional imaging technology can only acquire the contour information of the pipe from a single viewpoint and cannot acquire the three-dimensional spatial morphology of the pipe. Therefore, it is difficult to accurately quantify spatial deformation parameters such as curvature (the yaw of the axis in three-dimensional space) and torsion (the relative rotation of the cross section around the axis), which cannot meet the engineering requirements of high-precision full-size pipe inspection. Summary of the Invention
[0005] To address these issues, this invention provides a method and system for detecting and classifying deformation in pipe machining based on three-dimensional point clouds. This solves the problems of low efficiency, easy damage to workpieces, and inability to perform full-size inspections in existing pipe deformation detection methods; and the inability of two-dimensional vision to accurately quantify spatial deformation parameters, thus failing to meet the requirements of online full inspection and automated quality control in high-speed production lines.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting and classifying deformation in pipe machining based on three-dimensional point clouds, comprising the following steps:
[0007] S1. Import the standard CAD 3D model of the pipe to be tested, and extract the standard center axis, the reference sections at both ends, the nominal outer diameter and the effective length of the standard CAD 3D model as reference feature parameters; according to the preset quality grading standard, configure and set the upper limit threshold of the allowable bending degree and the upper limit threshold of the allowable torsion degree corresponding to the quality grade to form a grading judgment rule library;
[0008] S2. Using a line laser scanning device in conjunction with an axial conveying fixture, the pipe is made to pass through the scanning area at a uniform speed along its own axis, and the original three-dimensional point cloud data of the entire circumference of the pipe is collected; statistical filtering and denoising processing and voxel mesh downsampling processing are performed on the original three-dimensional point cloud data to obtain regular measured point cloud data of the pipe surface.
[0009] S3. Based on the measured point cloud data and the standard CAD 3D model, the actual center axis of the pipe is extracted from the measured point cloud data using a random sampling consensus algorithm. The actual center axis is then spatially aligned with the standard center axis to complete the initial coordinate transformation and achieve coarse registration. Based on the coarse registration, an improved iterative nearest point algorithm with normal vector constraints is adopted to iteratively optimize the algorithm with the goal of minimizing the sum of squared distances from the point to the surface, thereby obtaining the optimal coordinate transformation matrix and completing the registration between the measured point cloud and the standard CAD 3D model.
[0010] S4. Based on the registered point cloud data and the standard CAD 3D model, extract the cross-sectional point cloud of the measured point cloud at equal intervals along the pipe axis, fit the center of each cross-section to obtain the actual central axis, calculate the maximum normal deviation between the actual central axis and the standard central axis and divide it by the effective length to obtain the curvature; extract the major axis direction of the ellipse of the cross-sections at both ends of the pipe, calculate the spatial angle between the major axis directions at both ends and divide it by the effective length to obtain the twist per unit length; calculate the outer diameter deviation and roundness error of each cross-section.
[0011] S5. The calculated curvature, twist, outer diameter deviation and roundness error are compared one by one with the corresponding thresholds in the grading judgment rule base. Based on the barrel effect principle, the lowest level among all test indicators is taken as the final quality level. A standardized test report and grading results are output, and the test data is uploaded to the production management system.
[0012] As a preferred embodiment of the pipe machining deformation detection and grading method based on 3D point clouds, the specific method for statistical filtering and noise reduction in step S2 is as follows:
[0013] For each point in the original 3D point cloud data Take it Calculate the average neighborhood distance using the nearest neighbor points:
[0014]
[0015] Calculate the global mean of the average neighborhood distances of all points. and standard deviation :
[0016]
[0017]
[0018] If the average neighborhood distance of a certain point satisfies If the point is an outlier, it is considered a noise point and is removed.
[0019] In the formula, This indicates the first element in the original 3D point cloud data. The position coordinates of each scan point in three-dimensional space; This indicates the number of nearest neighbors that participated in the neighborhood statistics; Indicates the first The scan point and the first The straight-line spatial distance between the nearest neighbors; Indicates the first Average neighborhood distance of each scan point; This represents the global mean of the average neighborhood distances of all scanned points; This represents the standard deviation of the average neighborhood distance of all scanned points. This indicates the total number of scan points contained in the original 3D point cloud data; This represents the adjustment coefficient used to adjust the stringency of outlier detection.
[0020] As a preferred scheme for the pipe machining deformation detection and grading method based on 3D point cloud, the specific method of voxel mesh downsampling processing in step S2 is as follows:
[0021] Based on voxel side length The three-dimensional space is divided into a uniform cubic grid. For all points falling within the same cubic grid, the centroid coordinates are calculated as the representative point of that grid.
[0022] As a preferred embodiment of the method for detecting and classifying deformation in pipe machining based on 3D point clouds, the specific process of coarse registration in step S3 is as follows:
[0023] Based on the random sampling consensus algorithm, three points are randomly selected from the measured point cloud to fit a cylindrical surface. The direction of the cylinder axis is iteratively solved, and the axis with the most internal points is selected as the actual central axis. The actual central axis is rotated and translated to coincide with the standard central axis, so that the initial translation deviation is less than 1 mm and the initial rotation deviation is less than 1°.
[0024] The actual center axis represents the direction of the true spatial axis of the pipe obtained by fitting, and is a dimensionless direction vector; the initial translation deviation represents the spatial offset between the two axes; the initial rotation deviation represents the angular deviation between the two axes.
[0025] As a preferred scheme for the pipe machining deformation detection and grading method based on 3D point clouds, in step S3, the objective function of the improved iterative nearest point algorithm is:
[0026]
[0027] In the formula, This represents the rotation matrix to be solved, used to rotate the attitude of the measured point cloud to be consistent with the standard CAD 3D model; This represents the translation vector to be solved, used to translate the overall position of the measured point cloud to coincide with the standard CAD 3D model; The first point in the measured point cloud represents the... The three-dimensional coordinates of each scan point; express The 3D coordinates of the nearest neighbor point in a standard CAD 3D model point cloud; This represents the total number of scan points in the measured point cloud that participated in the registration; The Euclidean norm represents the three-dimensional space and is used to calculate the straight-line distance between two points. The objective function value represents the registration error, and its numerical value reflects the sum of the squared distances between all nearest neighbor pairs in the current registration state. This represents the threshold for determining iterative convergence; the change in the objective function value between two consecutive iterations is less than a preset threshold. Stop iterating when the time comes.
[0028] As a preferred embodiment of the pipe machining deformation detection and grading method based on three-dimensional point clouds, in step S4, the calculation method for the curvature is as follows:
[0029] Along the axial direction of the pipe at intervals Extract the cross sections, and use least squares to fit the center coordinates of each cross section to obtain the sequence of center points of the cross sections. Fit the sequence of center points of the cross sections to obtain the actual central axis.
[0030] Calculate the normal distance from the center point of each section to the actual central axis:
[0031]
[0032] Take the maximum normal deviation The curvature is ;
[0033] In the formula, Indicates the first extraction along the axial direction The three-dimensional coordinates of the center point of the cross section obtained by fitting in each cross section; This represents the three-dimensional coordinates of any reference point on the actual central axis; The unit direction vector representing the actual central axis; Represents the cross product operation of three-dimensional vectors; Indicates the first The vertical normal distance from the center point of each cross section to the actual center axis; This indicates the effective length of the pipe to be tested.
[0034] As a preferred embodiment of the method for detecting and classifying deformation in pipe machining based on three-dimensional point clouds, in step S4, the calculation method for the torsion degree is as follows:
[0035] Extract point cloud data from the cross-sections at both ends of the pipe, and fit the major axis direction vectors of the ellipse at each end of the cross-section. and ;
[0036] Calculate the spatial angle between the two ends along their major axes:
[0037]
[0038] Will Converted to angles The conversion relationship is as follows: ;
[0039] The degree of distortion is ;
[0040] In the formula, This represents the unit vector along the major axis of the ellipse fitted to the cross-section at one end of the pipe. This represents the unit vector along the major axis of the ellipse fitted to the cross-section at the other end of the pipe. The spatial angle between the major axes of the two end sections, expressed in radians; This represents the value after converting the spatial angle from radians to degrees; Pi is a constant. The effective length of the pipe to be tested is expressed as a value in meters; the torsion degree is expressed as the relative torsional angle between the two ends of the pipe per unit length.
[0041] As a preferred method for detecting and classifying deformation in pipe machining based on 3D point clouds, step S4 also includes wall thickness difference detection:
[0042] If the inner and outer wall synchronous scanning function is configured, the point cloud data of the inner wall of the pipe will be acquired synchronously, and the difference between the maximum and minimum values of the wall thickness along the circumference of the pipe will be calculated as the evaluation index of wall thickness uniformity.
[0043] The wall thickness difference represents the difference between the maximum and minimum circumferential wall thickness of the same cross section of the pipe, and is used to evaluate the uniformity of the pipe wall thickness.
[0044] As a preferred method for detecting and classifying deformation in pipe machining based on 3D point clouds, the specific judgment logic of the "barrel effect principle" in step S5 is as follows:
[0045] The curvature, the torsion, the outer diameter deviation, and the roundness error are compared with the corresponding thresholds in the grading judgment rule base to obtain the corresponding individual grades.
[0046] The lowest grade among all the individual grades is taken as the final quality grade of the pipe, which is formally expressed as: final grade = min(grade (curvature), grade (torsion), grade (outer diameter deviation), grade (roundness));
[0047] In the formula, min represents the minimum value operator, which selects the lowest level among the levels corresponding to the specified test index; each "level" function returns the quality level of the corresponding test index, including superior, first-class, qualified and unqualified products.
[0048] As a preferred method for detecting and classifying deformation in pipe machining based on 3D point clouds, after step S5, a step for visualizing the detection results is also included:
[0049] The registered measured point cloud data is overlaid with the standard CAD 3D model and displayed. The deviation value of each point in the measured point cloud data relative to the surface of the standard CAD 3D model is mapped to a set color using a pseudo-color deviation cloud map method, which shows the deformation distribution and local defect location of the entire surface of the pipe.
[0050] This invention also provides a pipe machining deformation detection and grading system based on three-dimensional point clouds, used to implement the above-mentioned pipe machining deformation detection and grading method based on three-dimensional point clouds, including:
[0051] The standard model and grading rule preprocessing module is used to import the standard CAD three-dimensional model of the pipe to be tested, and extract the standard center axis, the reference sections at both ends, the nominal outer diameter and the effective length of the standard CAD three-dimensional model as reference feature parameters; according to the preset quality grading standard, the module configures and sets the upper limit threshold of the allowable bending degree and the upper limit threshold of the allowable torsion degree corresponding to the quality level, forming a grading judgment rule library;
[0052] The pipe surface three-dimensional point cloud data acquisition and preprocessing module is used to collect the original three-dimensional point cloud data of the entire circumference of the pipe by using a line laser scanning device in conjunction with an axial conveying fixture to make the pipe pass through the scanning area at a uniform speed along its own axis; and to perform statistical filtering noise reduction processing and voxel mesh downsampling processing on the original three-dimensional point cloud data to obtain regular pipe surface measured point cloud data.
[0053] The multi-level registration module between point cloud and standard CAD model is used to extract the actual center axis of the pipe from the measured point cloud data based on the measured point cloud data and the standard CAD 3D model, and to spatially align the actual center axis with the standard center axis to complete the initial coordinate transformation and achieve coarse registration. Based on the coarse registration, an improved iterative nearest point algorithm with normal vector constraints is adopted to iteratively optimize the algorithm with the goal of minimizing the sum of squared distances from the point to the surface, so as to obtain the optimal coordinate transformation matrix and complete the registration between the measured point cloud and the standard CAD 3D model.
[0054] The spatial deformation parameter calculation module is used to extract the cross-sectional point cloud of the measured point cloud at equal intervals along the pipe axis based on the registered point cloud data and the standard CAD 3D model, fit the center of each cross-section to obtain the actual central axis, calculate the maximum normal deviation between the actual central axis and the standard central axis and divide it by the effective length to obtain the curvature; extract the major axis direction of the ellipse of the cross-sections at both ends of the pipe, calculate the spatial angle between the major axis directions at both ends and divide it by the effective length to obtain the twist per unit length; and calculate the outer diameter deviation and roundness error of each cross-section.
[0055] The quality grading judgment output module is used to compare the calculated curvature, twist, outer diameter deviation and roundness error with the corresponding thresholds in the grading judgment rule base one by one, and take the lowest level among all test indicators as the final quality level based on the barrel effect principle, output a standardized test report and grading results, and upload the test data to the production management system.
[0056] The present invention has the following advantages:
[0057] This invention employs non-contact laser scanning and automated calculation, eliminating the need for manual point-by-point measurement and recording. Compared to traditional contact detection methods, the detection speed is significantly improved. It can be seamlessly integrated into high-speed machining production lines, enabling 100% inspection of pipes, eliminating the risk of missed inspections caused by sampling, and significantly improving the level of production quality control.
[0058] This invention acquires the three-dimensional point cloud of the pipe surface through laser scanning throughout the entire process, without any physical contact with the workpiece. It will not cause scratches or indentations on the finished surface of the pipe, and is especially suitable for quality inspection of easily damaged workpieces such as high-precision polished pipes, thin-walled pipes, and coated pipes, effectively reducing the scrap rate caused by inspection.
[0059] This invention uses three-dimensional point clouds to collect and calculate data on the entire surface and length of the pipe. It can accurately quantify spatial deformation parameters that are difficult to measure by traditional methods, such as curvature (the ratio of the maximum normal deviation to the effective length) and torsion (torsion angle per unit length). It can also simultaneously complete the detection of full-size parameters such as outer diameter deviation and roundness error. The deformation information of each cross-section can be accurately obtained, avoiding the problem of missing local deformation defects in traditional manual sampling inspection.
[0060] This invention designs a two-stage registration strategy for the geometric characteristics of rotating bodies in long-axis tubing. The coarse registration stage uses a random sampling consensus algorithm to quickly extract the actual central axis and align it with the standard axis. The fine registration stage introduces an improved iterative nearest-point algorithm with normal vector constraints, iteratively optimizing to minimize the point-to-surface distance. This two-stage strategy balances computational speed and registration accuracy, meeting the dual requirements of real-time performance and accuracy for online detection.
[0061] This invention outputs a quality grade after testing, eliminating the need for manual secondary judgment. The grading rule base adopts a parameterized configuration method, which can flexibly adjust the grading threshold according to different pipe specifications, grades, and enterprise internal control standards. The test report is automatically generated and uploaded to the production management system, realizing full-process traceability of quality data for individual products, and can be directly connected to the automated quality control system of intelligent manufacturing production lines.
[0062] This invention overlays the registered measured point cloud with the standard CAD model and uses a pseudo-color deviation cloud map to visually display the deformation distribution and local defect locations on the entire surface of the pipe. This provides technicians with an intuitive quality analysis tool, which helps to identify processing problems in a timely manner, guide the optimization of process parameters, and continuously improve product yield. Attached Figure Description
[0063] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0064] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0065] Figure 1 This is a schematic diagram of the process for classifying and detecting deformation of pipes during machining based on three-dimensional point clouds, as provided in an embodiment of the present invention.
[0066] Figure 2 This is a technical roadmap for the pipe machining deformation detection and grading method based on three-dimensional point cloud provided in the embodiments of the present invention;
[0067] Figure 3 This is a measurement accuracy verification analysis diagram provided in an embodiment of the present invention;
[0068] Figure 4 This is a comparison chart of detection efficiency provided in the embodiments of the present invention;
[0069] Figure 5 This is a repeatability verification analysis diagram provided in an embodiment of the present invention;
[0070] Figure 6 This is a comparison chart of full-size coverage capabilities provided in an embodiment of the present invention;
[0071] Figure 7 This is an accuracy analysis chart for grading determination provided in an embodiment of the present invention;
[0072] Figure 8 This is a diagram of the architecture of a pipe machining deformation detection and grading system based on three-dimensional point cloud provided in an embodiment of the present invention. Detailed Implementation
[0073] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0074] Example 1
[0075] See Figure 1 and Figure 2 This invention provides a method for detecting and classifying deformation in pipe machining based on three-dimensional point clouds, comprising the following steps:
[0076] S1. Import the standard CAD 3D model of the pipe to be tested, and extract the standard center axis, the reference sections at both ends, the nominal outer diameter and the effective length of the standard CAD 3D model as reference feature parameters; according to the preset quality grading standard, configure and set the upper limit threshold of the allowable bending degree and the upper limit threshold of the allowable torsion degree corresponding to the quality grade to form a grading judgment rule library.
[0077] Specifically, the standard CAD 3D model represents the ideal geometric shape of the pipe before deformation. By pre-extracting its standard center axis (ideal straight line), end reference sections (for subsequent torsion comparison), nominal outer diameter (diameter reference value), and effective length (for normalized calculation of curvature and torsion), a comparison benchmark is provided for the measured point cloud. The construction of the grading rule base reflects the principle of standards first in industrial inspection. Different pipe specifications and application scenarios have significantly different tolerances for deformation. For example, aerospace pipes have extremely strict requirements for curvature, while ordinary structural pipes can be appropriately relaxed. Therefore, by pre-configuring thresholds corresponding to different quality levels, the system can automatically compare and grade during actual inspection.
[0078] S2. Using a line laser scanning device in conjunction with an axial conveying fixture, the pipe is made to pass through the scanning area at a uniform speed along its own axis, and the original three-dimensional point cloud data of the entire circumference of the pipe is collected. Statistical filtering and noise reduction processing and voxel grid downsampling processing are performed on the original three-dimensional point cloud data to obtain regular measured point cloud data of the pipe surface.
[0079] Specifically, a line laser scanning device projects one or more laser lines onto the pipe surface and calculates the three-dimensional coordinates of each scanning point using the principle of triangulation. An axial conveying fixture moves the pipe at a constant speed through the scanning area, allowing the scanner to acquire data line by line along the pipe's length. Simultaneously, the pipe rotates at a constant speed (or the scanner rotates around the pipe), achieving full coverage acquisition of the entire circumference of the surface, thus obtaining the original three-dimensional point cloud data of the complete pipe surface. However, due to factors such as ambient stray light, surface reflection, and sensor electronic noise, outlier noise points and redundant background points inevitably mix into the original point cloud. Directly using this for registration would severely interfere with calculation accuracy; therefore, preprocessing is necessary. Statistical filtering denoising utilizes the statistical characteristics of neighborhood distance to effectively identify and remove spatially isolated outlier noise points. Voxel mesh downsampling, while maintaining the macroscopic geometric features of the pipe surface, significantly compresses the number of point clouds through spatial partitioning and centroid substitution, thereby improving the computational efficiency of registration and calculation. The normalized measured point cloud data retains the geometric features reflecting pipe deformation information while eliminating noise interference, providing high-quality data input for registration.
[0080] S3. Based on the measured point cloud data and the standard CAD 3D model, the actual center axis of the pipe is extracted from the measured point cloud data using a random sampling consensus algorithm. The actual center axis is then spatially aligned with the standard center axis to complete the initial coordinate transformation and achieve coarse registration. Based on the coarse registration, an improved iterative nearest point algorithm with normal vector constraints is adopted to iteratively optimize the algorithm with the goal of minimizing the sum of squared distances from the point to the surface, thereby obtaining the optimal coordinate transformation matrix and completing the registration between the measured point cloud and the standard CAD 3D model.
[0081] Specifically, in the coarse registration stage, a random sampling consensus algorithm is used to fit a cylindrical surface from the measured point cloud and extract the actual central axis. Three points are repeatedly randomly selected from the massive point cloud to construct a cylindrical model. The number of interior points satisfying the conditions of this cylindrical surface is counted, and the axis with the most interior points is finally selected as the true axis. This method has natural tolerance to outliers and noise in the point cloud, and can robustly extract the actual axial direction of the pipe from noisy and missing data. After aligning the actual central axis with the standard central axis, the approximate position and orientation of the measured point cloud are corrected to be close to the model's state, with initial translational deviation controlled within 1 mm and rotational deviation controlled within 1°, providing a reliable initial position for fine registration. In the fine registration stage, an improved iterative nearest-neighbor algorithm with introduced normal vector constraints is used, with the objective function being the sum of the squared distances of all nearest neighbor pairs. Unlike conventional ICP, this scheme introduces normal vector constraints, which means that the vertical distance from the measured point to the model surface is used as the optimization target, rather than the direct distance between points. This point-to-surface error measurement method has a faster convergence speed and higher registration accuracy for regular geometric surfaces such as cylindrical surfaces and planes. It can effectively overcome the registration deviation caused by uneven point cloud density or local data loss on the pipe surface, and finally achieve sub-millimeter level registration accuracy.
[0082] S4. Based on the registered point cloud data and the standard CAD 3D model, extract the cross-sectional point cloud of the measured point cloud at equal intervals along the pipe axis, fit the center of each cross-section to obtain the actual central axis, calculate the maximum normal deviation between the actual central axis and the standard central axis and divide it by the effective length to obtain the curvature; extract the major axis direction of the ellipse of the cross-sections at both ends of the pipe, calculate the spatial angle between the major axis directions at both ends and divide it by the effective length to obtain the twist per unit length; calculate the outer diameter deviation and roundness error of each cross-section.
[0083] Specifically, for bending calculation, the basic logic is to slice the 3D point cloud along the pipe's axial direction, dividing the continuous point cloud into multiple cross-sectional slices at a set interval Δz. The point cloud within each cross-sectional slice is approximately distributed on a circular ring, and the coordinates of the center of this ring are obtained through least-squares fitting. Connecting the centers of all cross-sections together forms the actual central axis of the pipe (for a bent pipe, this axis is a spatial curve). An ideal straight line (standard axis) is fitted using the least-squares method, and the normal distance from the center point of each cross-section to this ideal straight line is calculated. The maximum value is taken as the maximum normal deviation. Bending is defined as the ratio of the maximum normal deviation to the effective length of the pipe, expressed as a percentage. This physical quantity directly reflects the degree of arc-shaped bending of the pipe along its length.
[0084] For torsion calculation, the relative rotation of the cross-sections at both ends of the pipe is used to characterize torsional deformation. For a circular pipe, if torsion deformation occurs, the major axes of the ellipses at both ends will no longer be parallel, but will have a spatial angle. By fitting the vectors of the major axes of the ellipses at both ends of the pipe and calculating the angle between them, the degree of torsion can be quantified. Torsion is defined as the ratio of this angle to the effective length of the pipe, representing the angle of torsion per meter of pipe length. This physical quantity is directly related to the circumferential alignment accuracy of the pipe with flanges, joints, and other fittings. In addition, full-size parameter inspection (outer diameter deviation, roundness error) further supplements the evaluation of the overall quality of the pipe from the perspective of cross-sectional dimensional stability.
[0085] S5. The calculated curvature, twist, outer diameter deviation and roundness error are compared one by one with the corresponding thresholds in the grading judgment rule base. Based on the barrel effect principle, the lowest level among all test indicators is taken as the final quality level. A standardized test report and grading results are output, and the test data is uploaded to the production management system.
[0086] Specifically, the grading method adopts the "barrel effect" principle, where the overall quality grade of the pipe is determined by the worst indicator. Even if the curvature of a pipe meets the superior standard, if its twist only meets the qualified standard, the twist defect will still lead to assembly failure or sealing failure in actual assembly and use. Therefore, the overall grade should be the lowest among all individual grades. The specific operation involves comparing each test parameter with a threshold table to obtain the corresponding individual grade (superior, first-class, qualified, unqualified), and taking the lowest grade among all individual grades as the final quality grade. Test reports are automatically generated and uploaded to the production management system to achieve traceability of quality data, helping to promptly detect fluctuations in the production process. This process directly transforms complex geometric calculations into decision-making information usable by production management, achieving seamless integration of testing and quality management.
[0087] In one possible embodiment, the specific method for statistical filtering denoising in step S2 is as follows:
[0088] For each point in the original 3D point cloud data Take it Calculate the average neighborhood distance using the nearest neighbor points:
[0089]
[0090] Calculate the global mean of the average neighborhood distances of all points. and standard deviation :
[0091]
[0092]
[0093] If the average neighborhood distance of a certain point satisfies If the point is an outlier, it is considered a noise point and is removed.
[0094] In the formula, This indicates the first element in the original 3D point cloud data. The position coordinates of each scan point in three-dimensional space; This indicates the number of nearest neighbors that participated in the neighborhood statistics; Indicates the first The scan point and the first The straight-line spatial distance between the nearest neighbors; Indicates the first Average neighborhood distance of each scan point; This represents the global mean of the average neighborhood distances of all scanned points; This represents the standard deviation of the average neighborhood distance of all scanned points. This indicates the total number of scan points contained in the original 3D point cloud data; This represents the adjustment coefficient used to adjust the stringency of outlier detection.
[0095] Specifically, the underlying logic of statistical filtering denoising leverages the fundamental difference in spatial distribution density between real scan points and outlier noise points. For any real scan point located on the pipe surface, it inevitably has a large number of neighboring points (because the pipe surface is continuously and densely sampled), thus its average neighborhood distance is relatively small. However, for outlier noise points outside the pipe surface, such as stray reflections in the air or sensor jump signals, there are almost no other points around them, and their average neighborhood distance is significantly larger than that of normal points. Therefore, the global mean of the neighborhood distance of all points is calculated. and standard deviation , Reflects the average level of neighborhood distance of normal points. This reflects the normal fluctuation range of the neighborhood distance of normal points. When the average neighborhood distance of a point exceeds μ + α·σ, it indicates that the point deviates too far from the dense area of the mainstream point group, belonging to an extremely low probability event, and thus there is sufficient reason to judge it as an outlier noise point and remove it. The selection of the α coefficient is essentially a confidence control parameter in statistics. The larger the α, the stricter the judgment, the more points are retained, but the more noise remains; the smaller the α, the more thorough the denoising, but the more likely valid data will be mistakenly deleted.
[0096] In one possible embodiment, the specific method for the voxel grid downsampling process in step S2 is as follows:
[0097] Based on voxel side length The three-dimensional space is divided into a uniform cubic grid. For all points falling within the same cubic grid, the centroid coordinates are calculated as the representative point of that grid.
[0098] Specifically, voxel mesh downsampling utilizes spatial partitioning and centroid simplification strategies to achieve lossless compression of point cloud data. Even after statistical filtering and denoising, the original 3D point cloud may still contain hundreds of thousands to millions of points. Direct registration would result in excessive computation and speed insufficient for the real-time requirements of online detection. The voxel mesh downsampling method divides the entire 3D space into uniform cubic meshes (voxels) with side length L. Each voxel may contain multiple scan points. Since these points are located within the same extremely small spatial region, their geometric differences are far smaller than the overall deformation of the pipe. Therefore, taking the centroid of all points within a voxel as its representative point allows for compression of the point cloud to a fraction of the original amount, even a tenth or a tenth, with almost no loss of macroscopic geometric information about the pipe surface. The selection of the voxel side length L involves a constraint balance: too much L would excessively smooth pipe surface details, obscuring minute geometric changes such as outer diameter and roundness; too little L would result in insignificant compression and fail to effectively improve computational efficiency. Typically, the value of L is between 0.05 and 0.1 mm, specifically determined by 1.5 to 2.0 times the average point spacing of the point cloud on the pipe surface. This ensures both the geometric fidelity of the point cloud and significant downsampling gain, providing conditions for the efficient operation of the registration algorithm.
[0099] In one possible embodiment, the coarse registration process in step S3 is as follows:
[0100] Based on the random sampling consensus algorithm, three points are randomly selected from the measured point cloud to fit a cylindrical surface. The direction of the cylinder axis is iteratively solved, and the axis with the most internal points is selected as the actual central axis. The actual central axis is rotated and translated to coincide with the standard central axis, so that the initial translation deviation is less than 1 mm and the initial rotation deviation is less than 1°.
[0101] The actual center axis represents the direction of the true spatial axis of the pipe obtained by fitting, and is a dimensionless direction vector; the initial translation deviation represents the spatial offset between the two axes; the initial rotation deviation represents the angular deviation between the two axes.
[0102] Specifically, the technical challenge of coarse registration lies in the fact that the initial positions and orientations of the measured point cloud and the standard model are completely unknown. If the iterative nearest-point algorithm is used directly, it is easy to get trapped in local minima due to excessive deviation of the initial values, leading to registration failure. The random sampling consensus algorithm starts from the data itself and finds the optimal geometric model in point cloud data containing noise and outliers through a large number of random samplings and statistical verifications. In this specific scenario, the core logic is that any three non-collinear scan points on the pipe surface can uniquely determine a cylindrical surface and its axis direction, because the basic property of a cylindrical surface is that the distance from its surface to its axis is equal everywhere. The system repeatedly randomly selects three points from the measured point cloud, fits the cylindrical axis, and then substitutes all points into the axis model, counting the number of interior points that satisfy the cylindrical surface condition (i.e., points whose distance to the cylindrical surface is less than a certain threshold). After a large number of random samplings, the axis that produces the maximum number of interior points is the axis that best matches the actual shape of the pipe. Aligning this axis with the standard axis in the standard CAD model completes the coarse registration from any initial pose to a near-standard pose, keeping translational deviation within 1mm and rotational deviation within 1°, providing excellent initial values for fine registration. The significance of coarse registration lies in reducing the search space. Without coarse registration, the ICP algorithm needs to search for the global optimum in a high-dimensional space, which is computationally intensive and prone to failure. After coarse registration, ICP only needs to perform local optimization in the neighborhood of the initial value, greatly improving the robustness and computational efficiency of the registration.
[0103] In one possible embodiment, in step S3, the objective function of the improved iterative nearest point algorithm is:
[0104]
[0105] In the formula, This represents the rotation matrix to be solved, used to rotate the attitude of the measured point cloud to be consistent with the standard CAD 3D model; This represents the translation vector to be solved, used to translate the overall position of the measured point cloud to coincide with the standard CAD 3D model; The first point in the measured point cloud represents the... The three-dimensional coordinates of each scan point; express The 3D coordinates of the nearest neighbor point in a standard CAD 3D model point cloud; This represents the total number of scan points in the measured point cloud that participated in the registration; The Euclidean norm represents the three-dimensional space and is used to calculate the straight-line distance between two points. The objective function value represents the registration error, and its numerical value reflects the sum of the squared distances between all nearest neighbor pairs in the current registration state. This represents the threshold for determining iterative convergence; the change in the objective function value between two consecutive iterations is less than a preset threshold. Stop iterating when the time comes.
[0106] Specifically, the essence of the improved Iterative Closest Point (ICP) algorithm is to find an optimal rigid body transformation (rotation matrix R and translation vector t) that minimizes the sum of squared distances between each point in the measured point cloud and the nearest point on the surface of the standard model after rotation and translation. The physical meaning of the objective function is to quantify the degree to which the measured point cloud deviates from the standard model. If the registration is accurate, each point in the measured point cloud should be close to the model surface, minimizing the sum of squared distances; if there is a registration deviation, the distances from each point to the model surface are larger, and the sum of squared distances E increases accordingly. In each iteration, the nearest point on the model for each measured point is first found, i.e. First, point-to-point relationships are established. Then, the goal is to minimize the point-to-surface distance, solving for R and t (due to the introduction of normal vector constraints, the optimization objective is not the straight-line distance from a point to the nearest point, but the vertical distance from a point to the model surface, which more accurately reflects the degree of geometric fit). Next, R and t are applied to update the measured point cloud positions. This process is repeated until the change in the objective function between two adjacent iterations is less than the threshold ε. Since each iteration causes the objective function E to decrease monotonically, this method will inevitably converge to a local minimum. Given that the coarse registration has already provided good initial values, the improved ICP can quickly converge to a high-precision registration result.
[0107] In one possible embodiment, in step S4, the curvature is calculated as follows:
[0108] Along the axial direction of the pipe at intervals Extract the cross sections, and use least squares to fit the center coordinates of each cross section to obtain the sequence of center points of the cross sections. Fit the sequence of center points of the cross sections to obtain the actual central axis.
[0109] Calculate the normal distance from the center point of each section to the actual central axis:
[0110]
[0111] Take the maximum normal deviation The curvature is ;
[0112] In the formula, Indicates the first extraction along the axial direction The three-dimensional coordinates of the center point of the cross section obtained by fitting in each cross section; This represents the three-dimensional coordinates of any reference point on the actual central axis; The unit direction vector representing the actual central axis; Represents the cross product operation of three-dimensional vectors; Indicates the first The vertical normal distance from the center point of each cross section to the actual center axis; This indicates the effective length of the pipe to be tested.
[0113] Specifically, the calculation of curvature is essentially a three-dimensional spatial quantification of the straightness of the pipe axis. This is done along the pipe axis at equal intervals. Extract cross-sections, and obtain the center point of each cross-section by fitting the center of a circle using least squares fitting. This center point reflects the actual geometric center of the pipe at that location. Arranging all the center points of the cross-sections in axial order forms a space curve, which is the actual central axis. For an ideal, undamaged pipe, this curve should approximate a straight line; when the pipe undergoes bending deformation, the curve will deviate from the ideal straight line. Normal distance. The calculation uses the standard formula for the distance from a midpoint to a line in three-dimensional geometry. This involves taking the cross product of the difference vector between the center point and any reference point on the line and the line's direction vector, then dividing by the magnitude of the direction vector to obtain the perpendicular distance from the point to the line. The largest normal deviation among all cross-sections is then selected. As a measure of the degree of bending, it is then normalized by dividing by the effective length of the pipe to obtain the bending degree expressed as a percentage. The necessity of normalization lies in the fact that even if the absolute bending amount is the same, pipes of different lengths have different engineering implications. Longer pipes should have a relatively wider tolerance for bending, while the absolute value of the bending amount for shorter pipes should be controlled within a smaller range. Therefore, the bending degree percentage is essentially the maximum bending amount per unit length, providing stronger horizontal comparability in pipe selection and quality assessment. The selection of [aspect name] plays a crucial role in this calculation. An excessively large value can cause the bending details to be averaged out, potentially leading to the missed detection of local short-wave bending. If the value is too small, the number of points within each cross-section will be insufficient, leading to unstable center-fitting. Typically, 1 / 20 to 1 / 10 of the pipe's outer diameter is taken as the minimum value. This ensures that there are enough points on the cross section for center fitting, while avoiding over-averaging of bending information.
[0114] In one possible embodiment, in step S4, the twist degree is calculated as follows:
[0115] Extract point cloud data from the cross-sections at both ends of the pipe, and fit the major axis direction vectors of the ellipse at each end of the cross-section. and ;
[0116] Calculate the spatial angle between the two ends along their major axes:
[0117]
[0118] Will Converted to angles The conversion relationship is as follows: ;
[0119] The degree of distortion is ;
[0120] In the formula, This represents the unit vector along the major axis of the ellipse fitted to the cross-section at one end of the pipe. This represents the unit vector along the major axis of the ellipse fitted to the cross-section at the other end of the pipe. The spatial angle between the major axes of the two end sections, expressed in radians; This represents the value after converting the spatial angle from radians to degrees; Pi is a constant. The effective length of the pipe to be tested is expressed as a value in meters; the torsion degree is expressed as the relative torsional angle between the two ends of the pipe per unit length.
[0121] Specifically, torsion is a quantitative characterization of the twisting of a pipe around its own axial direction. Ideally, characteristic points of the same orientation (e.g., along the major axis of an ellipse) on all cross-sections of the pipe should remain consistent. During torsional deformation, due to uneven axial stress distribution during processing or uneven heat treatment, the two end cross-sections rotate relative to each other in the circumferential direction, resulting in an increase in the angle along the major axis. The torsion calculation process first extracts the point clouds from the two end cross-sections, fits ellipses to each, and calculates the unit vector along the major axis of the ellipse. Then, the spatial angle between the two unit vectors is calculated using the vector dot product formula. After converting the radian to an angle, dividing by the effective length of the pipe yields the torsion angle per unit length (° / m). This physical quantity directly reflects the average degree of torsion per meter along the length of the pipe. For applications with extremely high requirements for circumferential alignment, such as hydraulic pipes and precision drive shafts, the degree of torsion is a key factor determining whether the pipe can be successfully assembled. For example, when two pipes need to be connected via a flange, if the torsion is too large, the flange bolt holes cannot be fully aligned, causing assembly difficulties or even making installation impossible. It is particularly important to note that the effective length must be entered in meters here, because the torsion is required to be output in ° / m, which is different from the dimensionless percentage of curvature. The conversion standard establishes a benchmark for comparing the torsion of pipes of different lengths, enabling this parameter to be compared laterally between pipes of different specifications.
[0122] In one possible embodiment, step S4 further includes wall thickness difference detection:
[0123] If the inner and outer wall synchronous scanning function is configured, the point cloud data of the inner wall of the pipe will be acquired synchronously, and the difference between the maximum and minimum values of the wall thickness along the circumference of the pipe will be calculated as the evaluation index of wall thickness uniformity.
[0124] The wall thickness difference represents the difference between the maximum and minimum circumferential wall thickness of the same cross section of the pipe, and is used to evaluate the uniformity of the pipe wall thickness.
[0125] Specifically, wall thickness difference detection serves as a supplementary verification for inherent quality defects in pipes, such as uneven wall thickness, eccentricity, and rolling defects. During pipe extrusion or seamless rolling, due to die eccentricity or uneven rolling force, the outer diameter of the pipe may meet requirements, but the inner wall may exhibit uneven thickness on one side and a thicker thickness on the other, resulting in uneven wall thickness distribution along the circumference. If only the outer diameter and roundness are detected, such uneven wall thickness cannot be detected. Therefore, when the system is equipped with simultaneous scanning of the inner and outer walls, the inner and outer wall point clouds are acquired simultaneously. After registration, the wall thickness distribution is calculated for each cross-section. The distance from the outer wall point to the inner wall point at the same angular position along the circumference is calculated, yielding the circumferential wall thickness distribution curve. The difference between the maximum and minimum circumferential wall thickness is taken as the wall thickness difference. The smaller the wall thickness difference, the more uniform the pipe wall thickness and the smaller the degree of eccentricity. For aerospace high-pressure pipes, hydraulic pipes, and other pipes that bear internal pressure, uneven wall thickness directly leads to stress concentration at weak points, which is one of the core hidden dangers that cause failure. Therefore, wall thickness difference, together with curvature and torsion, constitute a complete evaluation system for pipe quality.
[0126] In one possible embodiment, the specific judgment logic of the "barrel effect" principle in step S5 is as follows:
[0127] The curvature, the torsion, the outer diameter deviation, and the roundness error are compared with the corresponding thresholds in the grading judgment rule base to obtain the corresponding individual grades.
[0128] The lowest grade among all the individual grades is taken as the final quality grade of the pipe, which is formally expressed as: final grade = min(grade (curvature), grade (torsion), grade (outer diameter deviation), grade (roundness));
[0129] In the formula, min represents the minimum value operator, which selects the lowest level among the levels corresponding to the specified test index; each "level" function returns the quality level of the corresponding test index, including superior, first-class, qualified and unqualified products.
[0130] Specifically, the core logic of the "weakest link" principle is that the overall quality of a pipe is determined by its weakest indicator, rather than by averaging or optimizing all indicators. This is because in engineering applications, any defect in any indicator of the pipe can lead to assembly failure or service risks. For example, a pipe with acceptable curvature but severely excessive twisting may still fail to achieve circumferential alignment when flanged; a pipe with acceptable outer diameter and curvature but excessive roundness error may still pose a leakage risk when fitted with a sealing ring. Therefore, the final quality grade cannot be determined by a weighted average of all indicators, but must be based on the weakest link. The formal expression implemented using the min operator is essentially a lookup table operation to find the minimum value. Each individual parameter is compared with a threshold and mapped to a discrete set of grades (superior > first-class > qualified > unqualified). The minimum element in this set is the final grade. The judgment logic is concise, transparent, and highly interpretable. It ensures the rigor of quality judgment while avoiding ambiguity that may occur when multiple indicators overlap. It is particularly suitable for quality grading decisions that require speed, clarity, and unambiguity in industrial quality inspection scenarios. It is also the key judgment logic that enables this technical solution to achieve fully automated grading judgment.
[0131] One possible embodiment includes a visualization step of the detection results after step S5:
[0132] The registered measured point cloud data is overlaid with the standard CAD 3D model and displayed. The deviation value of each point in the measured point cloud data relative to the surface of the standard CAD 3D model is mapped to a set color using a pseudo-color deviation cloud map method, which shows the deformation distribution and local defect location of the entire surface of the pipe.
[0133] Specifically, visualization transforms abstract numerical parameters into intuitive visual information, greatly improving the readability and practicality of the test results. After registration, the system calculates the normal deviation value of each point in the measured point cloud to the surface of the standard CAD model. A positive deviation indicates that the location is bulging outward or larger, while a negative deviation indicates inward or smaller. The deviation values are mapped to a gradient of colors from cool (negative deviation) to warm (positive deviation) and overlaid on the 3D model of the pipe in the form of a cloud map, forming a deviation heatmap. This visualization method helps quality inspectors and technicians quickly identify the areas of the pipe surface with the most severe deformation and the most uneven deformation distribution (such as a depression on one side, a bulge in another, or the section with the largest twist), thereby assisting in determining the cause and type of deformation. For example, if a large area in the middle of the pipe shows a red or blue deviation, it may reflect bending deformation of the entire pipe; if a sudden color change occurs locally on one side, there may be local bumps or processing defects. This function not only provides an intuitive verification basis for quality judgment results but also provides a visual problem location tool for process improvement.
[0134] To verify the technical effectiveness of the present invention's method for detecting and classifying deformation in pipe machining based on three-dimensional point clouds, the following experimental scheme was designed and executed. The following details the experimental objectives, conditions, design and implementation process, results analysis, and conclusions.
[0135] I. Experimental Objectives and Design Concept
[0136] This experiment aims to comprehensively evaluate the invention from five dimensions: accuracy, efficiency, repeatability, full-size coverage, and graded reliability. Accuracy verification aims to confirm the consistency between the system's measurement results and those of a high-precision reference device (coordinate measuring machine), a core indicator for evaluating whether the inspection system can meet industrial application requirements. If the measurement deviation exceeds the allowable range, the system cannot replace traditional contact-based inspection methods. Efficiency verification aims to confirm whether the system can meet the online full-inspection requirements of high-speed machining production lines. Inspection speed is one of the key factors determining whether the system can be adopted by the production line. If the inspection time is too long, full inspection cannot be achieved, and only sampling inspection can be continued, failing to completely eliminate the risk of missed inspections. Repeatability verification aims to confirm the consistency of the system's output between different measurements (each re-clamping). Poor repeatability indicates that the system's measurement results are too greatly affected by random factors such as clamping deviations and environmental disturbances. Even if the absolute accuracy may meet the requirements, it will lose its reliability in actual production lines due to excessive batch-to-batch fluctuations. The purpose of full-size coverage verification is to confirm whether the system truly achieves "full-size inspection," that is, whether it covers all deformation information along the entire length and circumference of the pipe, rather than only collecting limited discrete sections as in traditional methods. This is the fundamental advantage of this invention compared to traditional inspection methods, and it must be objectively demonstrated through experiments. The purpose of grading accuracy verification is to confirm whether the entire process logic from measurement data to quality grade output is reliable. No matter how high the measurement accuracy, if there are defects in the grading logic, the final output quality grade may still be incorrect. Therefore, it is necessary to verify the performance of the "barrel effect" grading logic on real pipe samples.
[0137] II. Test Conditions and Equipment
[0138] 2.1 Test Equipment
[0139] Line laser scanner: Employing the principle of line structured light triangulation, this scanner boasts a scanning accuracy of 0.02mm (i.e., single-point measurement repeatability deviation not exceeding 0.02mm) and a scanning frame rate of 300 frames per second. The scanner projects laser lines onto the pipe surface, and a camera captures the deformation images of the laser lines on the pipe surface. The three-dimensional coordinates of each scanned point are calculated using triangulation principles.
[0140] Axial servo conveying fixture: Drives the pipe along its own axis at a uniform speed through the scanning area, with the conveying speed set at 0.3m / s. The fixture is equipped with a self-centering V-clamp to ensure that the axial direction of the pipe is consistent with the conveying direction during the conveying process, avoiding additional measurement errors caused by clamping misalignment.
[0141] Encoder and trigger unit: The encoder measures the axial displacement of the pipe in real time, and the trigger unit synchronously triggers the line laser scanner to collect data according to the pulse signal of the encoder, ensuring that the point cloud data corresponds accurately with the axial position of the pipe and avoiding data misalignment caused by the asynchrony between scanning and movement.
[0142] Industrial control computer and software system: Equipped with the point cloud preprocessing, two-level registration, deformation parameter calculation and grading determination software modules of the present invention, used to complete the entire process of data processing from the original point cloud input to the grading result output.
[0143] 2.2 Test Subjects
[0144] High-precision seamless steel tubing (grade 20 steel) for automobiles was selected as the test tubing. The tubing specifications were: nominal outer diameter 40mm, wall thickness 3mm, and effective length 1200mm. A total of 50 tubing samples were selected as test specimens, covering different degrees of deformation, including normal specimens (no obvious deformation), slightly deformed specimens (bending degree between 0.05% and 0.15%), and severely deformed specimens (bending degree exceeding 0.2% or twist exceeding 1.0° / m), to ensure the samples were representative and could fully verify the system's grading and judgment capabilities.
[0145] 2.3 Comparison with reference equipment
[0146] The curvature and torsion of 50 test pipes were calibrated individually using a coordinate measuring machine (CMM). The CMM collected discrete points on the pipe surface using a contact probe to calculate the axial deviation and cross-sectional angle with high precision. The measurement accuracy was 0.005 mm, far exceeding the accuracy requirements of the testing system described in this invention. The CMM calibration values served as the "true value" benchmark for this experiment, used to evaluate the measurement deviation of the system of this invention.
[0147] 2.4 Environmental Conditions
[0148] The experiment was conducted in a constant temperature and humidity laboratory environment, with the temperature controlled at 20±1℃ and the relative humidity at 50±5%. The purpose of maintaining a constant temperature environment was to reduce the interference of thermal expansion and contraction of the pipes caused by temperature changes on the measurement results and to ensure the reliability of the verification results.
[0149] III. Test Methods
[0150] Experiment 1: Measurement Accuracy Verification
[0151] Experiment implementation process:
[0152] The curvature and torsion of 50 pipes were measured one by one using a CMM, and the CMM measurement values of each pipe were recorded as the true reference values. During the CMM measurement, cross-sectional points were collected at 20mm intervals along the axial direction of each pipe, with 8 points evenly collected at each cross-section. The center of each cross-section was calculated by least squares fitting, and then the actual central axis and the maximum normal deviation were obtained and converted into curvature. The major axis directions of the ellipses of the two end cross-sections were fitted respectively, the included angle was calculated and converted into torsion.
[0153] The testing system described in this invention was used to test 50 pipes one by one. The testing process is as follows:
[0154] The pipe is fed into the scanning area at a constant speed via a conveyor fixture, and the scanner acquires the original 3D point cloud on the pipe surface. Statistical filtering denoising (k=30, α=2.5) and voxel mesh downsampling (L=0.1mm) are performed on the original point cloud. Random Sample Consistency (RANSAC) coarse registration aligns the measured point cloud with the axis of the standard CAD model, followed by improved Iterative Closest Point (ICP) fine registration (convergence threshold ε=1×10⁻⁶). -5 mm 2 (Maximum number of iterations: 30). Extract cross-sections at 5mm intervals along the pipe axis and fit the center of the circle to calculate the curvature; fit the major axis direction of the ellipse at both ends of the cross-section to calculate the twist.
[0155] The output values of the detection system of this invention are compared one by one with the CMM benchmark values to calculate the absolute error and relative error, and the mean absolute error, maximum absolute error, and root mean square error (RMSE) are statistically analyzed. The mean absolute error reflects the average deviation of the system's measured values from the true values and is a core indicator for measuring the overall accuracy of the system. The maximum absolute error reflects the maximum deviation of the system under extreme conditions and is used to determine whether the system has sporadic large errors. The root mean square error reflects the dispersion of the error and the overall level of deviation, and is more sensitive to large errors than the mean absolute error.
[0156] By comparing the system of this invention with the CMM, the absolute deviation of the system in measuring curvature and torsion can be directly quantified. Since the measurement accuracy of the CMM (0.005mm) is much higher than that of the system of this invention (0.02mm), the CMM value can be regarded as the true value. Therefore, the deviation between the system of this invention and the CMM value is the system measurement error.
[0157] Experiment 2: Verification of Detection Efficiency
[0158] Experiment implementation process:
[0159] Fifty pipes were inspected using a traditional contact-type inspection method (V-block + dial indicator). The specific operation was as follows: the pipes were placed on the V-block, and the axial deviation was measured point by point along the pipe axis at 50mm intervals using a dial indicator (the dial indicator position needed to be manually adjusted and the reading taken at each point). The curvature was then calculated manually. For torsion, multiple points along the circumference were measured at both ends of the cross-section, and the relative torsion angle between the cross-sections was calculated, making the measurement process more time-consuming. The total time for each pipe from clamping to completing the curvature and torsion measurements was recorded. The inspection system described in this invention was then used to inspect the 50 pipes. The entire process time, from pipe loading, scanning and acquisition, data preprocessing, registration calculation, deformation parameter calculation to graded output, was recorded. The system automatically recorded the time consumed in each step, which was logged by the industrial control computer system. A comparison of the single-pipe inspection time of the two methods showed a significant improvement in calculation efficiency.
[0160] In traditional contact-based inspection, the majority of the time is spent on manual operations (clamping, adjusting the dial indicator, reading, recording, and calculating). These steps cannot be parallelized and are significantly affected by the operator's experience. In contrast, the system of this invention consists primarily of automatic equipment operation and computer program calculations, which can be continuously accelerated through algorithm and hardware optimization. The efficiency improvement reflects the practical application potential of this invention in online inspection scenarios.
[0161] Experiment 3: Repeatability Verification
[0162] Experiment implementation process:
[0163] Ten pipes (covering different degrees of deformation) were randomly selected from 50 pipes and numbered from 1 to 10. Each pipe was tested five times using the testing system described in this invention. After each test, the pipe was removed from the conveying fixture, re-clamped, and tested again. The purpose of re-clamping is to simulate the actual working conditions of pipes entering the fixture from different positions on a production line, thereby evaluating the system's robustness to clamping deviations. The bending and twisting measurements of each pipe were recorded for each test, resulting in five sets of bending data and five sets of twisting data for each pipe. The mean and standard deviation (SD) of the five measurements for each pipe were calculated, as well as the coefficient of variation (CV, i.e., standard deviation / mean × 100%). A smaller coefficient of variation indicates lower dispersion and better repeatability of the measurement results.
[0164] During the measurement process, the position and orientation of the pipe relative to the scanner will change slightly each time it is re-clamped (although the tooling is designed to ensure positioning accuracy, absolute consistency is still impossible). If the system's registration algorithm and deformation calculation method are robust enough, these clamping deviations should be automatically compensated by the algorithm, and the measurement results should be basically consistent; otherwise, it indicates that the system is sensitive to clamping conditions and may produce batch-to-batch fluctuations in actual production line applications. Therefore, the essence of repeatability verification is to test the stability of the system under conditions of random disturbances.
[0165] Experiment 4: Full-size coverage verification
[0166] Experiment implementation process:
[0167] The test results of 50 pipes were analyzed one by one, and the following full-size parameters were statistically analyzed:
[0168] Curvature: Whether it covers the entire cross-section from one end of the pipe to the other;
[0169] Twist: Whether it covers the entire length;
[0170] Outer diameter deviation: Whether it covers the entire length and the 360° circumferential range of each cross section;
[0171] Roundness error: Whether it covers the entire length and the 360° circumferential range of each cross section;
[0172] Wall thickness difference: Whether it covers the entire length and the 360° circumferential range of each section (under the condition of simultaneous scanning of inner and outer walls).
[0173] The parameter coverage of the test results is visualized and verified using the system's built-in deviation cloud map. The continuity of the deviation cloud map in the pipe length direction and circumferential direction is observed to determine whether there are data gaps or detection blind spots.
[0174] Traditional contact-based inspection methods can only measure a limited number of discrete cross-sections (such as the ends and midpoint) along the pipe's axial direction. For localized deformation defects outside the inspection cross-section (such as localized depressions or protrusions), traditional methods are completely ineffective. The fundamental advantage of this invention, based on 3D point cloud inspection, lies in its continuity; that is, each cross-section and each circumferential angle has corresponding point cloud data involved in the calculation. The purpose of full-size coverage verification is to confirm whether this invention truly achieves "blind-spot-free inspection." Especially for spatial deformation parameters such as curvature and torsion, which rely on data from the entire length, ensuring data continuity is crucial to guaranteeing the reliability of the results.
[0175] Experiment 5: Verification of the accuracy of grading determination
[0176] Experiment implementation process:
[0177] The threshold values for the enterprise's internal control quality grading rule base are set as follows:
[0178] Superior grade: Bending degree ≤ 0.05%, Twist degree ≤ 0.3° / m
[0179] First-class product: Bending degree ≤ 0.1%, Twist degree ≤ 0.5° / m
[0180] Qualified products: Bending degree ≤ 0.2%, Twist degree ≤ 1.0° / m
[0181] Products exceeding any of the above thresholds are considered non-conforming.
[0182] Substituting the CMM baseline values of 50 pipes into the aforementioned grading threshold, the "true quality grade" of each pipe is obtained (determined manually based on the CMM baseline value, serving as a reference). The automatic grading results of the 50 pipes in the testing system described in this invention are output and compared with the "true quality grade" for each pipe to calculate the grading accuracy. If the grading result of a certain pipe is inconsistent with the true grade, further analysis is conducted to determine the source of the grading error (whether it is a measurement error causing parameter deviation, or a defect in the grading logic itself).
[0183] IV. Experimental Results and Data Analysis
[0184] Results of Experiment 1
[0185] Statistical analysis was performed on the measurement data of 50 pipes, and the results are shown in Table 1:
[0186] Table 1 Measurement accuracy verification results
[0187]
[0188] See Figure 3 As shown in Table 1, the average absolute error of the curvature measurement is 0.0025%, which is the average value of the absolute deviation of the curvature. This value is much smaller than the design requirement (the accuracy corresponding to a curvature measurement accuracy ≤0.02mm, which, after conversion based on an outer diameter of 40mm, requires a curvature percentage accuracy of ≤0.05%). The maximum absolute error among the 50 pipes is 0.005%, still better than the design specifications. The RMSE is 0.003%, close to the average absolute error, indicating that the error distribution is concentrated and there are no large outliers. The average absolute error of the twist measurement is 0.012° / m, much smaller than the design requirement (the accuracy corresponding to a twist ≤0.1°, i.e., ≤0.083° / m). The maximum absolute error is 0.025° / m, and the RMSE is 0.015° / m, similarly indicating that the error distribution is concentrated and the measurement results are stable.
[0189] Results of Experiment 2
[0190] Table 2 shows a comparison of the detection time between traditional contact detection and the system of this invention:
[0191] Table 2 Comparison of Detection Efficiency
[0192]
[0193] See Figure 4 As shown in Table 2, in traditional contact-type detection methods, clamping takes approximately 30 seconds, and point-by-point measurement along the axial direction at 50mm intervals (approximately 24 points, each requiring manual adjustment of the dial indicator, reading, and recording, approximately 5-6 seconds per point) takes 120-150 seconds. Data calculation and recording take approximately 60 seconds, totaling approximately 240 seconds (4 minutes). In the detection system described in this invention, point cloud acquisition takes approximately 4 seconds, data preprocessing approximately 1 second, coarse registration approximately 1 second, fine registration approximately 2 seconds, deformation parameter calculation approximately 2 seconds, grading judgment approximately 1 second, and report generation approximately 1 second, totaling approximately 12 seconds.
[0194] Results of Experiment 3
[0195] The statistical analysis results of 5 repeated tests on each of the 10 pipes are shown in Table 3:
[0196] Table 3 Repeatability Validation Results
[0197]
[0198] See Figure 5 As shown in Table 3, the standard deviation of the curvature measurement ranges from 0.0010% to 0.0016%, which translates to an absolute deviation of approximately 0.0004 to 0.00064 mm (based on an outer diameter of 40 mm), far less than the system scanning accuracy of 0.02 mm. The coefficient of variation fluctuates significantly (0.9% to 20.0%), mainly because the absolute value of the curvature of some pipes is extremely small (e.g., the curvature of pipe #8 is only 0.005%), resulting in a very small denominator and thus amplifying the value of the coefficient of variation. However, even for these pipes, the absolute standard deviation remains at an extremely low level (0.0010%), which is negligible in actual engineering. The standard deviation of the torsion measurement ranges from 0.007° / m to 0.012° / m, which translates to an angle of approximately 0.008 to 0.014°, also far less than the design specifications. The reason for the large fluctuation in the coefficient of variation is the same as for the curvature; the smaller the absolute value of the torsion, the greater the relative fluctuation, but the absolute deviations are all controlled at extremely low levels.
[0199] Results of Experiment 4
[0200] The test results of 50 pipes were systematically analyzed, and the parameter coverage is shown in Table 4:
[0201] Table 4 Full-size parameter coverage
[0202]
[0203] See Figure 6 As shown in Table 4, the curvature calculation is based on a cross-section every 5mm along the axial direction, generating 240 cross-sections for a total effective length of 1200mm. The line connecting the centers of each cross-section forms the actual axis, covering the entire effective length of the pipe. There are no data gaps. The torsion is calculated based on the major axis of the ellipse of the two end cross-sections. The data for the two end cross-sections is complete, and since the torsion is defined as relative torsion at both ends, no intermediate cross-section is needed, ensuring full-length coverage. The outer diameter deviation and roundness error are based on the circumferential point cloud of each cross-section, covering 360°. Each cross-section is fitted with dozens of circumferential points, ensuring a sufficient number of cross-sections and no blind spots. After configuring simultaneous scanning of the inner and outer walls, the wall thickness difference also covers the entire length and circumference, calculating the difference between the maximum and minimum values of the wall thickness along the circumference. The point cloud acquisition in the area at both ends of the pipe (within approximately 3mm of the end face) may be incomplete due to obstruction by the clamping fixture. However, this area is usually not included in the effective length range in engineering (effective length refers to the length between the reference cross-sections at both ends of the pipe), therefore it does not affect the calculation of the core deformation parameters. Except for the clamping areas at both ends, the main body of the pipe is completely covered along its entire length and circumference, with no blind spots in the detection.
[0204] Results of Experiment 5
[0205] The grading results of 50 pipes are shown in Table 5:
[0206] Table 5. Verification Results of Accuracy of Grading Judgment
[0207]
[0208] See Figure 7 As shown in Table 5, the grading results of this invention for 50 pipes are completely consistent with the grading results of the CMM benchmark, achieving an accuracy rate of 100%. During the grading process, the system strictly adheres to the "barrel effect" principle: for each pipe, the individual grades for curvature, twist, outer diameter deviation, and roundness error are calculated separately, and the lowest grade among all individual grades is taken as the final grade. The execution method of this logic is completely consistent with the theoretical design, and there are no logical loopholes. Among the 21 superior-grade pipes, some pipes had certain indicators close to the upper limit of superior grade, for example, curvature of 0.048%, while the upper limit of superior grade is 0.05%. The system still accurately identified and judged them as superior-grade, verifying the accuracy of the system's threshold comparison. Among the 4 unqualified pipes, 2 were due to excessive curvature (>0.2%), and the other 2 were due to excessive twist (>1.0° / m). The system accurately identified and judged them as unqualified, indicating that the system can correctly grade pipes with severely excessive single indicators.
[0209] V. Experimental Conclusions
[0210] The detection system described in this invention controls the measurement error of bending to within 0.005% (average absolute error 0.0025%) and the measurement error of torsion to within 0.025° / m (average absolute error 0.012° / m), which is highly consistent with the CMM high-precision benchmark value. The system maintains stable measurement accuracy for each test pipe under different degrees of deformation, demonstrating reliable high-precision measurement capabilities for the two core parameters of bending and torsion.
[0211] The inspection time for a single pipe is approximately 12 seconds, compared to about 240 seconds for traditional contact inspection, representing a 20-fold increase in efficiency. Based on an inspection cycle of 5 pipes per minute, this meets the cycle time requirements for online full inspection on high-speed machining production lines. The fully automated process requires no manual intervention, which helps reduce labor costs and minimize human error.
[0212] The measurement results obtained by this invention under repeated clamping conditions exhibit extremely high repeatability, with the standard deviation of bending measurement controlled within 0.0016% and the standard deviation of torsion measurement controlled within 0.012° / m. Although the coefficient of variation may be relatively large for individual pipes due to the extremely small absolute value of deformation, the absolute standard deviation remains at an extremely low level. The system demonstrates excellent robustness to random factors such as clamping deviation and environmental noise, making it suitable for continuous testing scenarios on production lines.
[0213] This invention enables continuous detection of all dimensional parameters, including curvature, twist, outer diameter deviation, roundness error, and wall thickness difference, along the entire length and circumference of the pipe, without any blind spots. The visualized output of the deviation cloud map intuitively verifies the continuity and completeness of the detection, fundamentally solving the risk of missed detection caused by traditional methods that can only measure a limited discrete cross-section.
[0214] The automatic grading results of this invention are completely consistent with the CMM benchmark grading results, with a grading accuracy of 100%. The grading judgment logic based on the "barrel effect" principle has been effectively verified on real pipe samples, with sufficient differentiation between each grade, and can reliably output the final quality grade.
[0215] In summary, this invention has excellent technical effects in terms of detection accuracy, detection efficiency, repeatability and stability, full-size detection capability and grading accuracy. It can effectively replace the existing traditional contact detection method and meet the engineering needs of intelligent manufacturing production lines for online full-size detection and grading control of pipe deformation.
[0216] Example 2
[0217] See Figure 8 Embodiment 2 of the present invention also provides a pipe machining deformation detection and grading system based on three-dimensional point clouds, used to implement the pipe machining deformation detection and grading method based on three-dimensional point clouds described in the above embodiments, including:
[0218] The standard model and grading rule preprocessing module 100 is used to import the standard CAD three-dimensional model of the pipe to be tested, extract the standard center axis, the reference sections at both ends, the nominal outer diameter and the effective length of the standard CAD three-dimensional model as reference feature parameters; and configure and set the upper limit threshold of the allowable bending degree and the upper limit threshold of the allowable torsion degree corresponding to the preset quality grading standard to form a grading judgment rule library.
[0219] The pipe surface three-dimensional point cloud data acquisition and preprocessing module 200 is used to collect the original three-dimensional point cloud data of the entire circumference of the pipe by using a line laser scanning device in conjunction with an axial conveying fixture to make the pipe pass through the scanning area at a uniform speed along its own axis; and to perform statistical filtering noise reduction processing and voxel mesh downsampling processing on the original three-dimensional point cloud data to obtain regular pipe surface measured point cloud data.
[0220] The multi-level registration module 300 for point cloud and standard CAD model is used to extract the actual center axis of the pipe from the measured point cloud data based on the measured point cloud data and the standard CAD 3D model, and to spatially align the actual center axis with the standard center axis to complete the initial coordinate transformation and achieve coarse registration. Based on the coarse registration, an improved iterative nearest point algorithm with normal vector constraints is adopted to iteratively optimize the algorithm with the goal of minimizing the sum of squared distances from the point to the surface, so as to obtain the optimal coordinate transformation matrix and complete the registration of the measured point cloud and the standard CAD 3D model.
[0221] The spatial deformation parameter calculation module 400 is used to extract the cross-sectional point cloud of the measured point cloud at equal intervals along the pipe axis based on the registered point cloud data and the standard CAD 3D model, fit the center of each cross-section to obtain the actual central axis, calculate the maximum normal deviation between the actual central axis and the standard central axis and divide it by the effective length to obtain the curvature; extract the major axis direction of the ellipse of the cross-sections at both ends of the pipe, calculate the spatial angle between the major axis directions at both ends and divide it by the effective length to obtain the twist per unit length; and calculate the outer diameter deviation and roundness error of each cross-section.
[0222] The quality grading output module 500 is used to compare the calculated curvature, twist, outer diameter deviation, and roundness error with the corresponding thresholds in the grading rule base one by one. Based on the barrel effect principle, the lowest level among all test indicators is taken as the final quality level, a standardized test report and grading results are output, and the test data is uploaded to the production management system.
[0223] It should be noted that the information interaction and execution process between the modules of the above system are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.
[0224] Example 3
[0225] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores program code for a method for detecting and classifying deformation of pipe machining based on three-dimensional point clouds, the program code including instructions for executing the method for detecting and classifying deformation of pipe machining based on three-dimensional point clouds as described in Embodiment 1 or any possible implementation thereof.
[0226] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0227] Example 4
[0228] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0229] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can call the program instructions to execute the pipe machining deformation detection and grading method based on three-dimensional point cloud according to Embodiment 1 or any possible implementation thereof.
[0230] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.
[0231] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0232] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0233] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A method for detecting and classifying deformation in pipe machining based on 3D point clouds, characterized in that, Includes the following steps: S1. Import the standard CAD 3D model of the pipe to be tested, and extract the standard center axis, the reference sections at both ends, the nominal outer diameter and the effective length of the standard CAD 3D model as reference feature parameters; according to the preset quality grading standard, configure and set the upper limit threshold of the allowable bending degree and the upper limit threshold of the allowable torsion degree corresponding to the quality grade to form a grading judgment rule library; S2. Using a line laser scanning device in conjunction with an axial conveying fixture, the pipe is made to pass through the scanning area at a uniform speed along its own axis, and the original three-dimensional point cloud data of the entire circumference of the pipe is collected; statistical filtering and denoising processing and voxel mesh downsampling processing are performed on the original three-dimensional point cloud data to obtain regular measured point cloud data of the pipe surface. S3. Based on the measured point cloud data and the standard CAD 3D model, the actual center axis of the pipe is extracted from the measured point cloud data using a random sampling consensus algorithm. The actual center axis is then spatially aligned with the standard center axis to complete the initial coordinate transformation and achieve coarse registration. Based on the coarse registration, an improved iterative nearest point algorithm with normal vector constraints is adopted to iteratively optimize the algorithm with the goal of minimizing the sum of squared distances from the point to the surface, thereby obtaining the optimal coordinate transformation matrix and completing the registration between the measured point cloud and the standard CAD 3D model. S4. Based on the registered point cloud data and the standard CAD 3D model, extract the cross-sectional point cloud of the measured point cloud at equal intervals along the pipe axis, fit the center of each cross-section to obtain the actual central axis, calculate the maximum normal deviation between the actual central axis and the standard central axis and divide it by the effective length to obtain the curvature; extract the major axis direction of the ellipse of the cross-sections at both ends of the pipe, calculate the spatial angle between the major axis directions at both ends and divide it by the effective length to obtain the twist per unit length; calculate the outer diameter deviation and roundness error of each cross-section. S5. The calculated curvature, twist, outer diameter deviation and roundness error are compared one by one with the corresponding thresholds in the grading judgment rule base. Based on the barrel effect principle, the lowest level among all test indicators is taken as the final quality level. A standardized test report and grading results are output, and the test data is uploaded to the production management system.
2. The method for detecting and classifying deformation of pipes during machining based on three-dimensional point clouds according to claim 1, characterized in that, In step S2, the specific method for statistical filtering denoising is as follows: For each point in the original 3D point cloud data Take it Calculate the average neighborhood distance using the nearest neighbor points: , Calculate the global mean of the average neighborhood distances of all points. and standard deviation : , , If the average neighborhood distance of a certain point satisfies If the point is an outlier, it is considered a noise point and is removed. In the formula, This indicates the first element in the original 3D point cloud data. The position coordinates of each scan point in three-dimensional space; This indicates the number of nearest neighbors that participated in the neighborhood statistics; Indicates the first The scan point and the first The linear spatial distance between the nearest neighbors; Indicates the first Average neighborhood distance of each scan point; This represents the global mean of the average neighborhood distances of all scanned points; This represents the standard deviation of the average neighborhood distance of all scanned points. This indicates the total number of scan points contained in the original 3D point cloud data; This represents the adjustment coefficient used to adjust the stringency of outlier detection; In step S2, the specific method for the voxel grid downsampling process is as follows: Based on voxel side length The three-dimensional space is divided into a uniform cubic grid. For all points falling within the same cubic grid, the centroid coordinates are calculated as the representative point of that grid.
3. The method for detecting and classifying deformation of pipes during machining based on three-dimensional point clouds according to claim 1, characterized in that, In step S3, the specific process of coarse registration is as follows: Based on the random sampling consensus algorithm, three points are randomly selected from the measured point cloud to fit a cylindrical surface. The direction of the cylinder axis is iteratively solved, and the axis with the most internal points is selected as the actual central axis. The actual central axis is rotated and translated to coincide with the standard central axis, so that the initial translation deviation is less than 1 mm and the initial rotation deviation is less than 1°. The actual center axis represents the direction of the true spatial axis of the pipe obtained by fitting, and is a dimensionless direction vector; the initial translation deviation represents the spatial offset between the two axes; the initial rotation deviation represents the angular deviation between the two axes.
4. The method for detecting and classifying deformation of pipes based on three-dimensional point clouds according to claim 1, characterized in that, In step S3, the objective function of the improved iterative nearest point algorithm is: , In the formula, This represents the rotation matrix to be solved, used to rotate the attitude of the measured point cloud to be consistent with the standard CAD 3D model; This represents the translation vector to be solved, used to translate the overall position of the measured point cloud to coincide with the standard CAD 3D model; The first point in the measured point cloud represents the... The three-dimensional coordinates of each scan point; express The 3D coordinates of the nearest neighbor point in a standard CAD 3D model point cloud; This represents the total number of scan points in the measured point cloud that participated in the registration; The Euclidean norm represents the three-dimensional space and is used to calculate the straight-line distance between two points. The objective function value represents the registration error, and its numerical value reflects the sum of the squared distances between all nearest neighbor pairs in the current registration state. This represents the threshold for determining iterative convergence; the change in the objective function value between two consecutive iterations is less than a preset threshold. Stop iterating when the time comes.
5. The method for detecting and classifying deformation of pipes during machining based on three-dimensional point clouds according to claim 1, characterized in that, In step S4, the curvature is calculated as follows: Along the axial direction of the pipe at intervals Extract the cross sections, and use least squares to fit the center coordinates of each cross section to obtain the sequence of center points of the cross sections. Fit the sequence of center points of the cross sections to obtain the actual central axis. Calculate the normal distance from the center point of each section to the actual central axis: , Take the maximum normal deviation The curvature is ; In the formula, Indicates the first extraction along the axial direction The three-dimensional coordinates of the center point of the cross section obtained by fitting in each cross section; This represents the three-dimensional coordinates of any reference point on the actual central axis; The unit direction vector representing the actual central axis; Represents the cross product operation of three-dimensional vectors; Indicates the first The vertical normal distance from the center point of each cross section to the actual center axis; This indicates the effective length of the pipe to be tested.
6. The method for detecting and classifying deformation of pipes during machining based on three-dimensional point clouds according to claim 1, characterized in that, In step S4, the twist degree is calculated as follows: Extract point cloud data from the cross-sections at both ends of the pipe, and fit the major axis direction vectors of the ellipse at each end of the cross-section. and ; Calculate the spatial angle between the two ends along their major axes: , Will Converted to angles The conversion relationship is as follows: ; The degree of distortion is ; In the formula, This represents the unit vector along the major axis of the ellipse fitted to the cross-section at one end of the pipe. This represents the unit vector along the major axis of the ellipse fitted to the cross-section at the other end of the pipe. The spatial angle between the major axes of the two end sections, expressed in radians; This represents the value after converting the spatial angle from radians to degrees; Pi is a constant. The effective length of the pipe to be tested is expressed as a value in meters; the torsion degree is expressed as the relative torsional angle between the two ends of the pipe per unit length.
7. The method for detecting and classifying deformation of pipes based on three-dimensional point clouds according to claim 1, characterized in that, Step S4 also includes wall thickness difference detection: If the inner and outer wall synchronous scanning function is configured, the point cloud data of the inner wall of the pipe will be acquired synchronously, and the difference between the maximum and minimum values of the wall thickness along the circumference of the pipe will be calculated as the evaluation index of wall thickness uniformity. The wall thickness difference represents the difference between the maximum and minimum circumferential wall thickness of the same cross section of the pipe, and is used to evaluate the uniformity of the pipe wall thickness.
8. The method for detecting and classifying deformation of pipes during machining based on three-dimensional point clouds according to claim 1, characterized in that, In step S5, the specific judgment logic of the "barrel effect" principle is as follows: The curvature, the torsion, the outer diameter deviation, and the roundness error are compared with the corresponding thresholds in the grading judgment rule base to obtain the corresponding individual grades. The lowest grade among all the individual grades is taken as the final quality grade of the pipe, which is formally expressed as: final grade = min(grade (curvature), grade (torsion), grade (outer diameter deviation), grade (roundness)); In the formula, min represents the minimum value operator, which selects the lowest level among the levels corresponding to the specified test index; each "level" function returns the quality level of the corresponding test index, including superior, first-class, qualified and unqualified products.
9. The method for detecting and classifying deformation of pipes during machining based on three-dimensional point clouds according to claim 1, characterized in that, Following step S5, the process also includes a step to visualize the detection results: The registered measured point cloud data is overlaid with the standard CAD 3D model and displayed. The deviation value of each point in the measured point cloud data relative to the surface of the standard CAD 3D model is mapped to a set color using a pseudo-color deviation cloud map method, which shows the deformation distribution and local defect location of the entire surface of the pipe.
10. A pipe machining deformation detection and grading system based on three-dimensional point clouds, used to implement the pipe machining deformation detection and grading method based on three-dimensional point clouds as described in any one of claims 1 to 9, characterized in that, include: The standard model and grading rule preprocessing module is used to import the standard CAD three-dimensional model of the pipe to be tested, and extract the standard center axis, the reference sections at both ends, the nominal outer diameter and the effective length of the standard CAD three-dimensional model as reference feature parameters; according to the preset quality grading standard, the module configures and sets the upper limit threshold of the allowable bending degree and the upper limit threshold of the allowable torsion degree corresponding to the quality level, forming a grading judgment rule library; The pipe surface three-dimensional point cloud data acquisition and preprocessing module is used to collect the original three-dimensional point cloud data of the entire circumference of the pipe by using a line laser scanning device in conjunction with an axial conveying fixture to make the pipe pass through the scanning area at a uniform speed along its own axis; and to perform statistical filtering noise reduction processing and voxel mesh downsampling processing on the original three-dimensional point cloud data to obtain regular pipe surface measured point cloud data. The multi-level registration module between point cloud and standard CAD model is used to extract the actual center axis of the pipe from the measured point cloud data based on the measured point cloud data and the standard CAD 3D model, and to spatially align the actual center axis with the standard center axis to complete the initial coordinate transformation and achieve coarse registration. Based on the coarse registration, an improved iterative nearest point algorithm with normal vector constraints is adopted to iteratively optimize the algorithm with the goal of minimizing the sum of squared distances from the point to the surface, so as to obtain the optimal coordinate transformation matrix and complete the registration between the measured point cloud and the standard CAD 3D model. The spatial deformation parameter calculation module is used to extract the cross-sectional point cloud of the measured point cloud at equal intervals along the pipe axis based on the registered point cloud data and the standard CAD 3D model, fit the center of each cross-section to obtain the actual central axis, calculate the maximum normal deviation between the actual central axis and the standard central axis and divide it by the effective length to obtain the curvature; extract the major axis direction of the ellipse of the cross-sections at both ends of the pipe, calculate the spatial angle between the major axis directions at both ends and divide it by the effective length to obtain the twist per unit length; and calculate the outer diameter deviation and roundness error of each cross-section. The quality grading judgment output module is used to compare the calculated curvature, twist, outer diameter deviation and roundness error with the corresponding thresholds in the grading judgment rule base one by one, and take the lowest level among all test indicators as the final quality level based on the barrel effect principle, output a standardized test report and grading results, and upload the test data to the production management system.