Gaussian Distance Weighted Algorithm for Geometric Characteristics of Three-Dimensional Discrete Curves ()
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
. 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
as its parameter, and converts the three-dimensional form
into a two-dimensional point set form about the general parameter
:
,
,
, 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
in the direction of
as an example to conduct a theoretical analysis.
Step 1. General parameterization processing. Convert the three-dimensional discrete data
into a two-dimensional point set form with respect to the parameter
:
,
,
.
Step 2. Construct a straight line. In a two-dimensional point set graph in the
and
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.
(1)
Among them,
is the maximum distance between a given point and a discrete point in its neighborhood.
Step 5. Normalize
, and we have
(2)
Similarly,
(3)
Step 6. Construct discrete tangent. Discrete tangent
must meet the following three conditions:
1) Line
passes through a given point
;
2) The sum of the squares of the distances between the neighboring points
in the left neighborhood of the straight lines
and
along the
axis is minimal.
3) The smaller the distance between a given point
and its discrete neighboring points in the neighborhood, the greater the influence of the discrete point on the straight line.
Among them,
is the radius of the first-order neighborhood, and
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:
(4)
Step 8. Construct the Lagrangian function by introducing Lagrangian multipliers.
(5)
Step 9. Solve the discrete derivative. Use
to find the partial derivative and find the first-order discrete derivative in the left neighborhood of the given point
:
(6)
Similarly, the first-order discrete derivative in the right neighborhood of a given point
is:
(7)
Thus, the first-order discrete derivative of the discrete function
in the symmetric neighborhood at a given point
is:
(8)
Similarly, we can find the discrete derivatives in the
direction and the
direction:
(9)
(10)
This algorithm, based on discrete geometry, introduces the weighted idea from the distance aspect and integrates the smoothing strategy to obtain the derivatives
in all directions of the data point
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
is
, and the parameterized curve is a regular curve, then the calculation formula for the geometric characteristics of the discrete curve
is as follows:
1) Curvature of discrete curve:
2) Torsion of discrete curve:
In,
(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,
represents the variable neighborhood radius used to estimate the curvature or torsion of a spatial discrete curve,
and
represent the variable neighborhood radii used to calculate
and
, respectively. After analysis in the text, the neighborhood radius
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
and
respectively, and
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:
,
is the estimated value obtained using the method in this paper, and
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:
(2) Viviani curve:
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
, where
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
as 600 and the neighborhood radius
as an example for analysis, as shown in Table 1.
Table 1. Relevant data of underground pipelines.
Index |
|
|
|
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.