# Automatic Measurement of Inclination Angle of Utility Poles Using 2D Image and 3D Point Cloud
## 2 The Proposed Method
### Pole Central Axis Fitting and Angle Calculation  
The shape of the outer contour of the pole is mostly an approximate cone or cylinder. The pole point cloud is a set of point clouds with an outer contour of half arc surface and  
Figure 12: Network structure of PointNet. inclination in any direction of space. It is difficult to directly fit the regular geometric model to obtain an accurate central axis. Hence, the method of piecewise fitting is implemented to obtain the central axis of the pole point cloud and calculate the inclination angle. The specific steps are as follows:  
(1) The pole point cloud is divided in the height direction (\(Y\)-axis), and then the point cloud data is cut out in two planes every 0.5 meters along the \(Y\)-axis direction, and each piece of the segmented data is processed separately. (2) Each intercepted point cloud is processed into a cylinder model, which is fitted using the RANSAC algorithm [34]. The basic flow of the algorithm is as follows:  
Step 1: Randomly select \(n\) points from the sample data set to construct the initial model. Generally, the least mean square algorithm is used to calculate the model parameters, where n needs satisfy the minimum data required for the model, for the cylinder model, \(n>6\). Step 2: The constructed model is used to test other data points, then the deviation of all sample points from the model is calculated. Set a threshold \(T\). Next, the sample points whose deviation is less than the threshold \(T\) are considered as inner points, otherwise, they are considered as outer points. Step 3: Only the more accurate model is retained according to the number of interior points and the error rate of the model. Step 4: Repeat the above steps until the set number of iterations \(k\) is met. Here, \(n\) is set to 100, \(T\) is set to 0.3, and \(k\) is set to 10,000, experimentally. In addition, the estimated radius of the cylinder \(R\) is set to 0-3, and the distance weight of the surface normal is set to 0.2. After the RANSAC algorithm iteration, the output result is an inner point set with noise-free and seven model parameters including the position coordinate (\(x\), \(y\), \(z\)) of a point on the axis, the axis direction vector \(\left( \begin{smallmatrix}\rightarrow&\rightarrow&\rightarrow\\ x,y,z\end{smallmatrix} \right)\), and the cylinder radius \(R\). The parameters uniquely determine a cylinder model, and then the coordinates of any other point on the axis can be expressed as Equation (17). Select five points equidistant from the axis of each section as the center point. \[\left\{ \begin{array}{l}x_{1}=x+t\times\overset{\rightarrow}{\underset{x}{ \times}}\\ y_{1}=y+t\times\overset{\rightarrow}{\underset{y}{\times}}\\ z_{1}=z+t\times\overset{\rightarrow}{z}\end{array} \right. \tag{17}\]  
where, \((x_{1},y_{1},z_{1})\) is the position coordinate of any point on the axis, \(t\) is a constant, which is determined by the intercepted interval position and the number of selected points. (3) Referring to the space linear equation, as shown in Equation (18), the least squares method is used to fit the spatial straight line for the center points obtained by all the segments [35], which is expressed as Equation (19), and the fitted spatial straight line is the central axis of the pole. The fitting results of the central axis of the pole are shown in Figure 13.  
\[\frac{x_{i}-x_{0}}{m}=\frac{y_{i}-y_{0}}{n}=\frac{z_{i}-z_{0}}{p} \tag{18}\]  
\[\left[ \begin{matrix}m&x_{0}\\ n&y_{0}\end{matrix} \right]=\left[ \begin{matrix}\underset{y}{\sum}x_{i}z_{i}& \underset{y}{\sum}x_{i}\\ \underset{y}{z_{i}}&\underset{y}{\sum}y_{i}\end{matrix} \right]\left[ \begin{matrix} \underset{z}{\sum}z_{i}^{2}&\underset{z}{\sum}z_{i}\\ \underset{z}{\sum}z_{i}&n\end{matrix} \right]^{-1} \tag{19}\]  
(4) Arbitrarily take two points on the central axis of the pole, and use Equation (20) to calculate the inclination angle of the pole.