Method for straightening a curved wire axis based on a three-dimensional point cloud and related device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JIAOTONG UNIV
- Filing Date
- 2026-07-01
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]然而由于制造工艺等因素,钢丝自身沿长度方向不可避免的存在轻微弯曲或扭转,扫描得到的点云分布常伴随轴线弯曲与扭转,已有分析方法难以精准考虑该轴线切向变化及截面倾角变化,导致在计算绝对腐蚀深度时易产生累积误差
[0012]本示例中,提供一种基于三维点云的弯曲钢丝轴线拉直方法,首先通过主成分分析确定钢丝的初始轴向与参考原点;然后沿初始轴向进行粗切片,将粗切片获得的局部点集投影到二维平面进行圆拟合,并迭代剔除离群点,以得到钢丝中心线的离散点集,有效抑制了腐蚀凹坑和扫描噪声对中心线提取的干扰;然后对中心线离散点集进行平滑拟合与弧长参数化,生成沿中心线均匀分布的细切片站位,确保拉直后的点云在长度方向上严格反映钢丝的真实弧长;进一步的,基于平行移动传输构造与当前切向正交且沿弧长连续变化的稳定截面坐标系,避免了截面坐标系沿中心线发生不必要的自转,抑制了拉直后点云的螺旋扭曲;最后,在稳定截面坐标系中将原始点云映射到拉直坐标系下,输出标准化拉直点云。能够精确消除钢丝自身弯曲和扭转对点云分布的影响,为后续腐蚀深度计算提供了无弯曲、无扭曲的基准点云,从根本上避免了因轴线切向变化和截面倾角变化导致的累积误差,显著提高了腐蚀评估的准确性和可靠性。
Smart Images

Figure CN122530285A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, specifically to a method and related apparatus for straightening the axis of a bent steel wire based on three-dimensional point clouds. Background Technology
[0002] With the increasing demand for long-span bridges driven by the development of my country's transportation infrastructure, cable-stayed and suspension bridges, as representatives of cable-stayed systems, are widely used in complex environments such as marine and mountainous areas due to their advantages such as large spans, excellent seismic and wind resistance, and strong adaptability to construction methods, making them the preferred choice for large-span bridge design. However, the steel wires inside bridge cables are prone to corrosion due to damage and aging of the outer sheath in the service environment. The stress concentration caused by localized pitting and cross-sectional reduction due to corrosion will significantly affect the load-bearing capacity and safety reserve of the steel wires. Therefore, accurate assessment of existing damage to cable wires is of great significance for the safe service and hazard warning of bridges.
[0003] However, due to factors such as manufacturing process, the steel wire itself inevitably has slight bending or twisting along its length. The point cloud distribution obtained by scanning is often accompanied by axial bending and twisting. Existing analysis methods are difficult to accurately consider the tangential changes of this axis and the changes in the cross-sectional inclination angle, which easily leads to cumulative errors when calculating the absolute corrosion depth. Summary of the Invention
[0004] This application provides a method and related apparatus for straightening the axis of a bent steel wire based on a three-dimensional point cloud. It can accurately eliminate the influence of the bending and twisting of the steel wire itself on the point cloud distribution, providing a reference point cloud without bending or twisting for subsequent corrosion depth calculation. It fundamentally avoids the cumulative error caused by changes in the tangential direction of the axis and the inclination angle of the cross section, and significantly improves the accuracy and reliability of corrosion assessment.
[0005] A first aspect of this application provides a method for straightening the axis of a bent steel wire based on a three-dimensional point cloud, the method comprising: Acquire three-dimensional point cloud data of the outer surface of the rusted steel wire sample to be tested, and form a three-dimensional point cloud set of the outer surface. Based on the three-dimensional point cloud of the outer surface, determine the initial axial unit vector and the reference origin; A coarse slice is made along the initial axis. The local point set obtained from the coarse slice is projected onto a two-dimensional plane and fitted with a circle to obtain the center point of the three-dimensional section, forming a discrete point set of the steel wire centerline. The discrete point set of the steel wire centerline is smoothed and parameterized with arc length to generate fine slice stations that are uniformly distributed along the centerline. Based on the fine slice location, a stable cross-sectional coordinate system orthogonal to the current tangential direction and continuously varying along the arc length is constructed based on parallel movement transmission, and the three-dimensional point cloud set of the outer surface is mapped to the straightened coordinate system to obtain a standardized straightened point cloud.
[0006] In one possible implementation, determining the initial axial unit vector and reference origin based on the three-dimensional point cloud of the outer surface includes: The point cloud average value is calculated based on the three-dimensional point cloud set on the outer surface to obtain the centroid coordinates of the point cloud; Construct the point cloud covariance matrix based on the centroid coordinates of the point cloud; The point cloud covariance matrix is subjected to eigenvalue decomposition to obtain eigenvalues; The eigenvector corresponding to the largest eigenvalue is selected from the eigenvalues as the initial axial unit vector, and the centroid coordinates of the point cloud are used as the reference origin for defining the axial projection parameters.
[0007] In one possible implementation, the step of coarsely slicing along the initial axial direction, projecting the local point set obtained from the coarse slice onto a two-dimensional plane for circle fitting, and obtaining the center point of the three-dimensional section to form a discrete point set of the wire centerline includes: Using the initial axial unit vector as a length direction reference and the reference origin as a starting reference, each surface point in the three-dimensional point cloud of the outer surface is projected along the initial axial direction to obtain the scalar position parameters of the corresponding surface point in the axial direction. The initial axial unit vector is used as the normal vector to determine the axial midpoint of the coarse slice; Based on the axial midpoint of the coarse slice, a three-dimensional local point set is selected from the three-dimensional point cloud data of the outer surface; Construct a two-dimensional cross-sectional coordinate system perpendicular to the initial axial unit vector; Using the midpoint of the coarse slice as the origin of the new cross section, the surface points in the three-dimensional local point set are projected onto their respective two-dimensional cross sections to obtain the corresponding two-dimensional coordinates, thus obtaining a planar point set that approximates a circle. An initial circle fit is performed on the set of planar points, and outliers are removed to obtain the coordinates of the center of the circle in the two-dimensional cross-sectional plane. Using the position of the origin of the new cross section in three-dimensional space as a reference, and combining the two orthogonal basis vectors in the cross section plane, the coordinates of the two-dimensional circle center in the cross section plane are converted back into three-dimensional space coordinates to obtain the three-dimensional cross section center points distributed along the length of the wire. The center points of the three-dimensional cross-sections are arranged in order of their corresponding axial position parameters to obtain a discrete set of points for the center line of the steel wire.
[0008] In one possible implementation, the step of filtering a three-dimensional local point set from the three-dimensional point cloud data of the outer surface based on the axial midpoint of the coarse slice includes: Half the thickness of the coarse slice is taken on each side of the midpoint of the axial direction of the coarse slice and extended to obtain a three-dimensional thin slice region. Extract all surface points of the three-dimensional thin-slice region to obtain a three-dimensional local point set.
[0009] In one possible implementation, the step of performing initial circle fitting on the planar point set, removing outliers, and obtaining the center coordinates of the circle in the two-dimensional cross-sectional plane includes: The initial circle is fitted to the set of points in the plane to obtain the initial circle center and radius parameters; Based on the radial deviation of the planar point set relative to the fitted circle, the planar point set is robustly screened to obtain interior points that meet the preset discrimination conditions; Based on the inlier points, a new circle fit is performed, outliers are removed, and the coordinates of the circle center in the two-dimensional cross-sectional plane are obtained.
[0010] In one possible implementation, the step of smoothing and parameterizing the discrete point set of the steel wire centerline to generate fine-slice stations uniformly distributed along the centerline includes: The center points of the three-dimensional cross-section are arranged in axial order to form a discrete set of centerline points, and then smoothed and fitted to obtain a continuous steel wire centerline. Sampling points are selected along the continuous center line. The spatial distance between adjacent sampling points is calculated and accumulated along the center line to obtain the arc length value of each sampling point and the total arc length of the entire center line. Using the arc length value of each sampling point as the true coordinate of the wire length direction, multiple fine slice stations are generated sequentially on the center line according to the set arc length step.
[0011] In one possible implementation, the step of constructing a stable cross-sectional coordinate system orthogonal to the current tangential direction and continuously varying along the arc length based on the fine-slice station location and parallel movement transmission, and mapping the three-dimensional point cloud set of the outer surface to the straightened coordinate system to obtain a standardized straightened point cloud includes: Based on the fine slice station locations, calculate the derivative vector of the centerline at each station location and normalize it to obtain the tangent vector of the corresponding station location; The cross-sectional basis vector of the previous station is transmitted between adjacent stations by using minimum rotation as the tangential direction changes, and the transmission result is orthogonalized and normalized to obtain the stable cross-sectional basis vector of the current station. Centered on the centerline point of the station, a fine slice thickness is set along the local length direction, and surface points falling within the thickness range are extracted as the local cross-sectional point set of the current station. For surface points in the local cross-section point set, with the station centerline point as the local origin, calculate the relative displacement, and decompose the displacement into two orthogonal directions in the local length direction and the cross-section plane to obtain three components in the local coordinate system. Using the arc length position of the current station on the center line as the axial principal coordinate, and combining the displacement components of the surface points in the local length direction to generate the straightened axial coordinate, and using the two components in the cross-sectional plane as the point cloud coordinates of the straightened coordinate system, a standardized straightened point cloud is obtained.
[0012] This example provides a method for straightening the axis of a bent steel wire based on a 3D point cloud. First, the initial axis and reference origin of the steel wire are determined through principal component analysis. Then, coarse slices are made along the initial axis, and the local point set obtained from the coarse slices is projected onto a 2D plane for circle fitting. Outliers are iteratively removed to obtain a discrete point set of the steel wire's centerline, effectively suppressing the interference of corrosion pits and scanning noise on the centerline extraction. Next, the discrete point set of the centerline is smoothed and parameterized with arc length to generate fine slice positions uniformly distributed along the centerline, ensuring that the straightened point cloud strictly reflects the true arc length of the steel wire in the length direction. Furthermore, a stable cross-sectional coordinate system orthogonal to the current tangential direction and continuously changing along the arc length is constructed based on parallel translation transmission, avoiding unnecessary rotation of the cross-sectional coordinate system along the centerline and suppressing the spiral distortion of the straightened point cloud. Finally, the original point cloud is mapped to the straightening coordinate system in the stable cross-sectional coordinate system to output a standardized straightened point cloud. It can accurately eliminate the influence of the bending and twisting of the steel wire itself on the point cloud distribution, providing a bending-free and twist-free benchmark point cloud for subsequent corrosion depth calculation. It fundamentally avoids the cumulative error caused by changes in axial tangential and cross-sectional inclination, and significantly improves the accuracy and reliability of corrosion assessment.
[0013] A second aspect of this application provides a system for straightening the axis of a bent steel wire based on a three-dimensional point cloud, the system comprising: The first module is used to acquire the three-dimensional point cloud data of the outer surface of the rusted steel wire sample to be tested, and form a three-dimensional point cloud set of the outer surface. The second module is used to determine the initial axial unit vector and the reference origin based on the three-dimensional point cloud of the outer surface; The third module is used to perform coarse slicing along the initial axis, project the local point set obtained from the coarse slicing onto a two-dimensional plane for circle fitting, obtain the center point of the three-dimensional section, and form a discrete point set of the steel wire centerline. The fourth module is used to perform smooth fitting and arc length parameterization on the discrete point set of the steel wire centerline to generate fine slice stations that are uniformly distributed along the centerline. The fifth module is used to construct a stable cross-sectional coordinate system based on the fine slice station location and parallel movement transmission, which is orthogonal to the current tangential direction and continuously changes along the arc length, and to map the three-dimensional point cloud set of the outer surface onto the straightened coordinate system to obtain a standardized straightened point cloud.
[0014] A third aspect of this application provides a terminal including a processor, an input device, an output device, and a memory, wherein the processor, input device, output device, and memory are interconnected, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the step instructions as described in the method for straightening the axis of a bent steel wire based on a three-dimensional point cloud in the first aspect of this application.
[0015] A fourth aspect of this application provides a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the method for straightening the axis of a bent steel wire based on a three-dimensional point cloud in the first aspect of this application.
[0016] A fifth aspect of this application provides a computer program product, comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the method for straightening the axis of a bent steel wire based on a three-dimensional point cloud in the first aspect of this application. The computer program product may be a software installation package. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This application provides a schematic diagram of the overall process for a method of straightening the axis of a bent steel wire based on a three-dimensional point cloud. Figure 2 This application provides a schematic diagram of the overall structure of a bending steel wire axis straightening system based on three-dimensional point clouds as an embodiment of the present application; Figure 3 This application provides a schematic diagram of the structure of a terminal. Figure label: Module 1-1, Module 2-2, Module 3-3, Module 4-4, Module 5-5. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0021] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0022] The method for straightening the axis of a bent steel wire based on 3D point clouds is applied to a system for straightening the axis of a bent steel wire based on 3D point clouds. Figure 1 A schematic diagram of the overall process for a method to straighten the axis of a bent steel wire based on a three-dimensional point cloud is shown. Figure 1 As shown, it includes: S1. Obtain the three-dimensional point cloud data of the outer surface of the rusted steel wire sample to be tested, and form a three-dimensional point cloud set of the outer surface.
[0023] The process involves obtaining a sample of corroded steel wire to be tested, with at least one uncorroded section at each end serving as a reference section, and recording basic information such as sample number, nominal diameter, length, and exposure time.
[0024] Furthermore, a neutral rust remover is used to clean the surface of the steel wire to remove loose rust, mud, and other deposits, avoiding secondary corrosion or changes in the geometry of corrosion pits caused by strong acids and alkalis. During the cleaning process, a steel wool ball is used to gently brush the surface of the steel wire to avoid mechanical grinding that could damage the true corrosion morphology.
[0025] Furthermore, after cleaning, rinse thoroughly with deionized water or clean water, and then dry in a constant temperature environment or air dry to ensure that there is no residual liquid or water film reflection on the surface, so as to improve the scanning quality.
[0026] Furthermore, the steel wire is placed on a support fixture to ensure its relative stability during scanning; depending on the requirements of the scanning equipment, a matting agent / marker can be used to reduce glare and improve registration accuracy.
[0027] Furthermore, a 3D scanning device is used to acquire 3D point cloud data of the outer surface of the steel wire. The output point cloud format can be STL. After scanning, the point cloud density and coverage are checked: the corroded area should have sufficient point density, and the coverage should be continuous along the entire length of the steel wire.
[0028] Furthermore, the STL file is converted to a point cloud PLY file, and the coordinate unit is unified to millimeters: if the original unit is meters, then scale conversion is performed (multiplied by 1000); if it is millimeters, then it remains unchanged.
[0029] Furthermore, uniform sampling is performed on the surface point cloud to obtain a point cloud set, expressed by the following formula: In the formula, For the gathering of clouds, For points, Let j be the coordinates of the j-th 3D point. The point cloud contains three-dimensional coordinates. When the point cloud is too dense, resulting in excessive computation or noise, downsampling can be performed to reduce the number of points and suppress noise, while preserving the geometric details of the corrosion pits as much as possible.
[0030] S2. Determine the initial axial unit vector and reference origin based on the three-dimensional point cloud set on the outer surface.
[0031] Step S2 includes the following steps: S201. Calculate the average value of the point cloud based on the three-dimensional point cloud set on the outer surface to obtain the centroid coordinates of the point cloud.
[0032] The average position of all points is used to obtain the "geometric center" (centroid) of the point cloud. This serves as a stable reference origin (which will be used in subsequent projections and slicing). This ensures that the subsequent covariance matrix only reflects the "shape distribution" and is not affected by the overall translation.
[0033] In the formula, Let be the coordinates of the centroid of the point cloud.
[0034] S202. Construct the point cloud covariance matrix based on the centroid coordinates of the point cloud.
[0035] Specifically, the direction of the "longest" point cloud distribution is found by solving the covariance matrix Σ. For a slender object like a steel wire, the longest direction is the wire's axis.
[0036] The formula for expressing the covariance matrix Σ is shown below: In the formula, Let be the covariance matrix.
[0037] S203. Perform eigenvalue decomposition on the point cloud covariance matrix to obtain eigenvalues.
[0038] S204. Select the eigenvector corresponding to the largest eigenvalue from the eigenvalues as the initial axial unit vector, and use the centroid coordinates of the point cloud as the reference origin for defining the axial projection parameters.
[0039] Among them, for the covariance matrix Perform eigenvalue decomposition and take the eigenvector corresponding to the largest eigenvalue as the initial axial unit vector. And take the geometric center point obtained in the above steps as the initial reference origin. .in, Used for positioning coarse slices along the length direction; The origin reference used to define the axial projection parameters.
[0040] The above steps confirmed the initial coordinate axes and origin along the length of the wire, providing a reference for subsequent slicing and other work.
[0041] S3. Perform coarse slicing along the initial axis, project the local point set obtained from the coarse slicing onto a two-dimensional plane for circle fitting, obtain the center point of the three-dimensional section, and form a discrete point set of the steel wire centerline.
[0042] Step S3 includes the following steps: S301. Using the initial axial unit vector as a length direction reference and the reference origin as a starting reference, project each surface point in the three-dimensional point cloud of the outer surface along the initial axial direction to obtain the scalar position parameters of the corresponding surface point in the axial direction.
[0043] Wherein, the initial axial unit vector obtained in step 2 As a reference for the length direction, and with the reference origin... As the starting reference for axial position calculation, each surface point is projected along the initial axial direction to obtain the scalar position parameter of that point in the axial direction. Its function is to transform the point cloud, originally distributed in three-dimensional space, into a one-dimensional axial sequence that can be sliced and grouped according to length order. This parameter allows for further determination of the position range of the coarse slice and provides a criterion in the length direction for subsequent cross-sectional point extraction.
[0044] S302. Using the initial axial unit vector as the normal vector, filter the three-dimensional local point set from the three-dimensional point cloud data of the outer surface; Specifically, including: S3021. Using the initial axial unit vector as the normal vector, determine the axial midpoint of the coarse slice.
[0045] S3022. Take half the thickness of the coarse slice on each side of the midpoint of the axial direction of the coarse slice and extend it to obtain a three-dimensional thin slice region.
[0046] S3023. Extract all surface points of the three-dimensional thin-film region to obtain a three-dimensional local point set.
[0047] Specifically, in terms of axial direction For the normal direction, select a point. As the midpoint of the coarse section's axis, take two points on each side of the midpoint of the coarse section's axis. The thickness forms several three-dimensional local point sets; The points within each local point set are statistically analyzed to support subsequent circle fitting.
[0048] To avoid unstable fitting, when the number of points within a local point set is less than a preset minimum point threshold... If the number of points on the cross section is insufficient, it is skipped.
[0049] S303. Construct a two-dimensional cross-sectional coordinate system perpendicular to the initial axial unit vector.
[0050] After obtaining the three-dimensional local point set, a circle cannot be directly fitted, as circle fitting is more suitable for a two-dimensional plane. Therefore, a two-dimensional cross-sectional coordinate system perpendicular to the axis must first be constructed, and then the three-dimensional points are projected onto the two-dimensional plane.
[0051] S304. Using the midpoint of the coarse slice's axial direction as the origin of the new cross section, project the surface points in the three-dimensional local point set onto their respective two-dimensional cross sections to obtain the corresponding two-dimensional coordinates, thus obtaining a planar point set that approximates a circle.
[0052] Subsequently, the axial midpoint of the obtained coarse slice is set as the origin of the new section, and the points in the local point set are projected onto their respective two-dimensional sections to obtain the corresponding two-dimensional coordinates. This forms a set of planar points that approximate a circle on the cross section.
[0053] S305. Perform initial circle fitting on the planar point set, remove outliers, and obtain the center coordinates of the circle in the two-dimensional cross-sectional plane. Specifically, including: S3051. Perform initial circle fitting on the plane point set to obtain the initial circle center and radius parameters; S3052. Based on the radial deviation of the planar point set relative to the fitted circle, the planar point set is robustly screened to obtain interior points that meet the preset discrimination conditions. S3053. Refit the circle based on the inner points, remove outliers, and obtain the center coordinates of the circle in the two-dimensional cross-sectional plane.
[0054] Specifically, for each coarse slice section, the two-dimensional point set obtained by projection is first fitted with an initial circle to obtain the initial circle center and radius parameters; then, based on the radial deviation of each point relative to the fitted circle, the point set is robustly screened, retaining only the interior points that meet the preset discrimination conditions; then, the circle is fitted again based on the interior points, and the above screening and fitting process is repeated until the result converges or the maximum number of iterations is reached.
[0055] In this example, this iterative method reduces the impact of local outliers and isolated points on the solution for the cross-section center. Cross-sections with insufficient final valid interior points are deemed invalid and discarded.
[0056] Compared with directly using the geometric centroid of the cross-section point set as the cross-section center, the method of using a circle to fit the circle center in this invention has better robustness and consistency, because: 1) The cross-section of the rusted steel wire has a large number of corrosion pits. The centroid of the point set will be significantly pulled off the pit area, causing the center line to deviate from the true geometric axis; while the circle fitting is constrained by the overall circle outline, and the circle center is not sensitive to local pits.
[0057] 2) Scan noise, local missing points, and outliers can cause the centroid to fluctuate with changes in point density. Circle fitting combined with MAD robust removal can significantly suppress the influence of outliers and improve the stability of circle center estimation.
[0058] S306. Using the position of the origin of the new cross section in three-dimensional space as a reference, and combining the two orthogonal basis vectors in the cross section plane, the coordinates of the two-dimensional circle center in the cross section plane are converted back into three-dimensional space coordinates to obtain the three-dimensional cross section center points distributed along the length of the steel wire.
[0059] After completing the circle fitting of the two-dimensional point set of each cross section, a series of circle center coordinates in the two-dimensional cross section plane can be obtained. Using the position of the cross section origin in three-dimensional space as a reference, and combining the two orthogonal basis vectors in the cross section plane, the coordinates of the two-dimensional circle centers in the cross section plane are converted back into three-dimensional space coordinates.
[0060] S307. Arrange the center points of the three-dimensional cross-sections in order of the axial position parameters corresponding to each cross-section to obtain a discrete set of points of the wire centerline.
[0061] By repeating the above operation on all effective sections, a series of three-dimensional section center points distributed along the length of the wire can be obtained. These center points are then arranged in order according to the axial position parameters corresponding to each section, thus forming a discrete set of points for the wire centerline, providing a basis for subsequent centerline smoothing and arc length parameterization.
[0062] S4. Perform smooth fitting and arc length parameterization on the discrete point set of the centerline of the steel wire to generate fine slice stations that are uniformly distributed along the centerline.
[0063] Step S4 includes the following steps: S401. Arrange the center points of the three-dimensional cross-section in axial order to form a discrete set of centerline points, and perform smooth fitting to obtain a continuous steel wire centerline.
[0064] After obtaining the three-dimensional cross-sectional centers of the coarse slice, these centers are arranged in axial order to form a discrete set of centerline points. Since this discrete set may be affected by local noise and cross-sectional fitting errors, it is smoothly fitted to obtain a continuous steel wire centerline.
[0065] S402. Select sampling points on the continuous center line, calculate the spatial distance between adjacent sampling points and accumulate them along the center line to obtain the arc length value of each sampling point and the total arc length of the entire center line.
[0066] After obtaining the continuous centerline, the centerline is further parameterized by arc length. Specifically, a series of sampling points are selected on the centerline, and the spatial distance between adjacent sampling points is calculated. These distances are then accumulated along the centerline to obtain the arc length value of the corresponding sampling point and the total arc length of the entire centerline. This establishes a correspondence between arc length and centerline parameters, enabling subsequent cross-section stations to be uniformly arranged according to the actual length direction of the steel wire.
[0067] Through the above processing, the originally discrete centerline point set can be transformed into a continuous, smooth centerline model that can be controlled according to the actual length, thereby providing a unified and stable geometric reference for subsequent fine-slice station generation, tangent vector calculation and local coordinate system construction.
[0068] S403. Using the arc length value of each sampling point as the true coordinate of the wire length direction, multiple fine slice stations are generated sequentially on the center line according to the set arc length step.
[0069] After parameterizing the centerline arc length, to ensure that subsequent cross-sectional analysis proceeds uniformly along the actual length of the wire, the arc length is used as the true coordinate along the wire's length direction. Multiple stations are generated sequentially along the entire centerline according to a set arc length step. Since the centerline function itself is represented by initial axis parameters, and what is needed later is the actual spatial position corresponding to each station, it is necessary to determine the parameter position of each fine slice station on the centerline based on the correspondence between the arc length and the initial axis parameters, and further obtain the spatial coordinates of the centerline point corresponding to that station.
[0070] S5. Based on the fine slice station location, construct a stable cross-sectional coordinate system that is orthogonal to the current tangential direction and continuously changes along the arc length based on parallel movement transmission, and map the three-dimensional point cloud set of the outer surface to the straightening coordinate system to obtain the standardized straightening point cloud.
[0071] Step S5 includes the following steps: S501. Based on the fine slice station locations, calculate the derivative vector of the centerline at each station location and normalize it to obtain the tangent vector of the corresponding station location.
[0072] After determining the spatial point of the centerline corresponding to each fine-section station, it is necessary to further determine the direction of the steel wire centerline at that location. The derivative vector of the centerline at each station is calculated and used as the tangential direction at that station. Then, the derivative vector is normalized to obtain a tangential vector with a uniform length of 1. This tangential vector characterizes the local length direction of the steel wire at that station and serves as the directional reference for subsequent section point extraction, local coordinate system establishment, and section coordinate decomposition. This ensures that subsequent section analysis always revolves around the actual direction of the steel wire, thereby improving the geometric consistency of point cloud straightening and corrosion depth calculation.
[0073] S502. The cross-sectional basis vector of the previous station is transmitted between adjacent stations by using minimum rotation as the tangential direction changes, and the transmission result is orthogonalized and normalized to obtain the stable cross-sectional basis vector of the current station.
[0074] To avoid unnecessary rotation of the cross-sectional coordinate system along the centerline, this method uses minimum rotation between adjacent stations to transmit the cross-sectional basis vector of the previous station as the tangential changes, and performs orthogonalization and normalization processing on the transmission results, thereby ensuring that the cross-sectional basis vector is always orthogonal to the current tangential and changes continuously along the arc length, suppressing the spiral distortion of the point cloud after straightening.
[0075] S503. Taking the centerline point at the station as the center, set the thickness of the thin slice along the local length direction, and extract the surface points falling within the thickness range as the local cross-sectional point set of the current station.
[0076] Specifically, a thin slice thickness is set along the local length of the steel wire, centered on the centerline point of the station. Surface points falling within this thickness range are extracted as the local cross-sectional point set for the current station. For stations with fewer extracted points than a preset minimum point threshold, the data for that station is deemed insufficient and skipped to avoid interference from sparse point clouds in subsequent coordinate calculations.
[0077] S504. For surface points in the local cross-section point set, take the station centerline point as the local origin, calculate the relative displacement, and decompose the displacement into two orthogonal directions in the local length direction and the cross-section plane to obtain three components in the local coordinate system.
[0078] Specifically, for any surface point in the current local cross-section point set, the displacement of the surface point relative to the local origin is calculated using the centerline point corresponding to the current station position as the local origin. Then, the displacement is decomposed into the local length direction of the current station position and two orthogonal directions in the cross-section plane, thereby obtaining three components of the surface point in the local coordinate system, which are used to characterize the relative position of the point.
[0079] S505. Using the arc length position of the current station on the center line as the axial principal coordinate, and combining the displacement components of the surface points in the local length direction to generate the straightened axial coordinate, and using the two components in the cross-sectional plane as the point cloud coordinates of the straightened coordinate system, the standardized straightened point cloud is obtained.
[0080] Specifically, the axial coordinates are generated by using the arc length of the current station on the centerline as the principal axial coordinate, and combining it with the displacement components of the surface point in the local length direction obtained in S504. Simultaneously, the components of the surface point in the two orthogonal directions within the cross-sectional plane are used as coordinates in the straightened coordinate system. Thus, the three-dimensional points originally distributed on the surface of the bent steel wire are uniformly converted into point cloud coordinates in a standardized straightened coordinate system, providing fundamental data for subsequent analysis segment trimming, radial distance calculation, and corrosion depth analysis.
[0081] The set of output points is composed of all retained points. Output as a text file (one dot per line, separated by spaces): In the formula, This is to output the number of points.
[0082] This example provides a method for straightening the axis of a bent steel wire based on a 3D point cloud. First, the initial axis and reference origin of the steel wire are determined through principal component analysis. Then, coarse slices are made along the initial axis, and the local point set obtained from the coarse slices is projected onto a 2D plane for circle fitting. Outliers are iteratively removed to obtain a discrete point set of the steel wire's centerline, effectively suppressing the interference of corrosion pits and scanning noise on the centerline extraction. Next, the discrete point set of the centerline is smoothed and parameterized with arc length to generate fine slice positions uniformly distributed along the centerline, ensuring that the straightened point cloud strictly reflects the true arc length of the steel wire in the length direction. Furthermore, a stable cross-sectional coordinate system orthogonal to the current tangential direction and continuously changing along the arc length is constructed based on parallel translation transmission, avoiding unnecessary rotation of the cross-sectional coordinate system along the centerline and suppressing the spiral distortion of the straightened point cloud. Finally, the original point cloud is mapped to the straightening coordinate system in the stable cross-sectional coordinate system to output a standardized straightened point cloud. It can accurately eliminate the influence of the bending and twisting of the steel wire itself on the point cloud distribution, providing a bending-free and twist-free benchmark point cloud for subsequent corrosion depth calculation. It fundamentally avoids the cumulative error caused by changes in axial tangential and cross-sectional inclination, and significantly improves the accuracy and reliability of corrosion assessment.
[0083] For those consistent with the above, please refer to Figure 2 , Figure 2 This application provides a schematic diagram of a bending steel wire axis straightening system based on a three-dimensional point cloud as an embodiment of the present application. For example... Figure 2 As shown, the system includes: The first module 1 is used to acquire the three-dimensional point cloud data of the outer surface of the rusted steel wire sample to be tested, and form a three-dimensional point cloud set of the outer surface. The second module 2 is used to determine the initial axial unit vector and the reference origin based on the three-dimensional point cloud of the outer surface; The third module 3 is used to perform coarse slicing along the initial axis, project the local point set obtained from the coarse slicing onto a two-dimensional plane for circle fitting, obtain the center point of the three-dimensional section, and form a discrete point set of the steel wire centerline. The fourth module 4 is used to perform smooth fitting and arc length parameterization on the discrete point set of the steel wire centerline to generate fine slice stations that are uniformly distributed along the centerline. The fifth module 5 is used to construct a stable cross-sectional coordinate system based on the fine slice station location and parallel movement transmission, which is orthogonal to the current tangential direction and continuously changes along the arc length, and to map the three-dimensional point cloud set of the outer surface onto the straightened coordinate system to obtain a standardized straightened point cloud.
[0084] For examples consistent with the above embodiments, please refer to... Figure 3 , Figure 3A schematic diagram of a terminal structure provided in an embodiment of this application is shown in the figure. It includes a processor, an input device, an output device, and a memory. The processor, input device, output device, and memory are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions. The program includes instructions for performing the following steps. Acquire three-dimensional point cloud data of the outer surface of the rusted steel wire sample to be tested, and form a three-dimensional point cloud set of the outer surface. Based on the three-dimensional point cloud of the outer surface, determine the initial axial unit vector and the reference origin; A coarse slice is made along the initial axis. The local point set obtained from the coarse slice is projected onto a two-dimensional plane and fitted with a circle to obtain the center point of the three-dimensional section, forming a discrete point set of the steel wire centerline. The discrete point set of the steel wire centerline is smoothed and parameterized with arc length to generate fine slice stations that are uniformly distributed along the centerline. Based on the fine slice location, a stable cross-sectional coordinate system orthogonal to the current tangential direction and continuously varying along the arc length is constructed based on parallel movement transmission, and the three-dimensional point cloud set of the outer surface is mapped to the straightened coordinate system to obtain a standardized straightened point cloud.
[0085] The above mainly describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the terminal includes the corresponding hardware structure and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0086] This application embodiment can divide the terminal into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0087] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the three-dimensional point cloud-based methods for straightening the axis of a bent steel wire as described in the above method embodiments.
[0088] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program that causes a computer to perform some or all of the steps of any of the three-dimensional point cloud-based straightening methods for bending steel wire axes described in the above method embodiments.
[0089] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0090] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0091] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical or other forms.
[0092] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0093] Furthermore, the functional units in the various embodiments of the application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software program module.
[0094] If the integrated unit is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0095] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.
[0096] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for straightening the axis of a bent steel wire based on three-dimensional point clouds, characterized in that, include: Acquire three-dimensional point cloud data of the outer surface of the rusted steel wire sample to be tested, and form a three-dimensional point cloud set of the outer surface. Based on the three-dimensional point cloud of the outer surface, determine the initial axial unit vector and the reference origin; A coarse slice is made along the initial axis. The local point set obtained from the coarse slice is projected onto a two-dimensional plane and fitted with a circle to obtain the center point of the three-dimensional section, forming a discrete point set of the steel wire centerline. The discrete point set of the steel wire centerline is smoothed and parameterized with arc length to generate fine slice stations that are uniformly distributed along the centerline. Based on the fine slice location, a stable cross-sectional coordinate system orthogonal to the current tangential direction and continuously varying along the arc length is constructed based on parallel movement transmission, and the three-dimensional point cloud set of the outer surface is mapped to the straightened coordinate system to obtain a standardized straightened point cloud.
2. The method for straightening the axis of a bent steel wire based on a three-dimensional point cloud according to claim 1, characterized in that, The step of determining the initial axial unit vector and reference origin based on the three-dimensional point cloud of the outer surface includes: The point cloud average value is calculated based on the three-dimensional point cloud set on the outer surface to obtain the centroid coordinates of the point cloud; Construct the point cloud covariance matrix based on the centroid coordinates of the point cloud; The point cloud covariance matrix is subjected to eigenvalue decomposition to obtain eigenvalues; The eigenvector corresponding to the largest eigenvalue is selected from the eigenvalues as the initial axial unit vector, and the centroid coordinates of the point cloud are used as the reference origin for defining the axial projection parameters.
3. The method for straightening the axis of a bent steel wire based on a three-dimensional point cloud according to claim 1, characterized in that, The process of coarsely slicing along the initial axial direction, projecting the local point set obtained from the coarse slice onto a two-dimensional plane for circle fitting, and obtaining the center point of the three-dimensional section to form a discrete point set of the steel wire centerline includes: Using the initial axial unit vector as a length direction reference and the reference origin as a starting reference, each surface point in the three-dimensional point cloud of the outer surface is projected along the initial axial direction to obtain the scalar position parameters of the corresponding surface point in the axial direction. The initial axial unit vector is used as the normal vector to determine the axial midpoint of the coarse slice; Based on the axial midpoint of the coarse slice, a three-dimensional local point set is selected from the three-dimensional point cloud data of the outer surface; Construct a two-dimensional cross-sectional coordinate system perpendicular to the initial axial unit vector; Using the midpoint of the coarse slice as the origin of the new cross section, the surface points in the three-dimensional local point set are projected onto their respective two-dimensional cross sections to obtain the corresponding two-dimensional coordinates, thus obtaining a planar point set that approximates a circle. An initial circle fit is performed on the set of planar points, and outliers are removed to obtain the coordinates of the center of the circle in the two-dimensional cross-sectional plane. Using the position of the origin of the new cross section in three-dimensional space as a reference, and combining the two orthogonal basis vectors in the cross section plane, the coordinates of the two-dimensional circle center in the cross section plane are converted back into three-dimensional space coordinates to obtain the three-dimensional cross section center points distributed along the length of the wire. The center points of the three-dimensional cross-sections are arranged in order of their corresponding axial position parameters to obtain a discrete set of points for the center line of the steel wire.
4. The method for straightening the axis of a bent steel wire based on a three-dimensional point cloud according to claim 3, characterized in that, The step of filtering a 3D local point set from the 3D point cloud data of the outer surface based on the axial midpoint of the coarse slice includes: Half the thickness of the coarse slice is taken on each side of the midpoint of the axial direction of the coarse slice and extended to obtain a three-dimensional thin slice region. Extract all surface points of the three-dimensional thin-slice region to obtain a three-dimensional local point set.
5. The method for straightening the axis of a bent steel wire based on a three-dimensional point cloud according to claim 3, characterized in that, The process of performing initial circle fitting on the planar point set, removing outliers, and obtaining the center coordinates of the circle in the two-dimensional cross-sectional plane includes: The initial circle is fitted to the set of points in the plane to obtain the initial circle center and radius parameters; Based on the radial deviation of the planar point set relative to the fitted circle, the planar point set is robustly screened to obtain interior points that meet the preset discrimination conditions; Based on the inlier points, a new circle fit is performed, outliers are removed, and the coordinates of the circle center in the two-dimensional cross-sectional plane are obtained.
6. The method for straightening the axis of a bent steel wire based on a three-dimensional point cloud according to claim 1, characterized in that, The step of smoothing and parameterizing the discrete point set of the steel wire centerline to generate fine-slice stations uniformly distributed along the centerline includes: The center points of the three-dimensional cross-section are arranged in axial order to form a discrete set of centerline points, and then smoothed and fitted to obtain a continuous steel wire centerline. Sampling points are selected along the continuous center line. The spatial distance between adjacent sampling points is calculated and accumulated along the center line to obtain the arc length value of each sampling point and the total arc length of the entire center line. Using the arc length value of each sampling point as the true coordinate of the wire length direction, multiple fine slice stations are generated sequentially on the center line according to the set arc length step.
7. The method for straightening the axis of a bent steel wire based on a three-dimensional point cloud according to claim 1, characterized in that, The process involves constructing a stable cross-sectional coordinate system based on the fine-slice station location, which is orthogonal to the current tangential direction and continuously varies along the arc length, using parallel movement transmission. The three-dimensional point cloud set on the outer surface is then mapped to the straightened coordinate system to obtain a standardized straightened point cloud, including: Based on the fine slice station locations, calculate the derivative vector of the centerline at each station location and normalize it to obtain the tangent vector of the corresponding station location; The cross-sectional basis vector of the previous station is transmitted between adjacent stations by using minimum rotation as the tangential direction changes, and the transmission result is orthogonalized and normalized to obtain the stable cross-sectional basis vector of the current station. Centered on the centerline point of the station, a fine slice thickness is set along the local length direction, and surface points falling within the thickness range are extracted as the local cross-sectional point set of the current station. For surface points in the local cross-section point set, with the station centerline point as the local origin, calculate the relative displacement, and decompose the displacement into two orthogonal directions in the local length direction and the cross-section plane to obtain three components in the local coordinate system. Using the arc length position of the current station on the center line as the axial principal coordinate, and combining the displacement components of the surface points in the local length direction to generate the straightened axial coordinate, and using the two components in the cross-sectional plane as the point cloud coordinates of the straightened coordinate system, a standardized straightened point cloud is obtained.
8. A system for straightening the axis of a bent steel wire based on a three-dimensional point cloud, characterized in that, include: The first module is used to acquire the three-dimensional point cloud data of the outer surface of the rusted steel wire sample to be tested, and form a three-dimensional point cloud set of the outer surface. The second module is used to determine the initial axial unit vector and the reference origin based on the three-dimensional point cloud of the outer surface; The third module is used to perform coarse slicing along the initial axis, project the local point set obtained from the coarse slicing onto a two-dimensional plane for circle fitting, obtain the center point of the three-dimensional section, and form a discrete point set of the steel wire centerline. The fourth module is used to perform smooth fitting and arc length parameterization on the discrete point set of the steel wire centerline to generate fine slice stations that are uniformly distributed along the centerline. The fifth module is used to construct a stable cross-sectional coordinate system based on the fine slice station location and parallel movement transmission, which is orthogonal to the current tangential direction and continuously changes along the arc length, and to map the three-dimensional point cloud set of the outer surface onto the straightened coordinate system to obtain a standardized straightened point cloud.
9. A terminal, characterized in that, The device includes a processor, an input device, an output device, and a memory, which are interconnected. The memory stores a computer program, which includes program instructions. The processor is configured to invoke the program instructions to execute the method for straightening the axis of a bent steel wire based on a three-dimensional point cloud as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the method for straightening the axis of a bent steel wire based on a three-dimensional point cloud as described in any one of claims 1-7.