An Efficient Voxel-Based Segmentation Algorithm Based on Hierarchical Clustering to Extract LIDAR Power Equipment Data in Transformer Substations

Light detection and ranging (LIDAR) scanning is a common method of substation scene modeling that extracts point clouds of electrical equipment from the point cloud scene of a substation. The extraction effect is limited by uncertainty regarding the noise level, nonuniform point cloud density, and the computational complexity. In this paper, we propose a point cloud extraction solution for electrical equipment models. First, a statistical analysis of substation ground elevation is performed to obtain the point clouds of devices at the feature height and remove large numbers of redundant underground point clouds. Second, based on the statistically derived power equipment feature heights, the point cloud data are sliced according to the featured elevation intervals. Based on voxelization, the point cloud slices are then clustered using horizontal hierarchical clustering. The clustering results at different elevation intervals are then reclustered using vertical hierarchical clustering. Finally, we use filters combined with the DBSCAN algorithm to perform fine segmentation on the point cloud data. The results show that our slice clustering approach reduces the computational burden involved in point cloud processing, and the comprehensive clustering strategy ensures the accuracy of the clustering results.


I. INTRODUCTION
A 3D model can be built by a light detection and ranging (LIDAR) system after obtaining 3D laser point clouds of electrical equipment in a substation. These models are widely used in the power industry during grid construction and operation [1]- [3]. In the substation modeling field, the solutions commonly used in production are often manually compared to the ground truth by combining individual field photos and CAD models, which is a burdensome and difficult task because of the complex structures. Fast segmentation is a key technology that can improve modeling efficiency [4], [5]. However, few studies on fully automatic The associate editor coordinating the review of this manuscript and approving it for publication was Arash Asrari . segmentation methods [6] for point cloud scenes in electric substations have been reported.
Point cloud segmentation in substation scenes typically lacks large numbers of prior models [7], [8]. Density-based and distance-based clustering methods are commonly used methods for segmenting point clouds [9], [10]. The densitybased clustering method can remove noise based on the density differences between the noisy point clouds and the target point cloud and can obtain the target point cloud cluster, which has a higher density [11]. However, when the density of the noise point cloud is close to or greater than the density of the target point cloud, the density-based clustering method does not work well [12]. In addition, the density-based clustering method carries a high computational burden because it requires calculating the density relationship between the local and overall point clouds [13]. Because substation scenes result in point clouds with data volumes that can reach tens to hundreds of gigabytes, traditional desktop computers may suffer from memory overflow problems. Thus, density-based clustering is not suitable for performing fast point cloud segmentation with large amounts of data.
The distance-based clustering method is computationally more efficient than the density-based clustering method, making it more suitable for fast segmentation of point clouds with large amounts of data [9]. However, the basic conditions under which distance-based clustering methods can achieve better clustering results are limited to the following: the distance between clustering targets must be large, and there should be no point cloud noise interference between them [13], [14]. When noisy point clouds exist between the targets, the clustering effect will be greatly reduced [15]. Considering that the continuity of the spatial distribution of substation equipment point clouds is better than the continuity of the noise point cloud, the noise can be identified and removed based on this spatial discontinuity. This means that the denoising of the substation point cloud scene and segmentation of the target device point cloud can be completed simultaneously using the distance information.
To improve the efficiency of segmenting substation point clouds scenes, we divide the segmentation process into two stages. First, the distance clustering method is used to perform rapid preliminary clustering. In the rapid preliminary clustering stage, we project the 3D scene point cloud to 2D feature planes of different heights and integrate the 2D clustering results through hierarchical clustering. This operation not only improves the computational efficiency by reducing the dimensionality from a three-dimensional to a two-dimensional clustering process but can also use vertical continuity to remove noise. Second, the density method is used to perform fine clustering, which further improves the accuracy of the segmentation results.
In the remainder of this article, we first review the existing clustering methods in Section II and explain the characteristics of the distance clustering method and the density clustering method used in our clustering algorithm. In Section III, we present the characteristics of our measured substation dataset and provide an overview of our framework. The detailed steps of the method are listed in Section IV, and the results of each step are shown in Section V. The effects of the proposed method are discussed in Section VI, including its anti-interference ability, segmentation accuracy and calculation efficiency. Finally, Section VII concludes the paper.

II. RELATED WORKS
At present, point cloud segmentation and extraction methods can be roughly divided into four categories [16], [17]: edge-based methods, region-based methods, model-matching methods and machine learning methods. Edge-based detection is an old but effective method. Although edge-based detection methods offer fast segmentation, they can produce inaccurate results in cases with common noise and uneven density in point cloud data [18], [19].

A. REGION-BASED METHODS
The region-based methods are more robust to noise than are the edge-based methods [20]. These methods use neighborhood information to combine neighborhood points with similar properties and obtain isolated regions, thereby enabling the discovery of the differences between different regions [21]. Seed segmentation is a region-based method that does not require much prior knowledge to acquire regional nodes. In this method multiple seed points are first selected; then, using a predetermined similarity criterion, each region grows by adding neighborhood points [22]. The disadvantage of this method is that it is both highly sensitive to background noise and requires lengthy executions time [17].
To address the time consumption problem in segmentation, some studies divide segmentation into two stages: coarse segmentation and detailed subdivision [23]. The coarse segmentation method first extracts the main target from the scene; then, the detailed segmentation is used as a refinement process to extract more detailed information about the target component. This clustering algorithm has low time complexity [17], but its segmentation accuracy is highly dependent on selecting the correct seed points.
To address the problem of algorithms being excessively sensitive to background noise, some studies have used a combination of normal and curvature information to smooth the constraints between different regions [22], [24]. This approach reduces the impact of background noise on the clustering results to a certain extent. However, these methods are very sensitive to inaccurate estimations of the initial seed region.
Therefore, the region-based methods typically depend strongly on whether the selected seed points are correct. Moreover, selecting seed points and controlling the growth process are both time consuming.

B. MACHINE LEARNING METHODS
In machine learning methods, unsupervised learning does not require much prior knowledge. K-means clustering and K-NN are the two most common classification algorithms in unsupervised learning, but these methods require predefining the number of clusters to create, and the cluster value is often unknown in substation scenarios [25], [26].
Density-based spatial clustering of applications with noise (DBSCAN) is an unsupervised learning method that does not require a preset number of clusters and can remove noise while clustering [9], [11]. Although DBSCAN algorithm is well-established and has been widely used on samplelimited datasets, the computational burden will be very heavy if DBSCAN is applied indiscriminately to large data sets [11], [27]. However, DBSCAN performs clustering by considering only the density information. Therefore, if the point cloud densities of different devices vary substantially and the noise density is close to the device density, DBSCAN will have only a limited effect [28], [29].
Hierarchical clustering is another common unsupervised learning method for clustering that attempts to divide the VOLUME 8, 2020 dataset at different levels to form a treelike clustering structure [30]. Datasets can be divided into ''bottom-up'' aggregation strategies or ''top-down'' split strategies [31]. Hierarchical clustering is similar to the region-based methods, but is more flexible when operating in high-dimensional data spaces. The advantage of hierarchical clustering is that it can control the clustering of data sets at different scales; however, its disadvantage is that it requires large amounts of calculation [32], [33].

C. SUMMARY
The region-based methods have the highest computational efficiency when the noise level is small. However, without prior knowledge, a high noise level makes it very time consuming to select seed points and control the growth process. The biggest problem with unsupervised learning methods is the amount of calculation they require. In addition, when the density of the target point and the noise density are similar, the effect of this method is limited.
Based on the characteristics of these methods, we can first apply a hierarchical clustering method, which is similar to a region-based method, to reduce the dimensionality of the 3D scene point cloud data by limiting it to different 2D planes and then performing clustering to improve the computational efficiency. Point cloud noise can then be removed based on the vertical continuity via vertical hierarchical clustering. Then, because these preliminary clustering results reduce the noise level, the clustering results can be further processed using DBSCAN.
In view of the three problems with the above methods, we have carried out the following works: (1) By analyzing the probability distribution of the ground point cloud, we obtain the ground elevation and remove a large number of redundant point clouds, which alleviate the problem of massive calculations.
(2) We use the vertical clustering method based on different feature heights to reduce the clustering from threedimensional to two-dimensional clustering, which not only alleviates the massive computational burden but also removes the high-density point cloud noise and alleviates the uncertainty in the noise level.
(3) We use DBSCAN to further process the point cloud data to extract the point clouds of devices by clustering while removing the noise.

III. OVERVIEW OF OUR APPROACH
The point cloud of the substation scene selected in this paper comes from the 220 kV area of the Maohu Substation in Guangdong, China. The collection device is a Faro FocusS 70 laser scanner, and the observation method is ground observation. The accuracy of the point cloud is ±1 mm. We use the Geomagic software (Faro software kit) to preprocess the data and register it with the data for each station to obtain the point cloud of the substation scene. This approach fully meets the requirements of substation modeling; the average accuracy of point cloud registration for the entire scene is 15 mm, which is well below 1% of the actual equipment size. A top view of the point cloud of the substation scene is shown in Figure 1a.
Electrical equipment can be divided into two categories: (1) isolated phase devices (Figure 2a-d) and (2) three-phase devices (Figure 2e-h). Isolated phase devices usually exist independent of other devices except for the wires at the top. Three-phase devices with connecting rods on a cement shelf exist between the different phase devices (Figure 2a, g, h).
The entire scene includes 235 devices, where the number of single-phase equipment is 190, the number of three-phase equipment is 45. We selected a subregion (Figure 1a) to show the detailed distribution of device point clouds and noise point clouds (Figure 1b). The yellow frame contains both threephase and single-phase equipment, and there is a thin connecting rod in the middle of the three-phase equipment. The violet frame contains nine single-phase devices. The middle three are independent voltage transformers that are connected to other devices on both sides through the top wires.

2) POINT CLOUD DENSITY
We chose different neighborhood radii to determine the point cloud density (Figure 3). When the neighborhood radius is 0.03 m, the density threshold for distinguishing device point clouds from noise point clouds is approximately 200,000. A point cloud with a density greater than 200,000 occupies only a small part of the total device point cloud; thus, it is difficult for these point clouds to be used to correctly segment the device point cloud. Especially for the device point cloud in the yellow box, the neighborhood density of most points is below 10,000, which is similar to the neighborhood density of noise points.
When the neighborhood radius is 0.1 m, the density threshold for distinguishing the device point cloud from the noise point cloud is approximately 15,000. However, the continuity of the point cloud in the connection part of the three-phase device in the yellow frame is not good, and the three-phase device can easily become divided into three single-phase devices. Moreover, the wire point cloud density value on top of the 9 single-phase devices in the violet frame is greater than 20,000. If that is regarded as a valid device point cloud, these 9 single-phase devices will be connected to 3 threephase devices, which leads to undersegmentation.
When the neighborhood radius is 0.5 m, the density threshold for distinguishing the device point cloud from the noise point cloud decreases to approximately 5,000. The continuity of the point cloud of the connection part of the three-phase equipment in the yellow frame is enhanced, but the oversegmentation problem it causes does not improve.
Therefore, the density of the point cloud in the connection part of the three-phase equipment is too similar to the density of the noise point cloud, and it is difficult to find a suitable neighborhood density threshold to separate them.  This characteristic degrades the ability to accurately segment the point clouds of substation scenes.

B. SEGMENTATION WORKFLOW
The point cloud segmentation process of the substation scene is shown in Figure 4. The process can be divided into three steps: terrain correction, hierarchical clustering analysis and fine reclustering.
In the terrain correction stage, to obtain the ground elevation, we divide the entire substation scene into small grids and obtain the ground elevation corresponding to each small grid based on a statistical histogram. Then, invalid underground point clouds can be eliminated according to the ground elevation.
The hierarchical clustering analysis step can be divided into two steps: horizontal hierarchical clustering and vertical hierarchical clustering. First, point cloud slices at different feature elevation intervals are clustered horizontally. The clustering process uses voxel units to mesh the point cloud, which avoids the inefficiency of performing large numbers of point cloud operations. Then, we use vertical hierarchical clustering to reintegrate the results of each horizontal cluster.
In the fine reclustering stage, we apply DBSCAN to remove residual noise while extracting and segmenting finescale device point clouds with complex shapes.

A. TERRAIN CORRECTION
Assume that there are N points in the point cloud P of the substation scene; then, P is expressed as follows: where x, y, z represent the pbosition coordinates, and c represents the color information of the point. We project the cloud P of the substation site on the Z axis to form a dataset P z that can be expressed as where the horizontal coordinate information (x and y) and color information are ignored in P z , and the number of points VOLUME 8, 2020  Figure 2b. The point cloud density is the volume density, calculated by the CloudCompare [34]. The r is used to estimate the radius of the volume.
in P and P z is the same as N . The histogram of the dataset P z is calculated. The width of the statistical equal-width bins is dz. Histogram statistics can identify the bin with the largest number of points as the ground height interval because the ground point clouds are usually concentrated in a certain height interval. This global statistical method directly counts the ground height of the entire substation area when the terrain of the substation is flat and the ground height remains unchanged. However, when the substation has undulating terrain, the ground height of the entire area does not truly reflect the ground height of all locations. In such cases, it is necessary to acquire more accurate statistics at various locations.
We divide the horizontal direction of the entire area into n x × n y small grids. There are N points in the grid with sequence numbers (m x , m y ). The dataset P of these points can be expressed as follows: where n x is the number of grids in the X direction and n y is the number of grids in the Y direction. By projecting the point cloud P onto the Z axis and ignoring the horizontal coordinate and color information, we can obtain P z : The data from different grids are then calculated as histogram statistics. The width of equal-width bins in statistics is still represented by dz. In the statistical results of the projected dataset P z|mx,my of each grid, the bin with the largest count can be identified as the ground height corresponding to the grid. We then traverse all the grids to obtain the ground height corresponding to the different grids. In some grids, the sparse ground point cloud will count the gantry height as the ground height. This wrong ground height is more than ten meters higher than the correct ground height in other areas, and can be regarded as outlier in the entire area. We replace the outlier by the interpolation result of the surrounding area. A flowchart of this terrain correction is shown in Appendix Table 3.
For calculating the ground height of a point cloud data as shown in Equation 2, the time complexity is O(n). When we analyze the ground height according to the fine statistics of the voxelized grid, we need to scan Nx × Ny the point clouds shown in Equation 3, and the time complexity is O((Nx × Ny)n). Considering that the processing of outliers will add c (constant) calculation steps with O(1), the time complexity is O((Nx × Ny)(n + c)), which is approximately equal to O(n).
The equipment height usually ranges from 10 to 20 m [35]. To make the accuracy range of the ground height close to 1% of the height of the device, a floating error of ±0.15 m is allowed. The statistical height interval dz is set according to the absolute floating error interval, which is 0.3 m. The upper and lower boundaries of the bins in the histogram are the maximum and minimum values of z in the statistical dataset. Since the ground slope in the substation does not exceed 5 degrees [35], an error of 0.15 m in the longitudinal direction corresponds to a range of 3 m in the transverse direction. We set the size of n x × n y small grids to 3 × 3 m 2 .

B. FAST HIERACHICAL CLUSTERING STRATEGY 1) VOXELIZED CLUSTERING
To speed up the clustering process, the fewer points that are involved in the clustering process, the better. We use voxels to represent the point cloud of a region. This process is similar to the downsampling process. When these voxels are sufficient to represent the point cloud of the overall substation scene, the clustering results are more accurate. Thus, selecting an accurate voxel size is essential for acquiring the positions of electrical equipment in the substation space when using the clustering algorithm.
The center position of each voxel is regarded as the position of the voxel unit, and the voxel grid can be regarded as a set of points. We use distance-based clustering under a specific distance threshold ( Figure 5). The distance threshold in this clustering algorithm is the desired minimum distance between clusters. Figure 5 shows that when the threshold distance is large, discrete points can easily be mistaken for continuous points. The goal is to include as few discrete noise signals in the continuous device point cloud as possible when clustering a substation scene point cloud. Consequently, the logical approach is that the smaller the distance threshold is, the better. However, at the same time, we need to prevent occlusions in the point cloud collection from causing discontinuities in the device point cloud, even if the possibility of such occlusions is small. Therefore, based on comprehensive consideration, we set the threshold distance to twice the size of a voxel unit.
All the voxels in the point cloud are regarded as valid voxel units and will be counted. The voxel size is set to 0.2 m. The lateral span of electrical equipment is usually between 5 and 20 m [35], which is dozens of times the size of the voxel unit. The device with the smallest lateral span is an insulating pillar with a lateral size of 1.5-2 m; even that is at least 5 times the size of a voxel unit. This means that a 0.2 m voxel size is sufficient to determine the locations of devices in space.

2) HORIZONTAL HIERARCHICAL CLUSTERING
The voxel grid clustering results may include many special clusters. Elements in special clusters are distant from each other (Figure 5c, d); however, the bounding boxes of these clusters may be adjacent or even contained in another bounding box (Figure 6a, b). For this cases, we recombine the special clusters into one cluster. This recombination process can be regarded as hierarchical clustering based on the original distance clustering procedure (Figure 5c, d). The hierarchical clustering strategy merges the clusters whose outer bounding boxes intersect, are adjacent, or have a containing relationship.
We use the following recombination algorithm (Table 1) to cluster the bounding boxes with a hierarchical strategy. This hierarchical clustering strategy (Figure 6c, d) is an extension of the voxel clustering strategy that also reduces the number of clusters. The shapes of the bounding boxes conforms to the distribution law of electrical equipment in a substation scene.
The cross condition for determining whether box A = {x min , x max , y min , y max } intersects with box B = {x min , x max , y min , y max } in a certain way can be expressed as Equation 5.
The horizontal hierarchical clustering repeatedly crossvalidates the boxes in the box set. The determination of crossvalidation in the loop is shown in Equation 5, and the time complexity is O(1). The repeated cross-validation process is a nested loop ( Table 1). As shown in Table 1, the outer loop is shown in step 2, and the sub loop is shown in step 2.2. The number of sub-loops decreases as the collection VOLUME 8, 2020  size decreases, and the time complexity of the outer loop is O(nlogn). dx 1 ≤ dx 2 and dy 1 ≤ dy 2 dx 1 = x min + x max − x min − x max dx 2 = (x max − x min ) + x max − x min dy 1 = y min + y max − y min − y max dy 2 = (y max − y min ) + y max − y min .

3) VERTICAL HIERARCHICAL CLUSTERING
We can project the slices of point cloud data of different heights onto the same plane for hierarchical clustering using a vertical constraint strategy. We divide the point cloud data into three height ranges: h0, h1 and h2. In each height range, the point cloud data are clustered by the horizontal clustering algorithm for the voxel grid. If the corresponding grids belong to clustered grids in different height intervals at the same horizontal grid positions, then the clusters can be recombined into one group. In this case, it can be seen that point clouds belonging to the same cluster have better continuity in the different height intervals (red grids, Figure 7). However, noise data should not have the same vertical continuity. Noise signals may have continuity within a certain height range but poor continuity over a larger height range, as illustrated by the blue grids in Figure 7. The horizontal hierarchical clustering results of the discontinuous height intervals are used for reclustering, which has a stronger ability to suppress noise. Therefore, we can choose the clustering results in discontinuous slices for vertical hierarchical clustering ( Figure 7).
If the results of the horizontal hierarchical clustering at different height intervals show intersection, adjacency, or inclusion relationships, we consider them as the same cluster and use the algorithm shown in Table 1 to recluster the boxes. This case is depicted as the clustering process for the green grids in Figure 7. This process repeatedly calls the recombination algorithm (Table 1), and the number of calls is constant and determined by the number of horizontal slices. The time complexity of this process is O(nlogn).
To avoid undersegmentation caused by the point cloud of connecting wires at the top of each connected equipment (shown in the violet frames in Figure 3), we cluster the point clouds below the wire height. Considering the vertical continuity of each piece of equipment, when the equipment point clouds under the wire are clustered accurately, the horizontal range of each cluster will represent the horizontal range of the equipment. The height of the wire connecting each piece of equipment is determined by the height of the device itself and is usually no more than 5 m [35].
We conservatively select the point clouds whose height does not exceed 4 m as the objects to be clustered. At the same time, to further prevent any influence from individual ground point clouds that have not been removed, the lower limit of the height of the clustered point clouds is set to 1 m. Therefore, the three projection slices in Figure 7 are equally divided from point clouds with heights of 1-4 m. The three slices represent point cloud data at three different height intervals: 1-2 m, 2-3 m, and 3-4 m. Here, we use the previously estimated ground height as the starting 0 m height.

C. FINE RECLUSTERING
After implementing the abovementioned hierarchical clustering strategy, a small number of noise signals remain in the clustering results, but their noise density is relatively small and easy to identify. To further remove this remaining noise, we use DBSCAN to recluster the point cloud, which still possesses a small amount of noise. The DBSCAN algorithm is advantageous because there is no need to prespecify the number of clusters, which will reflect the unpredictable number of devices in the substation. Another feature of the DBSCAN algorithm is that it can judge abnormal values during clustering, which meets the requirement for removing noise from the data.
Although there are some state-of-the-art methods that are better than DBSCAN [36]-[38], when the results of fast hierarchical clustering are sufficiently accurate, traditional DBSCAN can already achieve better clustering results. If the fine re-clustering based on DBSCAN can obtain good results, it cannot only show the effectiveness of our framework, but also show that our framework can provide preprocessing solutions without these state-of-the-art methods.
The parameters required by the DBSCAN algorithm are the minimum intercluster distance ε and the number of minimum points in each cluster min_pts. The minimum distance between clusters refers to the smallest horizontal distance between substation equipment. The horizontal distance between equipment is often greater than 5 m, and the minimum distance is typically between 1.5 and 2 m. Assuming that the horizontal distance between the devices in each cluster is greater than 1.0 m, this fully complies with the safety distance specifications for placing these devices [35]. Therefore, we set the minimum intercluster distance (ε) in DBSCAN to 0.7 m.
The size of equipment is typically on the order of meters, while the distance between the points in the point cloud representing the equipment is on the order of centimeters. This means that in a three-dimensional space, a point cloud cluster representing equipment contains hundreds or thousands of points. Thus, we conservatively set the minimum number of points in each cluster (min_pts) in DBSCAN to 10, which is sufficient to meet the clustering requirements.

A. REMOVING GROUND DATA
The number of substation scene point clouds (Equation 2) that appear at different height intervals were counted as shown in Figure 8a. From the histogram, the number of points counted in bins from 0.3-0.6 m is much larger than the number of points in the other bins. Consequently, this interval can be considered as the height interval where the ground is located. The ground height estimation for the entire substation scene reflects the ground height at a global scale.
Considering the height variations of the ground, to obtain a more precise estimation of the ground height, we count the number of substation scene point clouds (Equation 4) that fall into different height intervals and assume that the ground height corresponding to each grid is the height interval corresponding to the peak value in each histogram. The ground height value can be obtained by taking the middle value of the height interval. The contour map formed by the ground height values of each grid after kriging interpolation is shown in Figure 8b.
The results after removing the ground points ( Figure 9) show that overall statistics of the ground height of the substation without grid division would be unable to obtain accurate ground height information and that using the overall statistics would not completely remove the belowground point cloud data (Figure 9a). Thus, ground height statistics based on the grid division provide more accurate ground height information. The result after removing the ground point clouds by this method are shown in Figure 8b. The removal is complete and clean. At this point, all ground information including the cement roads surface is removed.
The change in the point cloud dataset size after removing ground point cloud data is shown in Appendix Table 4. Removing the ground data reduces the number of points substantially (by approximately 40%), which greatly improves the computational efficiency of subsequent processing. The vertical starting heights of the point clouds do not all start at 0 m. In the substation scenario, the vertical size of each device is the relative height information. To obtain the point cloud at the characteristic height, it is necessary to obtain the absolute height value starting from 0 m. Therefore, another function of evaluating the ground height is to obtain the starting height of the slicing operation in hierarchical clustering.

B. FAST CLUSTERING WITH HIERACHICAL STRATEGY
We extracted the original point cloud data with an elevation of less than 4 m into three slices at one-meter intervals. The H0 slice data correspond to point cloud data with elevations of 1-2 m; the H1 slice data correspond to point cloud data with elevations of 2-3 m; and the H2 slice data correspond to point cloud data with elevations of 3-4 m. The original point cloud data for slices H0 and H2 are shown in Figure 10a and b. Each slice is processed by the voxel grid clustering algorithm and the horizontal hierarchical clustering algorithm to obtain the outer bounding boxes of each cluster.
Then, the boxes from the different height slices can be reclustered by the vertical hierarchical clustering algorithm, yielding a new clustering result on the horizontal ranges of equipment. The boxes in H0 and the boxes in H2 are integrated by the vertical hierarchical clustering algorithm to obtain the clustering result H02 (Figure 10c), which still contains multiple outer bounding boxes. Then, these new boxes are reintegrated with the boxes in H1 through the vertical hierarchical clustering algorithm (Figure 10d).
The number of noise point clouds in H02 is smaller than the number of noise point clouds in H0 and H2. This shows   DBSCAN algorithm; (b) clustering results by the refine recluster for abnormally distributed devices, which contain 1 three-phase device and 2 single-phase devices; (c) clustering result by the fast clustering with hierarchical strategy for abnormally distributed devices, which shows the undersegmentation of three devices into a cluster. that using the vertical hierarchical clustering constrains the point clouds belonging to different height intervals, which effectively uses the vertical discontinuity of the noise point cloud and successfully removes most of the noise in the point cloud of the substation scene. However, because the H0 and H2 data do not include the point cloud of the connecting rod of the three-phase equipment (as shown in the red frames in Figure 10), the point cloud in H02 represents the three-phase equipment as three single-phase equipment.
With the addition of the H1 data, the result (H012) includes the connecting rod point cloud, and the point cloud that needs to be clustered becomes complete. However, the small amount of noise point clouds in H02 did not decrease with the addition of H1. The main noise areas are marked by the yellow frames in Figure 10d.

C. FINE SEGMENTATION
We further performed DBSCAN clustering after hierarchical clustering. The results showed that the DBSCAN clustering algorithm is able to remove most of the residual noise ( Figure 11). The remaining main noise in H012 (indicated by the yellow frames in Figure 10d) is effectively removed in the DBSCAN clustering results. The better the denoising effect is, the smaller the clustering interference of the noise point cloud is to the equipment point cloud, and the more accurate the clustering result is.
The DBSCAN results show that it not only effectively removes noise but also accurately extracts abnormally distributed equipment (Figure 11b, c). The range of clusters is intelligently determined by our hierarchical clustering method based on box intersections is rectangular. When the main axis of the three-phase equipment does not strictly lie along the X or Y directions, the distribution of this device is considered abnormal. The bounding boxes of the clustering results will enclose the point clouds of other equipment (Figure 11b), resulting in undersegmentation. DBSCAN solves this undersegmentation problem and extracts the single-phase equipment point cloud mistakenly enclosed in the three-phase equipment point cloud cluster.

A. NOISE REMOVAL
The most important feature of our method is to cluster the point clouds of equipment in the substation point cloud scene by using the rapid clustering characteristics of distance information. However, the effect of the method based on distance information is seriously affected by noise. Therefore, it is necessary to evaluate the effect of removing noise point clouds from the substation scene point cloud. The statistical outlier removal (SOR) is a commonly used point cloud denoising method, and we adopt this method to evaluate the denoising effect.
The results of SOR are affected by the k and n values. When n changes, the effects of processing the data directly with SOR filtering are shown in Figure 12, where it can be found that changes to the n value have little effect on the denoising results, but when k is too large, the connecting rods will be noncontinuous. We want the denoising effect to be affected by k as little as possible and retrain more effective point clouds.
After using the hierarchical clustering method to process the point cloud of the entire substation, the equipment point clouds can be extracted with a lower noise level. We use SOR to further filter these point cloud data to observe whether changes occur in the equipment point cloud. The SOR result is affected by the values of k and n. The effects of using SOR filtering to process the data directly are shown in Figure 12 as k and n change. The results show that changes to these parameter values in the SOR have little effect on the final device point clouds produced by our method, which indicates that our method has strong denoising ability.
The k value is a parameter that determines the size of the estimated neighborhood, and it has a greater impact on the point clouds of connected parts of the equipment. We selected a three-phase equipment for testing purposes that connected part of the point cloud and whose clustering result was discontinuous due to the presence of occlusions. The test results are shown in Figure 13. The k value is less sensitive to the processing results of the proposed method (Figure 13a, b), but when processing point cloud data with traditional methods, even small variations may cause the connecting rod in the middle of the device to appear disconnected (Figure 13c). This disconnection can cause a three-phase device to be mistakenly clustered into two devices. This test verifies that the data we extracted have a low noise level.

B. REMOVING OTHER INTERERENCES
Substation scenes include various power switch boxes on the ground, and the point clouds may also contain data of construction workers. The vertical hierarchical clustering algorithm with different elevations can prevent the final clustering results from including such nonequipment information.
The heights of construction workers and power switch boxes are generally no greater than approximately 2 m. Slices are selected in the 1-2 m elevation interval for horizontal hierarchical clustering, and a set of clustering results will includes these interferences. In the proposed algorithm, we also select slices with a height of 3-4 m for horizontal hierarchical clustering. Then, we use the vertical hierarchical clustering method to integrate the horizontal clustering results of these two different height intervals. The integration process will directly identify point cloud data representing construction workers and power switch boxes as noise ( Figure 14).

C. SEGMENTATION ACCURACY AND EFFICIENCY
In the proposed method, the results of hierarchical clustering are then reclustered by DBSCAN. We compare the results of the proposed method for processing the point cloud of the substation scene with the result of using DBSCAN directly.
The results after using DBSCAN to directly process substation site point clouds show that the clustering results are shown in Figure 15. In the processing result of the original point cloud (Figure 15a), the clustering result  is chaotic and mixed with a large number of noise point clouds that have not been effectively eliminated by DBSCAN.
Using SOR (k = 20, n = 1.0) to process the original point cloud, which can effectively remove most of the noise point cloud in the original point cloud. The results of clustering the denoised point clouds with DBSCAN show that DBSCAN's ability to suppress residual noise is still limited (Figure 15b, c and d). The residual noise will cause a large number of oversegmentation and undersegmentation in the clustering results of DBSCAN.
The number of point cloud clusters segmented by the two methods is shown in Table 2. Different DBSCAN parameters  (ε and min_pts) have been considered. The ε value fluctuates based on the 0.7 m we set. Considering that the point cloud density is strongly affected by the sparse ratio parameters, we set a large range of 10-100 for min_pts. The number of clusters in Table 2 shows that the min_pts parameter values have little effect on the clustering results.
A comparison of the number of acquired point cloud clusters shows that the segmentation accuracy of using DBSCAN directly is extremely unstable. The segmentation accuracy falls below 40% when ε is 0.7 m because most equipment point clouds of equipment are then judged as noise by DBSCAN. The results of our method are shown in Figure  16. When different DBSCAN parameters are applied in our method, the clustering results remain basically the same. This comparison shows that our method has better parameter stability.
In Figure 16a, c and f, the point clouds of the threephase equipment are oversegmented into two or three closely connected clusters, which is an important reason underlying the different numbers of point cloud clusters in Table 2. This oversegmentation occurs when the point clouds of threephase equipment with connecting rods are sparser than those of other equipment. Fortunately, these oversegmented clusters are adjacent and can be merged directly by using the neighbor relationship. The total number of merged point cloud clusters is shown in Table 2. The final accuracy rate shows that different DBSCAN parameter values have little effect on the segmentation accuracy.
In Table 2, the calculation time of our method is divided into two parts: the running time of fast hierarchical clustering and the running time of DBSCAN in fine reclustering. The time complexity of the terrain correction step is O(n), which is suitable for processing a large number of threedimensional point clouds of the entire substation scene. In the fast hierarchical clustering step, the voxelized clustering belongs to an agglomerative cluster with a time complexity of O(n 2 logn), which has a relatively high complexity. However, the voxelization reduces the amount of data, which makes the calculation time of the fast hierarchical clustering process not significantly increase. The time complexity of horizontal hierarchical clustering, vertical hierarchical clustering and DBSCAN are all O(nlogn), which is consistent with the common clustering algorithm using accelerated index structure with O(logn). The subsequent neighbor agglomerative process is based on the existing clustering results, and the size of the cluster set participating in the clustering is small. Therefore, even if the time complexity of the final aggregation process is O(n 2 logn), the actual execution speed is still relatively fast.

VII. CONCLUSION
In this paper, we proposed a data processing framework to quickly extract power equipment point clouds from point cloud substation scenes. The framework contains three main steps: terrain correction, hierarchical clustering and fine reclustering. We applied the proposed method to process a measured point cloud for a substation. The results show that terrain correction can remove nearly 40% of the redundant point cloud data. The horizontal hierarchical clustering based on bounding box cross-validation avoids the need to calculate the mutual distances between each point in each cluster, while vertical hierarchical clustering integrates the reduceddimensional clustering results on the horizontal plane. This hierarchical clustering strategy not only improves the clustering efficiency but also effectively removes most of the noise point clouds from the substation scene. Based on the hierarchical clustering results, a fine reclustering using DBSCAN is able to successfully extract point clouds of equipment in a substation. Compared with using DBSCAN directly, our method both reduces the calculation time (to approximately 5-30% of the original time), and improves the segmentation accuracy to approximately 95%. Moreover, our method is less affected by preset parameter values and is extremely robust to noise.

APPENDIX
The specific terrain correction algorithm is described in Table 3. The original point cloud P contains a point cloud representing the ground, and the number of points in point cloud P is N . After removing the point cloud representing the ground from P using the terrain correction algorithm, the remaining point cloud is P , and the number of points in P is N .
The change in the point cloud dataset size after removing ground point cloud data is shown in Appendix Table 4.