Gaussian Distance Weighted Algorithm for Geometric Characteristics of Three-Dimensional Discrete Curves

Abstract

Discrete curves are composed of a set of ordered discrete points distributed at the intersection of the scanning plane and the surface of the object. In order to accurately calculate the geometric characteristics of any point on the discrete curve, a distance-based Gaussian weighted algorithm is proposed to estimate the geometric characteristics of three-dimensional space discrete curves. According to the definition of discrete derivatives, the algorithm fully considers the relative position difference between a specific point and its neighboring points, introduces the distance weighting idea, and integrates the smoothing strategy. The experiment uses two spatial discrete curves for uniform and non-uniform sampling, and compares them with two commonly used estimation algorithms. The comparative analysis is carried out in terms of sampling density, neighborhood radius and noise resistance. The experimental results show that the Gaussian distance weighted algorithm is effective and provides an efficient algorithm for underground pipeline safety detection.

Share and Cite:

Zhang, L. , Ai, H. , Yan, S. , Chen, H. , Zou, J. and Zhang, J. (2024) Gaussian Distance Weighted Algorithm for Geometric Characteristics of Three-Dimensional Discrete Curves. Journal of Applied Mathematics and Physics, 12, 3599-3612. doi: 10.4236/jamp.2024.1210215.

1. Introduction

With the development of society, the application of 3D line point cloud data in industrial production and life is increasing. In particular, in pipeline inspection [1], effectively calculating the curvature and torsion of the pipeline is an important task. The central generatrix curvature describes the degree of bending of the pipeline near a point, and the torsion describes the degree to which the pipeline deviates from the osculating plane. By comparing the pipeline curvature radius with the D factor [2] (multiples of the pipeline mouth diameter) in the national standard, the safety and reliability of pipeline operation can be ensured.

In recent years, many scholars have devoted themselves to studying methods for estimating the geometric properties of discrete curves. These methods can be roughly divided into two categories: the curve fitting method [3] [4] and the discrete structure method. The curve fitting method mainly fits a smooth curve to a given point and its neighboring points, and then the geometric properties of the given point are calculated according to the differential geometry formula of the analytical curve. The discrete structure method does not need to fit a smooth curve to the discrete curve, but directly uses the discrete structures, such as the distance between discrete points and the inscribed polygon, and uses the difference form or discrete approximation strategy to estimate the geometric properties of the discrete curve. The method is simple and has strong universality. This paper mainly studies the estimation of the geometric properties of spatial discrete curves based on the discrete structure method.

In 2016, Blankenburg [5] et al. used the finite difference quotient approximation of the curve derivative of the general parametric equation to directly calculate the order difference quotients of the spatial discrete curve at a given point using the one-sided difference approximation from the discrete points, and then estimated the geometric characteristics of the discrete curve. The one-sided difference method will produce a certain offset or scaling of the given curvature and torsion when estimating the geometric characteristics of the discrete curve. Mu Shengpeng [6] et al. proposed a micro-central difference algorithm for calculating the curvature and torsion of three-dimensional discrete curves. The micro-central difference algorithm, based on the definition of derivatives and combined with the difference quotient smoothing strategy, modifies the one-sided difference method into a method of averaging the two-sided difference quotients of the target discrete point to obtain the order derivatives of the target discrete point, and then effectively calculates the geometric characteristics of the discrete curve. However, in this method, it is not mentioned whether the distance between different discrete points and the center point affects the discrete partial derivatives. In this regard, further research is needed to find a better algorithm. In 2010, An [7] [8] proposed a method called discrete geometry method. Based on the definition of discrete derivatives, the method of solving constrained least squares optimization problems was used to calculate the discrete derivatives of a specified point in its symmetric neighborhood, and then estimate the geometric properties of the spatial discrete curve. This method does not rely on any smooth curve model, and directly estimates the geometric properties of the curve from discrete data points. It has good universality for the geometric shape of discrete curves. However, the influence of other discrete points in the spatial neighborhood on the contribution of the central point was not further studied in this paper. In 2021, Liu Yangsiwei [9] proposed a new method for estimating partial derivatives of surface point clouds based on the discrete geometry method. This method does not rely on any surface or curve model, and has good universality for surface point cloud data of any shape; for data with noise, it can effectively reduce the impact of noise.

In addition, among the many methods for studying discrete structure methods, in addition to using traditional non-weighted processing methods to estimate the geometric properties of spatial discrete curves, weighted processing methods can also be used to improve the accuracy of the algorithm.

In 2019, Wang Lei [10]-[12] et al. proposed an estimation method for calculating the geometric characteristics of three-dimensional space using Gaussian weighting. This method introduces Gaussian weights and adjusts the contribution of the given point to the discrete derivative according to the different distances from the given point to the neighboring points from the perspective of distance, thereby reducing the impact of noise and improving the accuracy of the estimation with good results. However, there are some shortcomings in parameter selection, and we need to do further research on this.

In recent years, there have been many methods for estimating the geometric characteristics of spatial discrete curves, but there are few methods that do not rely on curve fitting and can adjust the contribution of a specific point to the geometric characteristics of a specific point according to the relative position difference between the specific point and its neighboring points in the neighborhood. In this regard, we use the definition of discrete derivatives from the distance aspect and propose a distance weighted estimation algorithm based on the relative position difference between a specific point and its neighboring points in the neighborhood, which has great theoretical value and practical significance for pipeline safety detection.

Therefore, what is Gaussian weighting? What important influence does Gaussian weighting have when estimating spatial discrete derivatives? Next, we will explain Gaussian weighting further.

2. Gaussian Kernel Function Weighting

In recent years, the estimation of geometric properties of three-dimensional discrete curves has played a vital role in industrial production and life. When estimating the geometric properties of spatial discrete curves, researchers often face a key choice: one is to use the traditional difference method, and the other is to use the weighted strategy.

Traditional differential methods usually assume that all data points contribute equally to the geometric characteristics of the curve. The discrete derivative is estimated by the difference between corresponding data points, which is simple and intuitive. However, in practical applications, data are often affected by various factors, such as the sparsity of data points, which can easily lead to deviations in the results. In contrast, the weighted method is considered by more scholars to be a more sophisticated and reasonable strategy. By assigning different weights to data points at different locations in the local area of the discrete curve, the geometric characteristics of the curve can be estimated more accurately. This type of method is particularly effective in dealing with uneven sampling and smoothing noise [10]-[12], improving the accuracy of local estimation.

In recent years, researchers in various fields have conducted extensive research on discrete curve weighting methods, including the correlation coefficient method [13], Gaussian kernel function weighting method [10]-[12], etc. Among them, Gaussian kernel function weighting is to introduce the Gaussian kernel function as a weight to adjust the contribution of each discrete point in the neighborhood to the geometric characteristics of a given point, thereby effectively estimating the geometric characteristics of a spatial discrete curve. Gaussian kernel function weighting has shown outstanding advantages in image processing, statistics and other fields, such as 1) Strong noise resistance [10]-[12]. In non-uniform discrete data, there is often noise. The Gaussian weighting method can adjust the weight size according to the distance between the given point and its different neighboring points in the neighborhood, smooth the discrete data, thereby reducing the interference of noise on the derivative estimation, and thus improving the accuracy to a certain extent. 2) Strong flexibility [14]. The parameters in Gaussian weighting can be adjusted according to the needs of actual problems to adapt to different data distributions and problem requirements, and have a certain degree of flexibility. 3) Reasonable weight distribution [15]. The Gaussian angle weighting method can assign different weights according to the relative position difference. The data points with small relative deviation angles are given larger weights, and vice versa, smaller weights are given, which is more in line with the actual situation. In this regard, we will use the Gaussian weighting method to analyze and process the geometric characteristics of the spatial discrete curve.

3. Discrete Curve Parameterization

The three-dimensional discrete curve is composed of a series of data points { Q j =( x j , y j , z j )|1jn } . In order to deeply analyze and conveniently calculate the geometric characteristics of these data points, the three-dimensional problem is converted into a two-dimensional problem, and the data points need to be parameterized.

There are many parameterization methods for discrete curves, including general parameterization, chord length parameterization, uniform parameterization, and centripetal parameterization [16]. Among them, the general parameterization method has the characteristics of simplicity, intuitiveness, strong versatility, and high computational efficiency, which is more advantageous than other methods. This paper adopts the general parameterization method, selects the general parameter t i as its parameter, and converts the three-dimensional form Q j =( x j , y j , z j ),j[ 1,n ] into a two-dimensional point set form about the general parameter t : X=( t i , x i ) , Y=( t i , y i ) , Z=( t i , z i ) , thereby simplifying the data structure and reducing the complexity of data calculation.

The parameterization process lays the foundation for the derivative estimation of discrete curves. Next, we will conduct an in-depth analysis of the Gaussian weighted algorithm of the Gaussian kernel function in the parameterized discrete curve from the perspective of distance.

4. Gaussian Distance Weighting Method

In the space discrete curve, in order to accurately calculate the geometric characteristics of any point on the discrete curve, we fully consider the positional relationship between a given point and its neighboring points in the neighborhood from the perspective of distance, and integrate the smoothing strategy to design an algorithm that can adjust the contribution of the neighboring points to the geometric characteristics of the given point according to the distance between the neighboring points and the specific point, thereby effectively estimating the geometric characteristics of the space discrete curve. Next, we take the discrete derivative of the left side of the given point x in the direction of p i as an example to conduct a theoretical analysis.

Step 1. General parameterization processing. Convert the three-dimensional discrete data Q j =( x j , y j , z j ) into a two-dimensional point set form with respect to the parameter t : X=( t j , x j ) , Y=( t j , y j ) , Z=( t j , z j ) .

Step 2. Construct a straight line. In a two-dimensional point set graph in the x,y and z directions, construct a straight line between a given point and its neighboring points.

Step 3. Search for the maximum distance. Search for the maximum distance between a given point and its discrete points to form a straight line.

Step 4. Introduce Gaussian weights to adjust the contribution of neighboring points to the discrete derivative of a given point according to the relative deviation angle between the neighboring points and the given point.

w j L x =exp{ ( ( t j t i ) 2 + ( x j x i ) 2 ) 2 σ L 2 },j=( i m 1 ,i1 ) (1)

Among them, σ is the maximum distance between a given point and a discrete point in its neighborhood.

Step 5. Normalize w j L x , and we have

w j L N x = w j L x / j=i m 1 i1 w j L x (2)

Similarly,

w j R N x = w j R x / j=i+1 i+ m 1 w j R x (3)

Step 6. Construct discrete tangent. Discrete tangent x ^ j L =at+b must meet the following three conditions:

1) Line x ^ j L =at+b passes through a given point p i =( t i , x i ) ;

2) The sum of the squares of the distances between the neighboring points { ( t i , x i )|i m 1 ji1 } in the left neighborhood of the straight lines x ^ j L =at+b and p i along the x axis is minimal.

3) The smaller the distance between a given point p i and its discrete neighboring points in the neighborhood, the greater the influence of the discrete point on the straight line.

Among them, m 1 is the radius of the first-order neighborhood, and j is the serial number of the discrete neighboring point. (Figure 1)

Figure 1. Discrete tangent line.

Step 7. Construct a linearly constrained weighted regression function and solve the coefficients using the least squares method:

minL( a,b,ω )= j=i m 1 i1 w j L N x ( x j x ^ j L ) 2 ,s.t. x i =a t i +b (4)

Step 8. Construct the Lagrangian function by introducing Lagrangian multipliers.

L( a,b,λ )= j=i m 1 i1 w j L N x ( x j x ^ j L ) 2 +λ( x i a t i b ) (5)

Step 9. Solve the discrete derivative. Use a,b,λ to find the partial derivative and find the first-order discrete derivative in the left neighborhood of the given point p i :

x L ( t i )= j=i m 1 i1 w j L N x ( t j t i )( x j x i ) j=i m 1 i1 w j L N x ( t j t i ) 2 (6)

Similarly, the first-order discrete derivative in the right neighborhood of a given point p i is:

x R ( t i )= j=i+1 i+ m 1 w j R N x ( t j t i )( x j x i ) j=i+1 i+ m 1 w j R N x ( t j t i ) 2 (7)

Thus, the first-order discrete derivative of the discrete function x j =x( t j ) in the symmetric neighborhood at a given point p i is:

x ( t i )= 1 2 ( x L ( t i )+ x R ( t i ) ) (8)

Similarly, we can find the discrete derivatives in the y direction and the z direction:

y ( t i )= 1 2 ( y L ( t i )+ y R ( t i ) ) (9)

z ( t i )= 1 2 ( z L ( t i )+ z R ( t i ) ) (10)

This algorithm, based on discrete geometry, introduces the weighted idea from the distance aspect and integrates the smoothing strategy to obtain the derivatives α ( t j )=( x ( t j ), y ( t j ), z ( t j ) ) in all directions of the data point Q j =( x j , y j , z j ) in the spatial discrete curve. Thus, we can better estimate the geometric characteristics of the spatial discrete curve.

5. Geometric Properties of Discrete Curves

In classical differential geometry, if the parametric equation of the curve C is r=r( t )=( x( t ),y( t ),z( t ) )( αtβ ) , and the parameterized curve is a regular curve, then the calculation formula for the geometric characteristics of the discrete curve α( t j ) is as follows:

1) Curvature of discrete curve: κ( t )= | α ( t )× α ( t ) | | α ( t ) | 3

2) Torsion of discrete curve: τ( t )= ( α ( t ), α ( t ), α ( t ) ) | α ( t )× α ( t ) | 2

In,

α ( t )= x ( t j ), y ( t j ), z ( t j ), α ( t )= x ( t j ), y ( t j ), z ( t j ), α ( t )= x ( t j ), y ( t j ), z ( t j ). (11)

6. Experimental Analysis

In this paper, two spatial discrete curves are used to quantitatively evaluate the Gaussian distance weighted algorithm, and compared with the discrete geometry method and two algorithms based on Gaussian weighted discrete derivatives in terms of sampling density, neighborhood radius and noise resistance.

During the experiment, m represents the variable neighborhood radius used to estimate the curvature or torsion of a spatial discrete curve, m 1 , m 2 and m 3 represent the variable neighborhood radii used to calculate α ( t j ), α ( t j ) and α ( t j ) , respectively. After analysis in the text, the neighborhood radius m= m 1 + m 2 for curvature estimation can be obtained, and then the torsion curvature radius can also be obtained; in addition, for non-uniform sampling, we performed sampling processing to varying degrees and added noise, which are σ=20%d and σ=30%d respectively, and d is the average distance between every two adjacent data points in the discrete curve; for each point on the discrete curve, the estimated error of its curvature is defined as follows: e i κ = κ i κ i ¯ , κ i is the estimated value obtained using the method in this paper, and κ i ¯ is the true value. The root mean square error of the curvature estimated by a discrete curve data is xx; and then, the root mean square error of the torsion can also be derived.

The two space line point cloud curves in the experiment of estimating the geometric characteristics of space discrete curves are the sampling of two space curves:

(1) Clelia curve: r( t )=( cos( 2t )cos( t ),cos( 2t )sin( t ),sin( 2t ) ),t[ 0,2π ]

(2) Viviani curve: r( t )=( cos 2 ( t ),cos( t )sin( t ),sin( t ) ),t[ 0,2π ]

1) Uniform sampling

The three spatial discrete curves are uniformly sampled, and we compare and analyze the root mean square error of curvature in terms of sampling density, neighborhood radius, etc.

(a)

(b)

Figure 2. Clelia curve curvature root mean square error plot.

(a)

(b)

Figure 3. Root mean square error plot of Viviani curve curvature.

Figure 2(a) and Figure 3(a) show the root mean square error of the estimated curvature when the neighborhood radius is 2 and the three algorithms are compared under uniform sampling. Obviously, the error value is very small. As the sampling density n increases, the error value gradually decreases. Figure 2(b), Figure 3(b) show the root mean square error of the estimated curvature when the sampling density n is 600 under uniform sampling. It can be seen that the curvature estimation error is very small at this time. As the neighborhood radius m increases, the error value increases. This is because curvature is a local characteristic of the curve. In the absence of noise, a larger neighborhood radius will cause the curvature estimation to produce a distortion effect.

2) Non-uniform sampling

We perform non-uniform sampling on the three spatial discrete curves and compare and analyze the root mean square error of curvature in terms of sampling density, neighborhood radius, and non-uniformity.

Figure 4(a), Figure 5(b) and Figure 4(a), Figure 5(b) are error diagrams of estimated curvature under different degrees of non-uniform sampling when the sampling density n is 600. It can be seen from the images that under non-uniform sampling, the algorithm proposed in this paper shows better advantages in estimating higher-order discrete derivatives and geometric properties of discrete curves.

(a)

(b)

Figure 4. Clelia curve curvature and torsion root mean square.

(a)

(b)

Figure 5. Root mean square error graph of curvature and torsion of Viviani curve.

7. Algorithm Application

This paper adopts the horizontal directional drilling method to bury this section of the pipeline. According to the document [2], when burying pipelines, the curvature radius should not be less than 1500D and should not be less than 1200D when using the directional drilling method for crossing construction, where D represents the diameter of the pipeline. According to construction experience, for buried pipelines made of PE material, the curvature radius should not be less than 600D and should not be less than 500D.

We take a PE gas pipeline with a length of 28.60 m and a diameter of D200 (200 mm) as an example. We measure a total of 600 coordinate points and obtain the curvature radius R=1/k , where k is the curvature. We calculate R/D and compare it with the D number of 500 to determine the abnormal area. This article takes the sampling density n as 600 and the neighborhood radius m=6 as an example for analysis, as shown in Table 1.

Table 1. Relevant data of underground pipelines.

Index

k( m )

R( 1/m )

R/D

Comparison results

28

0.015608761

64.06658532

320.3329266

<500

29

0.014308398

69.88902407

349.4451203

30

0.012874231

77.67454245

388.3727123

31

0.01153105

86.72236826

433.6118413

32

0.010592512

94.40630912

472.0315456

33

0.010123305

98.78196673

493.9098336

34

0.009973781

100.2628821

501.3144105

>500

35

0.009831413

101.7147792

508.5738962

36

0.009397144

106.4153112

532.0765562

37

0.008732509

114.5146284

572.5731419

38

0.008041137

124.3605185

621.8025924

39

0.007691252

130.0178519

650.0892596

As shown in Table 1, the curvature, curvature radius and comparison results of the 28th to 39th sampling points of this section of pipeline are shown. The research results show that between the 34th and 39th points, the curvature radius at each point is greater than 500D, which meets the standard and can be safely constructed; between the 28th and 33rd points, the curvature at each point of the pipeline is too large, and the curvature radius is less than 500D, which is an abnormal area. When the pipeline is in operation, it may cause problems such as increased pipeline stress and deformation. Reinforcement and other treatment methods should be considered during construction to prevent safety accidents in the later stage.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Dong, L., Qu, Z., Zhang, Q., Huang, Y. and Liu, G. (2019) A General Model to Predict Torsion and Curvature Increments of Tensile Armors in Unbonded Flexible Pipes. Marine Structures, 67, Article ID: 102632.
https://doi.org/10.1016/j.marstruc.2019.102632
[2] GB 50424-2015, Construction Specifications for Oil and Gas Pipeline Crossing Projects.
[3] Cazals, F. and Pouget, M. (2005) Estimating Differential Quantities Using Polynomial Fitting of Osculating Jets. Computer Aided Geometric Design, 22, 121-146.
https://doi.org/10.1016/j.cagd.2004.09.004
[4] Zhao, F.Q. and Zhou, M.Q. (2017) Effective Blocks Matching Algorithm of Terracotta Warrior. Computer Systems Applications, 26, 198-203.
[5] Blankenburg, C., Daul, C. and Ohser, J. (2016) Parameter Free Torsion Estimation of Curves in 3D Images. 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, 25-28 September 2016, 1081-1085.
https://doi.org/10.1109/icip.2016.7532524
[6] Mu, S.P., Li, H.J. and Li, S.L. (2019) An Algorithm for Estimating Curvature and Torsion of Discrete Curve in Three-Dimensional Space Based on Microcentral Difference. CAAI Transactions on Intelligent Systems, 14, 194-206.
[7] An, Y., Shao, C., Wang, X. and Li, Z. (2010). Geometric Properties Computation for Discrete Curves Based on Discrete Derivatives. 2010 International Conference on Intelligent Control and Information Processing, Dalian, 13-15 August 2010, 217-224.
https://doi.org/10.1109/icicip.2010.5564203
[8] An, Y. (2012) Geometric Properties Estimation and Feature Identification from 3D Point Cloud. Dalian University of Technology.
[9] Liu, Y.S.W. (2021) Estimation of Geometric Characteristics of Point Cloud Based on Discrete Derivative. Dalian University of Technology.
[10] Wang, L., An, Y., Ma, R., et al. (2022) A Method for Estimating Geometric Characteristics of Line Point Clouds Based on Gaussian Weighted Discrete Derivatives. Liaoning Province: CN109671152B, 2022-10-04.
[11] Ma, R. (2019) Geometric Properties Estimation from Line Point Clouds Using Gaussian-Weighted Discrete Derivatives. Dalian University of Technology.
[12] An, Y., Wang, L., Ma, R. and Wang, J. (2021) Geometric Properties Estimation from Line Point Clouds Using Gaussian-Weighted Discrete Derivatives. IEEE Transactions on Industrial Electronics, 68, 703-714.
https://doi.org/10.1109/tie.2020.2965456
[13] Qiu, M.J., Song, Y.B., Wang, J.L., et al. (2016) Determination of Weight Coefficient in Agro-Meteorological Yield Prediction. Journal of Meteorology and Environment, 32, 106-111.
[14] Zhu, Y.G., Yan, Y.P. and Wang, L. (2008) Parameter Estimation with Equality Constraints Based on Weighted Least Square. Electric Power, 41, 25-27.
[15] Zeng, Z.H. (2023) Research on 3D Object Detection Algorithm Based on Gaussian Kernel Function HeatMap and Fusion Information Distance. Nanchang University.
[16] Yu, H. (2009) Research on Parameterization Methods for Data Points on Parametric Curve. Shandong University.

Copyright © 2025 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.