Power line extraction method based on deep learning and morphological analysis

Through deep learning and morphological analysis methods, combined with semantic segmentation and individual segmentation, the problem of incomplete coverage in power line extraction is solved, accurate extraction and separation of power lines is achieved, and the safety and data processing capabilities of the power system are improved.

CN120259909APending Publication Date: 2025-07-04ZHAOTONG POWER SUPPLYING BUREAU OF YUNNAN POWER GRID
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411765347.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The prior art has problems in power line extraction with incomplete power line coverage and missing point cloud data. Especially when large-scale point cloud processing, it is difficult to ensure that each power line is fully extracted.

Method used

Using a method based on deep learning and morphological analysis, the semantic segmentation and individual segmentation of power corridors, combined with the steps of data preprocessing, local feature extraction, network input and classification, cross-power line extraction and single power line extraction, the DBSCAN clustering algorithm and geometric feature extraction method are used to ensure the accurate extraction and separation of power lines.

Benefits of technology

It improves the safety of the power system, reduces the cost of patrol and fault handling, extends the service life of the equipment, enhances data processing capabilities, and supports the construction of smart grids.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259909A_ABST
    Figure CN120259909A_ABST
Patent Text Reader

Abstract

The invention relates to a power line extraction method based on deep learning and morphological analysis, and belongs to the technical field of power line extraction. The method comprises the following steps: acquiring three-dimensional point cloud data of a power corridor by using an unmanned aerial vehicle carrying a laser radar, and preprocessing the data to remove noise and perform down-sampling; semantic segmentation is carried out on the point cloud through deep learning or a traditional algorithm, power lines, poles, trees and the like are classified, then a geometric feature extraction method is used for accurately extracting and separating individual power lines, and three-dimensional modeling is carried out on the individual power lines; finally, the verified power line data and analysis results are stored, and support is provided for safety detection and maintenance of the power equipment. According to the method, the safety of the power system is improved, the inspection and fault processing cost is reduced, the service life of equipment is prolonged, the data processing capability is enhanced, and the construction of an intelligent power grid is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power line extraction, and particularly relates to a power line extraction method based on deep learning and morphological analysis. Background Art

[0002] Currently, the power line detection method based on unmanned aerial vehicles (UAVs) has become an economical, effective and efficient solution. UAVs provide various data types for power line inspection through remote sensing technology. The accuracy of power line positioning extracted from two-dimensional observations is limited, while the point cloud data obtained from Lidar contains accurate three-dimensional coordinate information of objects, which is very important for constructing a three-dimensional map of UAV power line inspection and accurately measuring the potential dangerous areas of power targets.

[0003] Power line inspection includes two aspects: evaluating the state of power lines and their distances from potential threatening objects around, such as vegetation and buildings. Therefore, accurately extracting power lines and potential dangerous objects from point cloud data is the basis of power line inspection; in addition, semantic segmentation methods can be applied to finely classify the power corridor scene, and this fine-grained classification can more detailedly understand and analyze the objects in the corridor scene.

[0004] In previous studies, the extraction of power lines includes two independent steps: first, candidate power lines are extracted, and then they are refined to extract individual power lines from the candidate power lines; deep learning has shown good performance in classification and semantic segmentation. Point cloud semantic segmentation methods based on deep learning can be divided into four categories: multi-view based, voxel based, point-based and graph-based methods; PointNet aggregates each point feature through max pooling, but this will cause loss of local information. Therefore, many improved methods have been proposed, such as PointNet++ and PointWeb. However, due to expensive calculations and the inability to capture structures, these methods cannot directly process large point clouds. Although the above methods can well solve the overlapping problem, how to ensure that each power line can be completely covered without missing any power line points is still a challenge for individual power line extraction.

[0005] Therefore, how to overcome the deficiencies of the existing technology is an urgent problem to be solved in the current technical field of power line extraction. Summary of the Invention

[0006] The purpose of the present invention is to solve the deficiencies of the existing technology and provide a power line extraction method based on deep learning and morphological analysis, which can improve the safety of the power system, reduce the costs of inspection and fault handling, extend the service life of equipment, and enhance the data processing ability.

[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0008] A power line extraction method based on deep learning and morphological analysis, including power corridor semantic segmentation and individual segmentation;

[0009] The power corridor semantic segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and cross-power line extraction;

[0010] The individual segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and single power line extraction;

[0011] Among them, the data preprocessing is to normalize the XYZ coordinates of the point cloud to be extracted for power lines;

[0012] The local encoding module processing includes the following steps:

[0013] (1) Input point coordinates: Input the point cloud coordinates after data preprocessing, a total of N points;

[0014] (2) K-nearest neighbor search: For each point, find its K nearest neighbor points;

[0015] (3) Local feature extraction: Calculate the neighborhood of each point to obtain the local distribution characteristics; average pooling operation; calculate the standard deviation of the Z-axis coordinates of the points in the neighborhood as the local height standard deviation;

[0016] (4) Distance calculation and feature fusion: Calculate the distance between each point and its neighborhood points, concatenate the calculated local distribution characteristics, local height standard deviation and distance to generate a local feature representation;

[0017] (5) Perform a non-linear transformation on the concatenated local feature representation to generate the final feature vector as the encoded feature, and output the feature points;

[0018] The network input and classification includes the following steps:

[0019] (1) Use the encoded feature of each point as the input of the network, and use the semantic category of each point as the output to train the network;

[0020] (2) The network architecture includes: a spatial context feature module, random sampling, upsampling, a multi-layer perceptron, Dropout regularization, and a fully connected layer. The processing flow of the network architecture is: combine the spatial context feature module with random sampling to fuse context features from different scales; the multi-layer perceptron and upsampling process and restore the feature resolution layer by layer; generate the probability distribution of each category through the fully connected layer, so that each point is assigned to a semantic category; the semantic categories include: ground, vegetation, electric tower, and wire;

[0021] The cross-power line extraction includes the following steps:

[0022] (1) Power line data extraction: Extract the point cloud belonging to the wire category according to the network input and classification results;

[0023] (2) Power line cross-line detection: Horizontal slicing processing and distance threshold setting;

[0024] (3) Clustering analysis of tower structures: Extract the tower structure point cloud and select the DBSCAN clustering algorithm for clustering processing;

[0025] (4) Associating cross-power line points and tower structure points: Match the distances between the cross-power line points and the central points of tower structure clusters, and perform screening and optimization according to the matching results. The specific screening and optimization are as follows: If a cross-power line point is close to multiple tower structure clusters, further analyze its spatial position and height relationship, and select the most reasonable tower structure as the associated object; According to the geometric structure of the tower structure and the orientation of the power line, perform a rationality check to ensure the accuracy of the classification of cross-power line points and the association with tower structures;

[0026] (5) Result output and visualization: Visualize the cross-power line points and tower structure points in the point cloud, mark these points with different colors, and store the processed results in the standard point cloud format, including the category label of each point and the association information with the tower structure;

[0027] The extraction of a single power line includes the following steps:

[0028] (1) Power line data extraction: Extract the point cloud belonging to the wire category according to the network input and classification results;

[0029] (2) Rotate the power line to a specific direction: Calculate the power line direction and then perform coordinate system rotation;

[0030] (3) Stratification in the elevation direction: Perform stratification processing on the rotated power line point cloud data, and then perform in-layer clustering. The in-layer clustering is as follows: Perform preliminary clustering on each layer to ensure that each layer contains only the points of one power line; If a layer contains multiple power lines, use density clustering to further separate them;

[0031] (4) Radius filtering and point separation: Then perform radius filtering on the clustered point cloud data to separate individual power lines;

[0032] (5) Iteratively separate power lines: Separate layer by layer and update the point cloud;

[0033] (6) Result output and visualization: Save the point cloud of each separated power line as a separate file or data structure, visualize the results, and check the separation effect of each power line to ensure that there are no omissions or misclassifications in the separation process.

[0034] Further, preferably, the normalization process adopts the maximum-minimum normalization method.

[0035] Further, preferably, in local feature extraction, the neighborhood of each point is processed, and the specific method for calculating the local distribution characteristics is as follows:

[0036] The calculated local distribution characteristics include the average position and variance;

[0037] The calculation formula for the average position is:

[0038]

[0039] where n represents the number of nearest points, n = K; v i represents the position vector of the i-th nearest point; p represents the position vector of the center point, and the center point is the point corresponding to the calculation of the local distribution characteristics; μ represents the average position offset;

[0040] The calculation formula for the variance is:

[0041]

[0042] where σ 2 represents the variance;

[0043] The expression for the average pooling operation is:

[0044]

[0045] where f(p) represents the local feature of point p, n represents the number of neighbor points of point p, p i represents the i-th neighbor point of point p; g is the feature extraction function for neighbor points;

[0046] The calculation formula for the standard deviation of the Z-axis coordinates of the points in the neighborhood is:

[0047]

[0048] where σ z represents the standard deviation of the Z-axis coordinates, N represents the number of points in the point cloud coordinates after data preprocessing, z i represents the normalized Z-axis coordinate value of the i-th point, μ z represents the average value after normalization of the Z-axis coordinates, and the calculation formula for the average value of the Z-axis coordinates is:

[0049]

[0050] Further, preferably, in distance calculation and feature fusion, the distance between each point and its neighborhood points is calculated, and the distance adopts the Euclidean distance, and its calculation formula is:

[0051]

[0052] Among them, x p , y p , z p respectively represent the coordinate values of point p on the X, Y, and Z coordinate axes, and x q , y q , z q respectively represent the coordinate values of point q on the X, Y, and Z coordinate axes, and d(p, q) represents the Euclidean distance from point p to point q;

[0053] The specific method for concatenating the calculated local distribution characteristics, local height standard deviation, and distance to generate a local feature representation is as follows:

[0054] Use a multi-layer perceptron to map different local features to the same-dimensional space, thereby concatenating the local distribution characteristics, local height standard deviation, and distance;

[0055] The multi-layer perceptron includes an input layer, a hidden layer, and an output layer. The input layer, hidden layer, and output layer all contain multiple neurons, and are fully connected between layers. Each neuron applies a ReLU activation function to generate an output; the calculation formula from the input layer to the hidden layer is:

[0056] h = ReLU(W1f P + b1),

[0057] where h represents the feature vector output by the hidden layer, W1 represents the weight matrix from the input layer to the hidden layer, f P represents the input feature vector, and b1 represents the bias vector of the hidden layer;

[0058] The calculation formula from the hidden layer to the output layer is:

[0059] g P = W2h + b2,

[0060] where g P represents the mapped feature vector, W2 represents the weight matrix from the hidden layer to the output layer, h represents the feature vector output by the hidden layer, and b2 represents the bias vector of the output layer.

[0061] Furthermore, preferably, the expression of the non-linear transformation is:

[0062] h l = φ(W l ·h l-1 + b l ),

[0063] where hl represents the output feature vector of the l-th layer, i.e., the concatenated local features; h l-1 represents the output feature vector of the (l - 1)-th layer, W l represents the weight matrix of the l-th layer, b l represents the bias vector of the l-th layer, and φ represents the activation function;

[0064] The expression of the feature matrix is:

[0065] F = [p1, p2,..., p i ,

[0066] where F represents the entire feature matrix, and p i is the final feature vector of the i-th feature point, i.e.:

[0067] p i = [x i , y i , z i , f dist,i , f std,i , f other,i1 , f other,i2 , f other,i3 ,

[0068] In the formula, x i , y i , z i respectively represent the normalized coordinates of the i-th point on the X, Y, and Z coordinate axes, f dist,i represents the distance feature of the i-th point, f std,i represents the z-axis standard deviation feature of the i-th point, f other,i1 represents the local average position feature of the i-th point, f other,i2 represents the local variance feature of the i-th point, f other,i3 represents the local height feature of the i-th point.

[0069] Furthermore, preferably, in the network input and classification, the spatial context feature module is combined with random sampling to fuse context features at different scales. The specific steps include:

[0070] (1) Multi-layer convolution: Each layer of convolutional kernels extracts features at different scales, including low-level features and high-level features. The low-level features include local information, and the high-level features include context information. The expression of the multi-layer convolution is:

[0071]

[0072] Among them, represents the feature map at the position (i, j) of the m-th layer, represents the weight of the k-th filter of the m-th layer, Fm-1 represents the feature map of the previous layer, b m represents the bias term;

[0073] (2) Max pooling, and the expression of the max pooling is:

[0074]

[0075] where represents the feature map of the l-th layer at the position (i, j), represents the feature map of the (l - 1)-th layer at the position (a, b);

[0076] (3) Skip connection: Use the skip connection to combine the features of the downsampling path and the features of the upsampling path, and the expression of the skip connection is:

[0077] F l = F l-1 + H(F l-1 ; W),

[0078] where H represents the non-linear transformation function, W represents the parameter of the non-linear transformation function, F l-1 represents the feature map before the skip connection, F l represents the feature map after the skip connection;

[0079] (4) Multi-scale feature fusion is fusion based on the attention mechanism:

[0080] The expression for the multi-layer perceptron to process and restore the feature resolution layer by layer is:

[0081]

[0082] where y j represents the output of the j-th neuron in the hidden layer, f represents the activation function, w ij represents the weight connecting the i-th neuron in the input layer and the j-th neuron in the hidden layer, x i represents the eigenvalue of the input vector, b j represents the bias term of the j-th neuron;

[0083] The upsampling uses transposed convolution to process and restore the feature resolution layer by layer, and the expression of the transposed convolution is:

[0084] Y = Deconv(X; W, stride = s),

[0085] where X represents the input feature map, Y represents the output feature map, W represents the transposed convolution kernel, and s represents the stride;

[0086] The fully connected layer generates the probability distribution of each category through the Softmax activation function. The expression of the Softmax activation function is:

[0087]

[0088] where O j represents the unnormalized score of the network output layer for category j, x represents the input data, y represents the predicted target category, and O k represents the unnormalized score of the network output layer for category k.

[0089] Furthermore, preferably, in the extraction across power lines, the horizontal slicing process is specifically as follows:

[0090] Slice the point cloud along the path of the power line, and the slicing direction is perpendicular to the direction of the power line;

[0091] The distance threshold setting includes: calculating the height and horizontal distance of the points in each slice relative to the power line to set the distance threshold;

[0092] The calculation method of the height and horizontal distance of the points in each slice relative to the power line is: if a power line is defined by two endpoints, namely P1(x1, y1, z1) and P2(x2, y2, z2), and a point P(x, y, z) in the point cloud, then the calculation formula for the horizontal distance of the point relative to the power line is:

[0093]

[0094] where d horizontal represents the horizontal distance of the point P(x, y, z) relative to the power line;

[0095] The calculation formula for the height of the points in each slice relative to the power line is:

[0096]

[0097] d vertical = |z - Q z |

[0098] where Q z represents the coordinate of the projection of point P on the X-axis, Q y represents the coordinate of the projection of point P on the Y-axis, Q z represents the coordinate of the projection of point P on the Z-axis, z represents the Z coordinate value of point P(x, y, z), and d vertical represents the height of the point P(x, y, z) relative to the power line;

[0099] The method for setting the distance threshold is:

[0100] D 水平 = μ 水平 + k·σ 水平 ,

[0101] H 垂直 = μ 垂直 + k·σ 垂直 ,

[0102] where D 水平 represents the horizontal distance threshold, μ 水平 represents the average value of the horizontal distance, σ 水平 represents the standard deviation of the horizontal distance, H 垂直 represents the vertical height threshold, μ 垂直 represents the average value of the vertical height, σ 垂直 represents the standard deviation of the vertical height, and k is a constant.

[0103] Furthermore, preferably, the steps of the clustering process include:

[0104] (1) Select an unvisited point p as the starting point; the unvisited point is a point in the point cloud data that has not been marked as a power line.

[0105] (2) If point p is a core point, create a new cluster and add point p to the cluster.

[0106] (3) Find all neighbor points of point p and check whether these neighbor points are also core points.

[0107] (4) For each neighbor point n, if neighbor point n has not been visited, recursively execute steps (1) to (3).

[0108] (5) If neighbor point n has already been assigned to a certain cluster, add n to the current cluster.

[0109] (6) When all points have been visited, the algorithm ends.

[0110] The distance matching includes:

[0111] (1) For each detected cross-power line point, calculate its distance from the clustering center point of each tower.

[0112] (2) Find the tower point clustering with the closest distance and associate the cross-power line point with the corresponding tower.

[0113] The calculation formula for the distance between each detected cross-power line point and the clustering center point of each tower is:

[0114]

[0115] Among them, d represents the distance between the detected cross-power line point and the center point of the tower cluster, x p , y p , and z p respectively represent the X, Y, and Z axis coordinates of the detected cross-power line point, x c , y c and z c respectively represent the X, Y, and Z axis coordinates of the center point of the tower cluster.

[0116] Furthermore, preferably, in the extraction of a single power line, the calculation method of the power line direction is to use principal component analysis to fit multiple points on the power line to calculate the power line direction: Let the set of points on the power line be: {P i =(x i , y i , z i )|i = 1, 2,..., n}, where n represents the number of points, then the expression for calculating the mean μ of these points is as follows:

[0117]

[0118] Subtract the mean from each point to obtain the centered point

[0119]

[0120] Use the centered data to construct the covariance matrix C:

[0121]

[0122] Among them, μ x represents the average coordinate of the point in the X-axis direction, μ y represents the average coordinate of the point in the Y-axis direction, μ z represents the average coordinate of the point in the Z-axis direction, n represents the number of points in the set, x i represents the normalized coordinate of point i in the X-axis direction, y i represents the normalized coordinate of point i in the Y-axis direction, z i represents the normalized coordinate of point i in the Z-axis direction, centered X-axis coordinate, represents the centered Y-axis coordinate, represents the centered Z-axis coordinate;

[0123] Solve the eigenvalue problem Cv = λv to obtain the eigenvalue λ and the eigenvector v, and select the eigenvector with the largest eigenvalue as the principal component direction, that is, the direction of the power line;

[0124] The specific rotation of the coordinate system is as follows: all the power line points in the point cloud are rotated to a position parallel to the X-axis. Let the rotation angle be θ, and the rotation matrix is used to rotate the point cloud data:

[0125]

[0126] Apply the rotation matrix R(θ) to each point p in the point cloud i :

[0127] p′ i = R(θ) × p i ,

[0128] where p i represents the three-dimensional coordinates of point i before rotation, and p′ i represents the three-dimensional coordinates of point i after rotation;

[0129] The expression for the layering process is:

[0130] Layer k = {p′ i | z′ i ∈ [z min + k × Δz, z min + (k + 1) × Δz]},

[0131] where Layer k represents the point set of the k-th layer, p′ i represents the three-dimensional coordinates of point i after rotation, z′ i represents the Z-axis coordinate of point i after rotation, and z min represents the height of the lowest point in the point set, and Δz represents the height interval of the layering;

[0132] The layering threshold in the layering process is:

[0133] (1) Ground points: The height is less than 0.5 m;

[0134] (2) Vegetation points: The height is greater than or equal to 0.5 m and less than or equal to 10 m;

[0135] (3) Power tower points: The height is greater than 10 m and within a range less than 5 m around the center point of the tower;

[0136] (4) Power line points: The height is greater than 10 m and the distance from the center point of the tower is greater than or equal to 5 m, but between power towers.

[0137] Furthermore, preferably, the step-by-step separation includes the following steps:

[0138] (1) Generate plane grid points uniformly according to the defined grid resolution. The Z-axis value of each grid point is initialized to be lower than the lowest elevation value of the spanned power line points, and project the power line points onto the grid surface. In the adjacent rectangular area of the grid point, the power line points projected within this area are designated as the search points set for the grid point;

[0139] (2) Simulate the upward movement of the grid points at a constant speed by iteratively increasing the Z-axis value of each grid point. The expression for the increase in the Z-axis value is:

[0140] (res * rate)(m),

[0141] where res represents the resolution of the point cloud data, i.e., the average distance between adjacent points, and rate represents the scale factor;

[0142] (3) Determine the movement stop of each grid point according to the following conditions: the Z-axis distance between the grid point and the nearest power line point in the corresponding search point set is less than (res * rate)(m), or the adjacent grid points have stopped. When all grid points stop moving, the iteration terminates;

[0143] (4) Calculate the Z-axis distance between the power line points and the nearest elevation reference grid points, and select the separated single-layer power line points with the Z-axis distance less than the threshold h. The calculation method for the Z-axis distance between the power line points and the nearest elevation reference grid points is:

[0144] Let the three-dimensional coordinates of the power line point P be (xp, yp, zp), and the coordinates of the grid point G closest to the power line point be (xg, yg, zg). Then the calculation formula for the distance between the power line point P and the grid point G closest to the power line point in the XY plane is:

[0145]

[0146] where d xy represents the distance between the power line point P and the grid point G closest to the power line point in the XY plane, and d z represents the distance between the power line point P and the grid point G closest to the power line point in the Z-axis direction;

[0147] The adaptive calculation steps for the threshold h are:

[0148] Calculate the average value:

[0149]

[0150] where μ represents the average height of the z coordinates, n represents the number of points, and zi represents the z coordinate of the i-th point;

[0151] Calculate the standard deviation:

[0152]

[0153] Among them, σ represents the standard deviation of the height of the z - coordinate, μ represents the average value of the height of the z - coordinate, n represents the number of points, and zi represents the z - coordinate of the i - th point;

[0154] Determine the threshold:

[0155] h = μ + k·σ,

[0156] Among them, h represents the threshold, μ represents the average value of the height of the z - coordinate, σ represents the standard deviation of the height of the z - coordinate, and k represents a constant;

[0157] (5) Rotate the extracted single - layer power line by 90° along its length, and repeat steps (1) to (4) to separate a power line.

[0158] In the present invention, for the semantic segmentation of the power corridor: This process mainly classifies the entire power corridor at a high level, dividing the point cloud data into different semantic categories, such as ground, vegetation, power corridor (electric towers and wires), etc. The purpose is to identify the main components in the power corridor and lay a foundation for subsequent more detailed analysis and processing.

[0159] Individual segmentation: It is a further refinement based on semantic segmentation, focusing on separating and extracting individual power lines. The goal of individual segmentation is to accurately locate and three - dimensionally model the power lines for detailed analysis and processing of single power lines.

[0160] In the processing of the local encoding module of the present invention, "neighborhood" refers to, for each point, finding its K nearest neighbor points, plus the point itself, to jointly form a point set. Here, K is a fixed parameter that defines the size of the neighborhood.

[0161] Each feature point contains various information extracted from the original point cloud data, such as position, local distribution characteristics, standard deviation of height, and distance. These information are concatenated into a feature vector and gradually transformed into a more abstract and meaningful feature representation through multi - layer processing of the MLP.

[0162] Generate the final feature vector: N×8. Here, "N×8" refers to the dimension of the generated final feature vector. Here, "N" represents the total number of points in the point cloud data, and "8" represents the dimension of the final feature vector of the i - th feature point.

[0163] In network input and classification:

[0164] Input features: The encoded features of each point are used as the input to the network. These features include local distribution features, local height standard deviation, distance features, etc. They are mapped to a unified dimensional space through a multi-layer perceptron to generate the final feature vector.

[0165] Network architecture processing: After the input features enter the network, context features are fused from different scales by combining the spatial context feature module with random sampling. Then, they are processed layer by layer through a multi-layer perceptron and upsampling to restore the feature resolution. These steps ensure the multi-level fusion and fine processing of feature information.

[0166] Classification output: The probability distribution of each category is generated through a fully connected layer, so that each point is assigned to a semantic category, such as ground, vegetation, power tower, and wire. This means that after the input feature vector is processed by the network, the output is the category label corresponding to each point, realizing the transformation from the original point cloud data to semantic classification.

[0167] Cross-power line extraction and single power line extraction: Based on the classification output, cross-power line extraction and single power line extraction are further carried out. The former is to extract the point cloud belonging to the wire category from the segmentation result and perform processing such as cross-line detection of power lines, extraction and clustering of tower point clouds; the latter is to further separate single power lines and perform visual display.

[0168] When extracting the tower point cloud, according to the height attribute of the tower, point clouds with a height greater than a certain threshold can be selected. Considering that the tower is usually located in a relatively isolated position in the power corridor, a point group that is far from the power line points and has a high density can be selected, and geometric features (typical structural features of the tower) are used to assist in identification.

[0169] The purpose of selecting the DBSCAN clustering algorithm for clustering processing is to distinguish different objects (such as power towers, wires, ground, vegetation, etc.) in the point cloud data. The DBSCAN algorithm clusters based on density and does not require prior knowledge of how many classes to divide into. Instead, it naturally forms clusters according to the density of points. Clustering can obtain the clustering result. The DBSCAN algorithm will divide points with similar features (such as density) into the same cluster, so that a set of point cloud data of different types can be obtained. For example, power towers will be divided into one class, wires will be divided into another class, and so on. The DBSCAN algorithm can also identify noise points or outliers that do not belong to any cluster.

[0170] In the present invention, the specific method for associating cross-power line points and towers is as follows:

[0171] (1) Spatial position and height relationship: Check the spatial position relationship and height relationship between the points across the power line and multiple tower clusters, and select the most suitable tower as the associated object. This involves comparing the relative positions and height differences between the points across the power line and different towers to ensure that the power line points are correctly associated with the corresponding towers.

[0172] (2) Geometric structure and power line orientation: According to the geometric structure characteristics of the tower (such as height, shape, etc.) and the orientation of the power line, perform a rationality check (which can be checked according to the prior art) to ensure that the classification of the power line points and the tower association are reasonable. For example, if the power line significantly deviates from the position of the tower, or the power line orientation does not match the tower structure, then the classification or association of these power line points needs to be re-evaluated.

[0173] In the result output and visualization of the extraction of points across the power line in the present invention, the points across the power line and the tower points are visually displayed in the point cloud. Different colors can be used to mark these points, and the processed results are stored in the standard point cloud format, including the category label of each point and the association information with the tower.

[0174] In the present invention, the preferred slicing size is 30 cm in width, 5 m in length, and 10 cm in thickness. In a continuous point cloud sequence, if points Q x and Q y are adjacent and fall on the same power line, then these points are very likely to be part of the same power line. In this way, we can trace the orientation of the power line and distinguish it from other power lines.

[0175] In the present invention, when setting the distance threshold, k is a constant used to adjust the size of the standard deviation threshold. A smaller k value means a more stringent threshold limit, and the initial value of k is 1.

[0176] In the present invention, the specific methods of radius filtering and point separation are as follows:

[0177] Define the radius: First, determine an appropriate radius threshold. This threshold is used to judge whether the points in the point cloud belong to the same power line and is set according to the actual diameter of the power line and the density of the point cloud data;

[0178] Filtering process: For the points in each layer, traverse each point and search using the defined radius centered on this point. Look for other points within the radius range around this point. If a point is within this radius range, it is considered to be possibly part of the same power line; mark these points as belonging to the same power line;

[0179] Iterative separation: Repeat the above process until all points are processed; In each iteration, separate the points that meet the conditions from the point cloud and mark them as part of the separated power line; Update the point cloud, remove the power line points that have been separated, and continue to process the remaining points.

[0180] Result output and visualization: Save the point cloud of each separated power line as a separate data structure respectively, and visualize the results to check the separation effect of each power line to ensure that there are no omissions or misclassifications in the separation process.

[0181] When separating layer by layer, k represents a constant, and its initial value is 1.

[0182] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0183] The present invention provides a power line extraction method based on deep learning and morphological analysis. By using a drone equipped with lidar to collect three-dimensional point cloud data of a power corridor and preprocessing the data to remove noise and downsample; Classify power lines, towers, trees, etc. by semantic segmentation of the point cloud through deep learning or traditional algorithms, then use geometric feature extraction methods to accurately extract and separate individual power lines and perform three-dimensional modeling on them; Finally, the verified power line data and analysis results are stored, and an inspection report is generated, improving the safety of the power system, reducing the inspection and fault handling costs, extending the equipment life, enhancing the data processing ability, and facilitating the construction of a smart grid. Description of the Drawings

[0184] Figure 1 is a schematic flowchart of the power line extraction method based on deep learning and morphological analysis of the present invention;

[0185] Figure 2 is a schematic flowchart of the semantic segmentation of the power corridor of the power line extraction method based on deep learning and morphological analysis of the present invention; (a) is the network architecture; (b) is the flowchart of the local encoding module;

[0186] Figure 3It is the visualization effect diagram of the output result of the power corridor semantic segmentation of the power line extraction method based on deep learning and morphological analysis of the present invention; among them, (a) is the schematic diagram of extracting all the point sets belonging to the tower and the power line according to the semantic segmentation result; (b) is the diagram of the power line and the corresponding tower points projected onto the X-Y plane, and the green line in the enlarged area shown represents the ideal axis of symmetry of the tower, effectively distinguishing the power line points within the span from other power line points. (c) is the trajectory diagram showing how to define the power line through the slope and intercept, and using the slope and intercept to describe the geometric characteristics of the power line; (d) is the relationship diagram between the angle of the power line slope and its variation degree. Through the data in this diagram, the power line detection algorithm can be optimized to improve the detection accuracy;

[0187] Figure 4 It is the schematic diagram of the plane grid points for extracting a single power line of the power line extraction method based on deep learning and morphological analysis of the present invention;

[0188] Figure 5 It is the schematic diagram of the layer-by-layer separation for extracting a single power line of the power line extraction method based on deep learning and morphological analysis of the present invention. Among them, (a) is the schematic diagram of the power line points projected onto the X-Z plane; (b) is to adaptively calculate the threshold h according to the concentrated distribution characteristics of the z-axis values of different layers within the line segment;

[0189] Figure 6 It is the test sample classification diagram; among them, (a) is the misclassification mark of test sample 1; (b) is the misclassification mark of test sample 2;

[0190] Figure 7 It is the schematic diagram of the point marks for the misclassification of the test samples; among them, (a) are the points where the power line of test sample 1 is misclassified; (b) are the points where the power line of test sample 2 is misclassified;

[0191] Figure 8 It is the power line diagram finally extracted from the test samples; (a) is the power line finally extracted from test sample 1; (b) is the power line finally extracted from test sample 2. Specific embodiments

[0192] The present invention will be further described in detail below in conjunction with the embodiments.

[0193] Those skilled in the art will understand that the following embodiments are only used to illustrate the present invention and should not be construed as limiting the scope of the present invention. For those not specifying specific techniques or conditions in the embodiments, they shall be carried out according to the techniques or conditions described in the literature in this field or according to the product instructions. For those materials or equipment not specifying the manufacturer, they are all conventional products that can be obtained by purchase.

[0194] Embodiment 1

[0195] As Figure 1 and Figure 2 shown, a power line extraction method based on deep learning and morphological analysis includes power corridor semantic segmentation and individual segmentation;

[0196] The power corridor semantic segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and cross-power line extraction;

[0197] The individual segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and single power line extraction;

[0198] Among them, the data preprocessing is to normalize the XYZ coordinates of the point cloud to be extracted for power lines;

[0199] The local encoding module processing includes the following steps:

[0200] (1) Input point coordinates: Input the point cloud coordinates after data preprocessing, with a total of N points;

[0201] (2) K-nearest neighbor search: For each point, find its K nearest neighbor points;

[0202] (3) Local feature extraction: Calculate the neighborhood of each point to obtain the local distribution characteristics; average pooling operation; calculate the standard deviation of the Z-axis coordinates of the points in the neighborhood as the local height standard deviation;

[0203] (4) Distance calculation and feature fusion: Calculate the distance between each point and its neighborhood points, and concatenate the calculated local distribution characteristics, local height standard deviation, and distance to generate a local feature representation;

[0204] (5) Perform a non-linear transformation on the concatenated local feature representation to generate the final feature vector as the encoded feature and output the feature points;

[0205] The network input and classification includes the following steps:

[0206] (1) Use the encoded feature of each point as the input of the network, and use the semantic category of each point as the output to train the network;

[0207] (2) The network architecture includes: a spatial context feature module, random sampling, upsampling, a multi-layer perceptron, Dropout regularization, and a fully connected layer. The processing flow of the network architecture is: combine the spatial context feature module with random sampling to fuse context features from different scales; the multi-layer perceptron and upsampling process and restore the feature resolution layer by layer; generate the probability distribution of each category through the fully connected layer, so that each point is assigned to a semantic category; the semantic categories include: ground, vegetation, electric tower, and wire;

[0208] The extraction across power lines includes the following steps:

[0209] (1) Power line data extraction: Extract the point cloud belonging to the wire category according to the network input and classification results.

[0210] (2) Detection of power line crossing: Horizontal slicing processing and distance threshold setting.

[0211] (3) Clustering analysis of towers: Extract the tower point cloud and select the DBSCAN clustering algorithm for clustering.

[0212] (4) Associating points across power lines with tower points: Match the distance between the points across power lines and the center points of tower clusters, and perform screening and optimization according to the matching results. The specific screening and optimization are as follows: If a point across a power line is close to multiple tower clusters, further analyze its spatial position and height relationship, and select the most reasonable tower as the associated object; According to the geometric structure of the tower and the trend of the power line, perform a rationality check to ensure the accuracy of the classification of points across power lines and the association with towers.

[0213] (5) Result output and visualization: Visualize the points across power lines and tower points in the point cloud, mark these points with different colors, and store the processed results in the standard point cloud format, including the category label of each point and the association information with the tower.

[0214] The extraction of a single power line includes the following steps:

[0215] (1) Power line data extraction: Extract the point cloud belonging to the wire category according to the network input and classification results.

[0216] (2) Rotating the power line to a specific direction: Calculate the power line direction and then perform coordinate system rotation.

[0217] (3) Stratification in the elevation direction: Perform stratification processing on the rotated power line point cloud data, and then perform intra-layer clustering. The intra-layer clustering is as follows: Perform preliminary clustering on each layer to ensure that each layer contains only the points of one power line; If a layer contains multiple power lines, use density clustering to further separate them.

[0218] (4) Radius filtering and point separation: Then perform radius filtering on the clustered point cloud data to separate a single power line.

[0219] (5) Iteratively separating power lines: Separate layer by layer and update the point cloud.

[0220] (6) Result Output and Visualization: Save the point cloud of each separated power line as a separate file or data structure, visualize the results, check the separation effect of each power line, and ensure that there are no omissions or misclassifications in the separation process.

[0221] Embodiment 1

[0222] As Figure 1 and Figure 2 shown, a power line extraction method based on deep learning and morphological analysis includes power corridor semantic segmentation and individual segmentation;

[0223] The power corridor semantic segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and cross-power line extraction;

[0224] The individual segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and single power line extraction;

[0225] Among them, the data preprocessing is to normalize the XYZ coordinates of the point cloud to be extracted for power lines;

[0226] The local encoding module processing includes the following steps:

[0227] (1) Input point coordinates: Input the point cloud coordinates after data preprocessing, with a total of N points;

[0228] (2) K-nearest neighbor search: For each point, find its K nearest neighbor points;

[0229] (3) Local feature extraction: Calculate the neighborhood of each point to obtain the local distribution characteristics; average pooling operation; calculate the standard deviation of the Z-axis coordinates of the points in the neighborhood as the local height standard deviation;

[0230] (4) Distance calculation and feature fusion: Calculate the distance between each point and its neighborhood points, concatenate the calculated local distribution characteristics, local height standard deviation, and distance to generate a local feature representation;

[0231] (5) Perform a non-linear transformation on the concatenated local feature representation to generate the final feature vector as the encoded feature and output the feature points;

[0232] The network input and classification includes the following steps:

[0233] (1) Use the encoded feature of each point as the input of the network, and use the semantic category of each point as the output to train the network;

[0234] (2) The network architecture includes: a spatial context feature module, random sampling, upsampling, a multi-layer perceptron, Dropout regularization, and a fully connected layer. The processing flow of the network architecture is as follows: The spatial context feature module is combined with random sampling to fuse context features at different scales; the multi-layer perceptron and upsampling process and restore the feature resolution layer by layer; the probability distribution of each category is generated through the fully connected layer, so that each point is assigned to a semantic category; the semantic categories include: ground, vegetation, electric towers, and wires.

[0235] The extraction of cross-power lines includes the following steps:

[0236] (1) Power line data extraction: According to the network input and classification results, extract the point cloud belonging to the wire category.

[0237] (2) Cross-power line detection: Horizontal slicing processing and distance threshold setting.

[0238] (3) Clustering analysis of tower racks: Extract the tower rack point cloud and select the DBSCAN clustering algorithm for clustering processing.

[0239] (4) Associating cross-power line points and tower rack points: Match the distances between cross-power line points and the center points of tower rack clusters, and perform screening and optimization according to the matching results. The specific screening and optimization are as follows: If a cross-power line point is close to multiple tower rack clusters, further analyze its spatial position and height relationship, and select the most reasonable tower rack as the associated object; according to the geometric structure of the tower rack and the direction of the power line, perform a rationality check to ensure the accuracy of the classification of cross-power line points and the association with tower racks.

[0240] (5) Result output and visualization: Visualize the cross-power line points and tower rack points in the point cloud, mark these points with different colors, and store the processed results in the standard point cloud format, including the category label of each point and the association information with the tower rack.

[0241] The extraction of a single power line includes the following steps:

[0242] (1) Power line data extraction: According to the network input and classification results, extract the point cloud belonging to the wire category.

[0243] (2) Rotating the power line to a specific direction: Calculate the power line direction and then perform coordinate system rotation.

[0244] (3) Stratification in the elevation direction: Perform stratification processing on the rotated power line point cloud data and then perform intra-layer clustering. The intra-layer clustering is as follows: Perform preliminary clustering on each layer to ensure that each layer contains only the points of one power line; if a layer contains multiple power lines, use density clustering to further separate them.

[0245] (4)Radius filtering and point separation: Then, perform radius filtering on the clustered point cloud data to separate individual power lines;

[0246] (5)Iterative separation of power lines: Separate layer by layer and update the point cloud;

[0247] (6)Result output and visualization: Save the point cloud of each separated power line as a separate file or data structure, visualize the results, check the separation effect of each power line, and ensure that there are no omissions or misclassifications in the separation process.

[0248] Specifically, the normalization process uses the maximum-minimum normalization method.

[0249] Specifically, in local feature extraction, process the neighborhood of each point. The specific method for calculating the local distribution characteristics is as follows:

[0250] The calculated local distribution characteristics include the average position and variance;

[0251] The calculation formula for the average position is:

[0252]

[0253] where n represents the number of the nearest points, n = K; v i represents the position vector of the i-th nearest point; p represents the position vector of the center point, and the center point is the point corresponding to the calculation of the local distribution characteristics; μ represents the average position offset;

[0254] The calculation formula for the variance is:

[0255]

[0256] where σ 2 represents the variance;

[0257] The expression for the average pooling operation is:

[0258]

[0259] where f(p) represents the local feature of point p, n represents the number of neighbor points of point p, p i represents the i-th neighbor point of point p; g is the feature extraction function for neighbor points;

[0260] The calculation formula for the standard deviation of the Z-axis coordinates of the points within the neighborhood is:

[0261]

[0262] where σz represents the standard deviation of the Z-axis coordinates, N represents the number of points of the point cloud coordinates after data preprocessing, z iIt represents the normalized Z-axis coordinate value of the i-th point, and μz represents the average value of the normalized Z-axis coordinate. The calculation formula for the average value of the Z-axis coordinate is as follows:

[0263]

[0264] Specifically, in distance calculation and feature fusion, the distance between each point and its neighboring points is calculated. This distance uses the Euclidean distance, and its calculation formula is as follows:

[0265]

[0266] where x p , y p , z p represent the coordinate values of point p on the X, Y, and Z axes respectively, and x q , y q , z q represent the coordinate values of point q on the X, Y, and Z axes respectively, and d(p,q) represents the Euclidean distance from point p to point q;

[0267] The specific method for concatenating the calculated local distribution characteristics, local height standard deviation, and distance to generate a local feature representation is as follows:

[0268] Use a multi-layer perceptron to map different local features to the same-dimensional space, thereby concatenating the local distribution characteristics, local height standard deviation, and distance;

[0269] The multi-layer perceptron includes an input layer, a hidden layer, and an output layer. The input layer, hidden layer, and output layer all contain multiple neurons, and are fully connected between layers. Each neuron applies a ReLU activation function to generate an output. The calculation formula from the input layer to the hidden layer is as follows:

[0270] h = ReLU(W1f P + b1),

[0271] where h represents the feature vector output by the hidden layer, W1 represents the weight matrix from the input layer to the hidden layer, f P represents the input feature vector, and b1 represents the bias vector of the hidden layer;

[0272] The calculation formula from the hidden layer to the output layer is as follows:

[0273] g P = W2h + b2,

[0274] where g P represents the mapped feature vector, W2 represents the weight matrix from the hidden layer to the output layer, h represents the feature vector output by the hidden layer, and b2 represents the bias vector of the output layer.

[0275] Specifically, the expression of the non-linear transformation is as follows:

[0276] h l = φ(W l ·h l-1 + b l ),

[0277] where h l represents the output feature vector of the l-th layer, i.e., the concatenated local features; h l-1 represents the output feature vector of the (l-1)-th layer, W l represents the weight matrix of the l-th layer, b l represents the bias vector of the l-th layer, and φ represents the activation function;

[0278] The expression of the feature matrix is:

[0279] F = [p1, p2,..., p i ,

[0280] where F represents the entire feature matrix, and p i is the final feature vector of the i-th feature point, i.e.:

[0281] p i = [x i , y i , z i , f dist,i , f std,i , f other,i1 , f other,i2 , f other,i3 ,

[0282] In the formula, x i , y i , z i respectively represent the normalized coordinates of the i-th point on the X, Y, and Z coordinate axes, f dist,i represents the distance feature of the i-th point, f std,i represents the standard deviation feature of the z-axis of the i-th point, f other,i1 represents the local average position feature of the i-th point, f other,i2 represents the local variance feature of the i-th point, and f other,i3 represents the local height feature of the i-th point.

[0283] Specifically, in the network input and classification, the spatial context feature module is combined with random sampling to fuse context features at different scales. The specific steps include:

[0284] (1) Multi-layer convolution: Each layer of convolutional kernels extracts features of different scales, including low-level features and high-level features. Low-level features include local information, and high-level features include context information. The expression of the multi-layer convolution is:

[0285]

[0286] Among them, represents the feature map at position (i, j) of the m-th layer, represents the weight of the k-th filter of the m-th layer, F m-1 represents the feature map of the previous layer, b m represents the bias term;

[0287] (2) Max pooling, the expression of the max pooling is:

[0288]

[0289] Among them, represents the feature map at position (i, j) of the l-th layer, represents the feature map at position (a, b) of the (l - 1)-th layer;

[0290] (3) Skip connection: Use skip connection to combine the features of the downsampling path and the upsampling path. The expression of the skip connection is:

[0291] F l = F l-1 + H(F l-1 ; W),

[0292] Among them, H represents the non-linear transformation function, W represents the parameter of the non-linear transformation function, F l-1 represents the feature map before the skip connection, F l represents the feature map after the skip connection;

[0293] (4) Multi-scale feature fusion is fusion based on the attention mechanism:

[0294] The expression for the multi-layer perceptron to process and restore the feature resolution layer by layer is:

[0295]

[0296] Among them, y j represents the output of the j-th neuron in the hidden layer, f represents the activation function, w ij represents the weight connecting the i-th neuron in the input layer and the j-th neuron in the hidden layer, x i represents the eigenvalue of the input vector, b j represents the bias term of the j-th neuron;

[0297] The upsampling processes and restores the feature resolution layer by layer using transposed convolution. The expression of the transposed convolution is as follows:

[0298] Y = Deconv(X; W, stride = s),

[0299] where X represents the input feature map, Y represents the output feature map, W represents the transposed convolution kernel, and s represents the stride;

[0300] The fully connected layer generates the probability distribution of each category through the Softmax activation function. The expression of the Softmax activation function is as follows:

[0301]

[0302] where O j represents the unnormalized score of the network output layer for category j, x represents the input data, y represents the predicted target category, and O k represents the unnormalized score of the network output layer for category k.

[0303] Specifically, in the extraction across power lines, the horizontal slicing process is as follows:

[0304] Slice the point cloud along the path of the power line, and the slicing direction is perpendicular to the orientation of the power line;

[0305] The distance threshold setting includes: calculating the height and horizontal distance of the points in each slice relative to the power line to set the distance threshold;

[0306] The calculation method for the height and horizontal distance of the points in each slice relative to the power line is as follows: If a power line is defined by two endpoints, namely P1(x1, y1, z1) and P2(x2, y2, z2), and a point P(x, y, z) in the point cloud, then the calculation formula for the horizontal distance of the point relative to the power line is:

[0307]

[0308] where d horizontal represents the horizontal distance of the point P(x, y, z) relative to the power line;

[0309] The calculation formula for the height of the points in each slice relative to the power line is:

[0310]

[0311] d vertical = |z - Q z |

[0312] where Q xDenotes the coordinate of the projection of point P on the X-axis, Q y Denotes the coordinate of the projection of point P on the Y-axis, Q z Denotes the coordinate of the projection of point P on the Z-axis, z denotes the Z coordinate value of point P(x, y, z), d vertical Denotes the height of point P(x, y, z) relative to the power line;

[0313] The method for setting the distance threshold is as follows:

[0314] D 水平 = μ 水平 + k·σ 水平 ,

[0315] H 垂直 = μ 垂直 + k·σ 垂直 ,

[0316] Among them, D 水平 Denotes the horizontal distance threshold, μ 水平 Denotes the average value of the horizontal distance, σ 水平 Denotes the standard deviation of the horizontal distance, H 垂直 Denotes the vertical height threshold, μ 垂直 Denotes the average value of the vertical height, σ 垂直 Denotes the standard deviation of the vertical height, k is a constant.

[0317] Specifically, the steps of the clustering process include:

[0318] (1) Select an unvisited point p as the starting point; the unvisited point is a point in the point cloud data that has not been marked as a power line;

[0319] (2) If point p is a core point, create a new cluster and add point p to this cluster;

[0320] (3) Find all neighbor points of point p and check whether these neighbor points are also core points;

[0321] (4) For each neighbor point n, if neighbor point n has not been visited, recursively execute steps (1) to (3);

[0322] (5) If neighbor point n has already been assigned to a certain cluster, add n to the current cluster;

[0323] (6) When all points have been visited, the algorithm ends;

[0324] The distance matching includes:

[0325] (1) For each detected cross-power line point, calculate its distance from the clustering center point of each tower;

[0326] (2) Identify the tower point cluster with the closest distance, and associate the power line crossing point with the corresponding tower.

[0327] The calculation formula for the distance between each detected power line crossing point and the center point of each tower cluster is:

[0328]

[0329] where d represents the distance between the detected power line crossing point and the center point of the tower cluster, x p , y p , and z p respectively represent the X, Y, and Z axis coordinates of the detected power line crossing point, and x c , y c , and z c respectively represent the X, Y, and Z axis coordinates of the center point of the tower cluster.

[0330] Specifically, in the extraction of a single power line, the calculation method of the power line direction is to use principal component analysis to fit multiple points on the power line to calculate the power line direction: Let the set of points on the power line be: {P i =(x i , y i , z i )|i = 1, 2,..., n}, where n represents the number of points, then the expression for calculating the mean μ of these points is as follows:

[0331]

[0332] Subtract the mean from each point to obtain the centered point

[0333]

[0334] Use the centered data to construct the covariance matrix C:

[0335]

[0336] where μ x represents the average coordinate of the point in the X-axis direction, μ y represents the average coordinate of the point in the Y-axis direction, μ z represents the average coordinate of the point in the Z-axis direction, n represents the number of points in the set, x i represents the normalized coordinate of point i in the X-axis direction, y i represents the normalized coordinate of point i in the Y-axis direction, z i represents the normalized coordinate of point i in the Z-axis direction, The centered X-axis coordinate, represents the centered Y-axis coordinate, Represents the centralized Z-axis coordinate;

[0337] Solve the eigenvalue problem \(Cv = \lambda v\) to obtain the eigenvalue \(\lambda\) and the eigenvector \(v\). Select the eigenvector with the largest eigenvalue as the principal component direction, which is the direction of the power line;

[0338] The specific rotation of the coordinate system is as follows: Rotate all the power line points in the point cloud to a position parallel to the X-axis. Let the rotation angle be \(\theta\), and use the rotation matrix to rotate the point cloud data:

[0339]

[0340] Apply the rotation matrix \(R(\theta)\) to each point \(p\) in the point cloud i :

[0341] \(p'\) i \(= R(\theta)\times p\) i ,

[0342] where \(p\) i represents the three-dimensional coordinates of point \(i\) before rotation, and \(p'\) i represents the three-dimensional coordinates of point \(i\) after rotation;

[0343] The expression for the hierarchical processing is:

[0344] Layer k \(= \{p' i | z' i \in [z min + k\times\Delta z, z min +(k + 1)\times\Delta z]\},

[0345] where Layer k represents the point set of the \(k\)th layer, \(p'\) i represents the three-dimensional coordinates of point \(i\) after rotation, \(z'\) i represents the Z-axis coordinate of point \(i\) after rotation, and \(z\) min represents the height of the lowest point in the point set, and \(\Delta z\) represents the height interval of the layering;

[0346] The layering threshold in the hierarchical processing is:

[0347] (1) Ground points: The height is less than 0.5 m;

[0348] (2) Vegetation points: The height is greater than or equal to 0.5 m and less than or equal to 10 m;

[0349] (3) Power tower points: The height is greater than 10 m and within a range less than 5 m around the center point of the tower;

[0350] (4) Power line points: with a height greater than 10 m and a distance from the center point of the tower greater than or equal to 5 m, but between power towers.

[0351] Specifically, the layer-by-layer separation includes the following steps:

[0352] (1) Uniformly generate planar grid points according to the defined grid resolution. The Z-axis value of each grid point is initially set lower than the lowest elevation value of the span power line points, and the power line points are projected onto the grid surface. In the adjacent rectangular area of the grid point, the power line points projected within this area are designated as the search points set for the grid point;

[0353] (2) Simulate the upward movement of the grid points at a constant speed by iteratively increasing the Z-axis value of each grid point. The expression for the increase in the Z-axis value is:

[0354] (res * rate) (m),

[0355] where res represents the resolution of the point cloud data, i.e., the average distance between adjacent points, and rate represents the scale factor;

[0356] (3) Determine the movement stop of each grid point according to the following conditions: the Z-axis distance between the grid point and the nearest power line point in the corresponding search point set is less than (res * rate) (m), or the adjacent grid points have stopped. When all grid points stop moving, the iteration terminates;

[0357] (4) Calculate the Z-axis distance between the power line point and the nearest elevation reference grid point, and select the separated single-layer power line points with a Z-axis distance less than the threshold h; the calculation method for the Z-axis distance between the power line point and the nearest elevation reference grid point is as follows:

[0358] Let the three-dimensional coordinates of the power line point P be (x p , y p , z p ), and the coordinates of the grid point G closest to the power line point be (x g , y g , z g ). Then the calculation formula for the distance between the power line point P and the grid point G closest to the power line point in the XY plane is:

[0359]

[0360] where d xy represents the distance between the power line point P and the grid point G closest to the power line point in the XY plane, and d z represents the distance between the power line point P and the grid point G closest to the power line point in the Z-axis direction;

[0361] The adaptive calculation steps of the threshold h are as follows:

[0362] Calculate the average value:

[0363]

[0364] where μ represents the average height of the z coordinate, n represents the number of points, and z i represents the z coordinate of the i-th point;

[0365] Calculate the standard deviation:

[0366]

[0367] where σ represents the standard deviation of the height of the z coordinate, μ represents the average height of the z coordinate, n represents the number of points, and z i represents the z coordinate of the i-th point;

[0368] Determine the threshold:

[0369] h = μ + k·σ,

[0370] where h represents the threshold, μ represents the average height of the z coordinate, σ represents the standard deviation of the height of the z coordinate, and k represents a constant;

[0371] (5) Rotate the extracted single-layer power line by 90° along its length, and repeat steps (1) to (4) to separate a power line.

[0372] Embodiment 3

[0373] As Figure 1-2 shown, a power line extraction method based on deep learning and morphological analysis includes power corridor semantic segmentation and individual segmentation;

[0374] The power corridor semantic segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and cross-power line extraction;

[0375] The individual segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and single power line extraction;

[0376] The data preprocessing is: normalizing the XYZ coordinates of the point cloud, using the maximum-minimum normalization method. Specifically, the expression for the normalization processing is:

[0377]

[0378] where X represents the X-axis coordinate value, Y represents the Y-axis coordinate value, Z represents the Z-axis coordinate value, X′ represents the normalized X-axis coordinate value, Y′ represents the normalized Y-axis coordinate value, Z′ represents the normalized Z-axis coordinate value, and Xmin Represents the minimum value of the X-axis coordinate, X max Represents the maximum value of the X-axis coordinate, Y min Represents the minimum value of the Y-axis coordinate, Y max Represents the maximum value of the Y-axis coordinate, Z min Represents the minimum value of the Z-axis coordinate, Z max Represents the maximum value of the Z-axis coordinate;

[0379] The local encoding module processes including the following steps:

[0380] (1) Input point coordinates: Input the point cloud coordinates after data preprocessing. Each point contains three coordinates (x, y, z), with a total of N points;

[0381] (2) K-nearest neighbor search: For each point, find its K nearest neighbor points;

[0382] (3) Local feature extraction: Calculate for the neighborhood of each point to obtain local distribution characteristics; average pooling operation; calculate the standard deviation of the Z-axis coordinates of the points within the neighborhood as the local height standard deviation;

[0383] (4) Distance calculation and feature fusion: Calculate the distance between each point and its neighborhood points, concatenate the calculated local distribution characteristics, local height standard deviation and distance to generate a local feature representation;

[0384] (5) Perform a non-linear transformation on the concatenated local feature representation to generate the final feature vector as the encoded feature and output the feature points;

[0385] The network input and classification include the following steps:

[0386] (1) Use the encoded feature of each point as the input of the network, and use the semantic category of each point as the output to train the network;

[0387] (2) The network architecture includes: a spatial context feature module, random sampling, upsampling, a multi-layer perceptron, Dropout regularization, and a fully connected layer. The processing flow of the network architecture is: Combine the spatial context feature module with random sampling to fuse context features at different scales; The multi-layer perceptron and upsampling process and restore the feature resolution layer by layer; Generate the probability distribution of each category through the fully connected layer so that each point is assigned to a semantic category; The semantic categories include: ground, vegetation, electric tower, and wire;

[0388] The cross-power line extraction includes the following steps:

[0389] (1) Power line data extraction: Extract the point cloud belonging to the wire category according to the network input and classification results;

[0390] (2) Power line cross-line detection: horizontal slicing processing and distance threshold setting;

[0391] (3) Clustering analysis of tower structures: extracting the point cloud of tower structures and selecting the DBSCAN clustering algorithm for clustering processing;

[0392] (4) Associating cross-power line points with tower structure points: matching the distances between cross-power line points and the central points of tower structure clusters, and screening and optimizing according to the matching results. The specific screening and optimization are as follows: if a cross-power line point is close to multiple tower structure clusters, further analyze its spatial position and height relationship, and select the most reasonable tower structure as the associated object; according to the geometric structure of the tower structure and the orientation of the power line, conduct a rationality check to ensure the accuracy of the classification of cross-power line points and the association with tower structures;

[0393] (5) Result output and visualization: visually displaying the cross-power line points and tower structure points in the point cloud, marking these points with different colors, and storing the processed results in the standard point cloud format, including the category label of each point and the association information with the tower structure; (as Figure 3 shown, the green line in the enlarged area represents the ideal axis of symmetry of the tower structure, effectively distinguishing the power line points within the span from other power line points);

[0394] The extraction of a single power line includes the following steps:

[0395] (1) Power line data extraction: extracting the point cloud belonging to the wire category according to the network input and classification results;

[0396] (2) Rotating the power line to a specific direction: calculating the power line direction and then performing coordinate system rotation;

[0397] (3) Elevation direction layering: performing layering processing on the rotated power line point cloud data and then conducting intra-layer clustering. The intra-layer clustering is as follows: conducting preliminary clustering on each layer to ensure that each layer contains only the points of one power line; if a layer contains multiple power lines, using density clustering to further separate them;

[0398] (4) Radius filtering and point separation: then performing radius filtering on the clustered point cloud data to separate individual power lines;

[0399] (5) Iteratively separating power lines: separating layer by layer and updating the point cloud;

[0400] (6) Result output and visualization: saving the point cloud of each separated power line as a separate file or data structure, visualizing the results, and checking the separation effect of each power line to ensure that there are no omissions or misclassifications in the separation process.

[0401] Furthermore, in the local feature extraction of the local encoding module, when processing the neighborhood of each point, the specific method for calculating the local distribution characteristics is as follows:

[0402] The calculated local distribution characteristics include the average position and variance;

[0403] The calculation formula for the average position is:

[0404]

[0405] where n represents the number of nearest points, n = K; v i represents the position vector of the i-th nearest point; p represents the position vector of the center point, and the center point is the point corresponding to the calculation of the local distribution characteristics; μ represents the average position offset;

[0406] The calculation formula for the variance is:

[0407]

[0408] where σ 2 represents the variance;

[0409] The expression for the average pooling operation is:

[0410]

[0411] where f(p) represents the local feature of point p, n represents the number of neighbor points of point p, p i represents the i-th neighbor point of point p; g is the feature extraction function for neighbor points;

[0412] The calculation formula for the standard deviation of the Z-axis coordinates of the points in the neighborhood is:

[0413]

[0414] where σ z represents the standard deviation of the Z-axis coordinates, N represents the number of points in the point cloud coordinates after data preprocessing, z i represents the normalized Z-axis coordinate value of the i-th point, μ z represents the average value after normalization of the Z-axis coordinates, and the calculation formula for the average value of the Z-axis coordinates is:

[0415]

[0416] Preferably, in distance calculation and feature fusion, the distance between each point and its neighborhood points is calculated, and this distance uses the Euclidean distance, and its calculation formula is:

[0417]

[0418] Among them, x p , y p , z p respectively represent the coordinate values of point p on the three coordinate axes X, Y, and Z. x q , y q , z q respectively represent the coordinate values of point q on the three coordinate axes X, Y, and Z. d(p, q) represents the Euclidean distance from point p to point q;

[0419] The specific method for concatenating the calculated local distribution characteristics, local height standard deviation, and distance to generate a local feature representation is as follows:

[0420] Use a multi-layer perceptron to map different local features to the same-dimensional space, thereby concatenating the local distribution characteristics, local height standard deviation, and distance;

[0421] The multi-layer perceptron includes an input layer, a hidden layer, and an output layer. The input layer, hidden layer, and output layer all contain multiple neurons, and are fully connected between layers. Each neuron applies a ReLU activation function to generate an output. The calculation formula from the input layer to the hidden layer is:

[0422] h = ReLU(W1f P + b1),

[0423] where h represents the feature vector output by the hidden layer, W1 represents the weight matrix from the input layer to the hidden layer, f P represents the input feature vector, and b1 represents the bias vector of the hidden layer;

[0424] The calculation formula from the hidden layer to the output layer is:

[0425] g P = W2h + b2,

[0426] where g P represents the mapped feature vector, W2 represents the weight matrix from the hidden layer to the output layer, h represents the feature vector output by the hidden layer, and b2 represents the bias vector of the output layer.

[0427] Preferably, the expression of the non-linear transformation is:

[0428] h l = φ(W l ·h l-1 + b l ),

[0429] where h l represents the output feature vector of the l-th layer, that is, the concatenated local feature; h l-1Denote the output feature vector of the (l - 1)-th layer, \(W^l\) denote the weight matrix of the \(l\)-th layer, \(b^l\) denote the bias vector of the \(l\)-th layer, and \(\varphi\) denote the activation function;

[0430] The expression of the feature matrix is:

[0431] \(F = [p_1, p_2, \ldots, p_{ i}]\),

[0432] where \(F\) represents the entire feature matrix, and \(p_{ i is the final feature vector of the \(i\)-th feature point, that is:

[0433] \(p_{ i = [x_{ i , y_{ i , z_{ i , f_{ dist,i , f_{ std,i , f_{ other,i1 , f_{ other,i2 , f_{ other,i3}]\),

[0434] In the formula, \(x_{ i , y_{ i , z_{ i respectively represent the normalized coordinates of the \(i\)-th point on the three coordinate axes of \(X\), \(Y\), and \(Z\), and \(f_{ dist,i represents the distance feature of the \(i\)-th point, \(f_{ std,i represents the standard deviation feature of the \(z\)-axis of the \(i\)-th point, \(f_{ other,i1 represents the local average position feature of the \(i\)-th point, \(f_{ other,i2 represents the local variance feature of the \(i\)-th point, and \(f_{ other,i3 represents the local height feature of the \(i\)-th point.

[0435] Preferably, in the network input and classification, the spatial context feature module is combined with random sampling to fuse context features at different scales. The specific steps include:

[0436] (1) Multi-layer convolution: Each layer of convolution kernels extracts features at different scales, including low-level features and high-level features. The low-level features include local information, and the high-level features include context information. The expression of the multi-layer convolution is:

[0437]

[0438] where represents the feature map at position \((i, j)\) of the \(m\)-th layer, represents the weight of the \(k\)-th filter of the \(m\)-th layer, \(F_{ m-1 represents the feature map of the previous layer, and \(b_{ m represents the bias term;

[0439] (2) Max pooling, the expression of the max pooling is:

[0440]

[0441] where represents the feature map at position (i, j) in the l-th layer, represents the feature map at position (a, b) in the (l - 1)-th layer;

[0442] (3) Skip connection: Use the skip connection to combine the features of the downsampling path and the upsampling path, the expression of the skip connection is:

[0443] F l = F l-1 + H(F l-1 ; W),

[0444] where H represents the non-linear transformation function, W represents the parameter of the non-linear transformation function, F l-1 represents the feature map before the skip connection, F l represents the feature map after the skip connection;

[0445] (4) The multi-scale feature fusion is the fusion based on the attention mechanism:

[0446] The multi-scale feature fusion is the fusion based on the attention mechanism (the attention mechanism allows the model to focus on the most relevant parts of the input data, thereby enhancing the representation of key features. It has a significant effect on processing images with complex backgrounds or containing multiple-scale targets. By suppressing unimportant features, the attention mechanism can reduce the impact of noise on the model performance, making the model more robust. The attention mechanism is usually dynamic, which means it can change with the input and can adapt to different scales and different types of features. It provides an intuitive way to view how the model processes the input data, improving the transparency and interpretability of the model).

[0447] The expressions for the multi-layer perceptron to process and restore the feature resolution layer by layer are:

[0448]

[0449] where y j represents the output of the j-th neuron in the hidden layer, f represents the activation function, w ij represents the weight connecting the i-th neuron in the input layer and the j-th neuron in the hidden layer, x i represents the eigenvalue of the input vector, b j represents the bias term of the j-th neuron;

[0450] The upsampling adopts transposed convolution to process and restore the feature resolution layer by layer. The expression of the transposed convolution is as follows:

[0451] Y = Deconv(X; W, stride = s),

[0452] where X represents the input feature map, Y represents the output feature map, W represents the transposed convolution kernel, and s represents the stride;

[0453] The fully connected layer generates the probability distribution of each category through the Softmax activation function. The expression of the Softmax activation function is as follows:

[0454]

[0455] where O j represents the unnormalized score of the network output layer for category j, x represents the input data, y represents the predicted target category, and O k represents the unnormalized score of the network output layer for category k.

[0456] Preferably, in the extraction across power lines, the horizontal slicing process is specifically as follows:

[0457] Slice the point cloud along the path of the power line, and the slicing direction is perpendicular to the trend of the power line;

[0458] The distance threshold setting includes: calculating the height and horizontal distance of the points in each slice relative to the power line to set the distance threshold; (using a statistics-based method to set an adaptive threshold, by analyzing the point cloud data in the dataset, some basic statistics of the point cloud distribution, such as the mean, standard deviation, etc., can be found and the threshold can be set accordingly)

[0459] The calculation method of the height and horizontal distance of the points in each slice relative to the power line is as follows: If a power line is defined by two endpoints, namely P1(x1, y1, z1) and P2(x2, y2, z2), and a point P(x, y, z) in the point cloud, then the calculation formula for the horizontal distance of the point relative to the power line is:

[0460]

[0461] where d horizontal represents the horizontal distance of the point P(x, y, z) relative to the power line;

[0462] The calculation formula for the height of the points in each slice relative to the power line is:

[0463]

[0464] d vertical = |z - Qz |

[0465] Among them, Q x represents the coordinate of the projection of point P on the X-axis, Q y represents the coordinate of the projection of point P on the Y-axis, Q z represents the coordinate of the projection of point P on the Z-axis, z represents the Z coordinate value of point P(x, y, z), d vertical represents the height of point P(x, y, z) relative to the power line;

[0466] If the power line can be approximated as a straight line within a certain interval, then Q can be estimated by linear interpolation through known elevation points z , find the two nearest known elevation points P1(x1, y1, z1) and P2(x2, y2, z2),

[0467] Calculate the slope from P1 to P2

[0468] Use the linear interpolation formula z = z1 + m * ((x - x1), (y - y1)) to estimate Q z ),

[0469] The method for setting the distance threshold is as follows:

[0470] D 水平 = μ 水平 + k·σ 水平 ,

[0471] H 垂直 = μ 垂直 + k·σ 垂直 ,

[0472] Among them, D 水平 represents the horizontal distance threshold, μ 水平 represents the average value of the horizontal distance, σ 水平 represents the standard deviation of the horizontal distance, H 垂直 represents the vertical height threshold, μ 垂直 represents the average value of the vertical height, σ 垂直 represents the standard deviation of the vertical height, and k is a constant.

[0473] The steps of the clustering process include:

[0474] (1) Select an unvisited point p as the starting point; the unvisited point is a point in the point cloud data that has not been marked as a power line;

[0475] (2) If point p is a core point, create a new cluster and add point p to the cluster;

[0476] (3) Find all the neighbor points of point p and check whether these neighbor points are also core points;

[0477] (4) For each neighbor point n, if neighbor point n has not been visited yet, recursively execute steps (1) to (3);

[0478] (5) If neighbor point n has already been assigned to a certain cluster, add n to the current cluster;

[0479] (6) When all points have been visited, the algorithm ends;

[0480] The distance matching includes:

[0481] (1), For each detected cross-power line point, calculate its distance from the center point of each tower cluster;

[0482] (2), Find the tower point cluster with the closest distance, and associate this cross-power line point with the corresponding tower;

[0483] The calculation formula for the distance between each detected cross-power line point and the center point of each tower cluster is:

[0484]

[0485] Where d represents the distance between the detected cross-power line point and the center point of the tower cluster, x p 、y p 、and z p respectively represent the X, Y, and Z axis coordinates of the detected cross-power line point, x c 、y c and z c respectively represent the X, Y, and Z axis coordinates of the center point of the tower cluster.

[0486] Preferably, in the extraction of a single power line, the calculation method of the power line direction is to use principal component analysis to fit multiple points on the power line to calculate the power line direction: Let the set of points on the power line be: {P i =(x i ,y i ,z i )|i = 1, 2,..., n}, n represents the number of points, then the expression for calculating the mean μ of these points is as follows:

[0487]

[0488] Subtract the mean from each point to get the centered point

[0489]

[0490] Construct the covariance matrix C using centralized data:

[0491]

[0492] where μ x represents the average coordinate of the points in the X-axis direction, μ y represents the average coordinate of the points in the Y-axis direction, μ z represents the average coordinate of the points in the Z-axis direction, n represents the number of points in the set, x i represents the normalized coordinate of point i in the X-axis direction, y i represents the normalized coordinate of point i in the Y-axis direction, z i represents the normalized coordinate of point i in the Z-axis direction, Centralized X-axis coordinate, represents the centralized Y-axis coordinate, represents the centralized Z-axis coordinate;

[0493] Solve the eigenvalue problem Cv = λv to obtain the eigenvalue λ and the eigenvector v, and select the eigenvector with the largest eigenvalue as the principal component direction, that is, the direction of the power line;

[0494] The specific rotation of the coordinate system is as follows: Rotate all the power line points in the point cloud to a position parallel to the X-axis. Let the rotation angle be θ, and use the rotation matrix to rotate the point cloud data:

[0495]

[0496] Apply the rotation matrix R(θ) to each point p in the point cloud i :

[0497] p′ i = R(θ) × p i ,

[0498] where p i represents the three-dimensional coordinate of point i before rotation, and p′ i represents the three-dimensional coordinate of point i after rotation;

[0499] The expression for the hierarchical processing is:

[0500] Layer k ={p′ i |z′ i ∈[z min + k × Δz, z min +(k + 1) × △z]},

[0501] where Layer k represents the set of points in the k-th layer, p′ iDenote the three-dimensional coordinates of point i after rotation as z′ i Denote the Z-axis coordinate of point i after rotation as z min Denote the height of the lowest point in the point set, and Δz represents the height interval of layering;

[0502] The layering threshold in the layering process is:

[0503] (1) Ground points: The height is less than 0.5m;

[0504] (2) Vegetation points: The height is greater than or equal to 0.5m and less than or equal to 10m;

[0505] (3) Power tower points: The height is greater than 10m and within a range less than 5m around the center point of the tower;

[0506] (4) Power line points: The height is greater than 10m and the distance from the center point of the tower is greater than or equal to 5m, but between power towers.

[0507] Preferably, the layer-by-layer separation includes the following steps:

[0508] (1) Uniformly generate plane grid points according to the defined grid resolution (m). The Z-axis value of each grid point is initially set lower than the lowest elevation value of the spanning power line points, and project the power line points onto the grid surface. In the adjacent rectangular area of the grid point, the power line points projected in this area are designated as the search points set for the grid point (as Figure 4 shown);

[0509] (2) By iteratively increasing the Z-axis value of each grid point, simulate the upward movement of the grid point at a constant speed. The expression for the increase in the Z-axis value is:

[0510] (res*rate)(m),

[0511] where res represents the resolution of the point cloud data, that is, the average distance between adjacent points, and rate represents the scale factor;

[0512] (3) Determine the movement stop of each grid point according to the following conditions: The Z-axis distance between the grid point and the nearest power line point in the corresponding search point set is less than (res*rate)(m), or the adjacent grid points have stopped. When all grid points stop moving, the iteration terminates;

[0513] (4) Calculate the Z-axis distance between the power line point and the nearest elevation reference grid point, and select the separated single-layer power line points with the Z-axis distance less than the threshold h; The calculation method for the Z-axis distance between the power line point and the nearest elevation reference grid point is:

[0514] Let the three-dimensional coordinates of the power line point P be (xp, yp, zp), and the coordinates of the grid point G closest to the power line point be (xg, yg, zg). Then the calculation formula for the distance between the power line point P and the grid point G closest to the power line point in the XY plane is:

[0515]

[0516] Among them, d xy represents the distance between the power line point P and the grid point G closest to the power line point in the XY plane, and d z represents the distance between the power line point P and the grid point G closest to the power line point in the Z-axis direction;

[0517] The adaptive calculation steps of the threshold h are as follows:

[0518] Calculate the average value:

[0519]

[0520] Among them, μ represents the average height of the z coordinate, n represents the number of points, and zi represents the z coordinate of the i-th point;

[0521] Calculate the standard deviation:

[0522]

[0523] Among them, σ represents the standard deviation of the height of the z coordinate, μ represents the average height of the z coordinate, n represents the number of points, and zi represents the z coordinate of the i-th point;

[0524] Determine the threshold:

[0525] h = μ + k·σ,

[0526] Among them, h represents the threshold, μ represents the average height of the z coordinate, σ represents the standard deviation of the height of the z coordinate, and k represents a constant;

[0527] (5) Rotate the extracted single-layer power line 90° along its length, and repeat steps (1) to (4) to separate a power supply line.

[0528] It should be noted that considering the different cross-sectional sizes of power lines in different layers, during the cyclic separation process of a single power line, the threshold h needs to be automatically adjusted; as Figure 5 shown, project the power supply line points onto the XZ plane, and vertically cut the power supply line segment near the lowest height point; then, adaptively calculate the threshold h according to the concentrated distribution characteristics of the Z-axis values of different layers within the line segment.

[0529] The power line extraction effect of the present invention:

[0530] The airborne LiDAR data used in this invention is the scanning data of a transmission line in Yunnan Province, China, obtained by using a CBI series lidar measurement system.

[0531] It can be clearly observed from Figure 6 that the algorithm adopted in this invention can accurately classify almost all points in two test areas with different terrain features. However, the classification errors mainly concentrate in three specific areas: the intersection of the power tower and the power line, the position where the insulator of the power tower is connected to the power line, and the top of the vegetation under the power line. These areas are characterized by close connections and similar characteristics among points, so there is great difficulty in classification.

[0532] Through Figure 7 analysis, it can be seen that the connection points within the green frame have little impact on the overall shape of the power line, so they will not interfere with the extraction and subsequent reconstruction of the power line and can be ignored. However, the discrete points deviating from the power line marked in the red frame will have an adverse impact on the shape of the power line and its extraction process, so they need to be removed. The finally extracted power line is as Figure 8 shown.

[0533] The above shows and describes the basic principle, main features and advantages of this invention. Those skilled in the art should understand that this invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principle of this invention. Without departing from the spirit and scope of this invention, this invention will have various changes and improvements, and these changes and improvements all fall within the scope of this invention claimed. The scope of protection claimed by this invention is defined by the appended claims and their equivalents.

Claims

1. A power line extraction method based on deep learning and morphological analysis, characterized in that, It includes power corridor semantic segmentation and individual segmentation; The power corridor semantic segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and cross-power line extraction; The individual segmentation includes the following steps: data preprocessing, local encoding module processing, network input and classification, and single power line extraction; Among them, the data preprocessing is to normalize the XYZ coordinates of the point cloud to be extracted for power lines; The local encoding module processing includes the following steps: (1) Input point coordinates: Input the point cloud coordinates after data preprocessing, with a total of N points; (2) K-nearest neighbor search: For each point, find its K nearest neighbor points; (3) Local feature extraction: Calculate the neighborhood of each point to obtain local distribution characteristics; perform average pooling operation; calculate the standard deviation of the Z-axis coordinates of the points in the neighborhood as the local height standard deviation; (4) Distance calculation and feature fusion: Calculate the distance between each point and its neighborhood points, and concatenate the calculated local distribution characteristics, local height standard deviation, and distance to generate a local feature representation; (5) Perform a non-linear transformation on the concatenated local feature representation to generate the final feature vector as the encoded feature, and output the feature points; The network input and classification includes the following steps: (1) Use the encoded feature of each point as the input of the network, and use the semantic category of each point as the output to train the network; (2) The network architecture includes: a spatial context feature module, random sampling, upsampling, a multi-layer perceptron, Dropout regularization, and a fully connected layer. The processing flow of the network architecture is: Combine the spatial context feature module with random sampling to fuse context features from different scales; The multi-layer perceptron and upsampling process and restore the feature resolution layer by layer; Generate the probability distribution of each category through the fully connected layer, so that each point is assigned to a semantic category; The semantic categories include: ground, vegetation, electric towers, and wires; The cross-power line extraction includes the following steps: (1) Power line data extraction: According to the results of network input and classification, extract the point cloud belonging to the wire category; (2) Power line cross-line detection: Horizontal slicing processing and distance threshold setting; (3) Cluster analysis of towers: Extract the tower point cloud and select the DBSCAN clustering algorithm for clustering processing; (4) Associate cross-power line points and tower points: Match the distance between the cross-power line points and the tower clustering center points, and perform screening and optimization according to the matching results. The screening and optimization are specifically as follows: If the cross-power line points are close to multiple tower clusters, further analyze their spatial position and height relationship, and select the most reasonable tower as the associated object; According to the geometric structure of the tower and the direction of the power line, perform a rationality check to ensure the accuracy of the classification of the cross-power line points and the association with the tower; (5) Result output and visualization: Visualize the cross-power line points and tower points in the point cloud, mark these points with different colors, and store the processed results in the standard point cloud format, including the category label of each point and the association information with the tower; The single power line extraction includes the following steps: (1) Power line data extraction: Extract the point cloud belonging to the wire category according to the network input and classification results; (2) Rotate the power line to a specific direction: Calculate the power line direction and then perform coordinate system rotation; (3) Stratification in the elevation direction: Perform stratification processing on the rotated power line point cloud data, and then perform intra-layer clustering. The intra-layer clustering is as follows: Perform preliminary clustering on each layer to ensure that each layer contains only the points of one power line; if a layer contains multiple power lines, use density clustering to further separate them; (4) Radius filtering and point separation: Then perform radius filtering on the clustered point cloud data to separate individual power lines; (5) Iteratively separate power lines: Separate layer by layer and update the point cloud; (6) Result output and visualization: Save the point cloud of each separated power line as a separate file or data structure respectively, visualize the results, check the separation effect of each power line, and ensure that there are no omissions or misclassifications in the separation process.

2. The power line extraction method based on deep learning and morphological analysis according to claim 1, wherein The normalization process adopts the maximum-minimum normalization method.

3. The power line extraction method based on deep learning and morphological analysis according to claim 1, characterized in that In local feature extraction, the neighborhood of each point is processed. The specific method for calculating the local distribution characteristics is as follows: The calculated local distribution characteristics include the average position and variance; The calculation formula for the average position is: where n represents the number of nearest neighbors, n = K; v i represents the position vector of the i-th nearest neighbor; p represents the position vector of the center point, and the center point is the point corresponding to the calculation of the local distribution characteristics; μ represents the average position offset; The calculation formula for the variance is: Among them, σ 2 represents variance; The expression for the average pooling operation is: Among them, f(p) represents the local feature of point p, n represents the number of neighbor points of point p, and p i represents the i-th neighbor point of point p; g is a feature extraction function for neighbor points; The calculation formula for the standard deviation of the Z-axis coordinates of the points in the neighborhood is: Among them, σ z represents the standard deviation of the Z-axis coordinates, N represents the number of points in the point cloud coordinates after data preprocessing, z i represents the normalized Z-axis coordinate value of the i-th point, μ z represents the normalized average value of the Z-axis coordinates, and the calculation formula for the average value of the Z-axis coordinates is:

4. The power line extraction method based on deep learning and morphological analysis according to claim 1, wherein In distance calculation and feature fusion, calculate the distance between each point and its neighborhood points. This distance uses the Euclidean distance, and its calculation formula is: where x p , y p , z p represent the coordinate values of point p on the X, Y, and Z coordinate axes respectively, x q , y q , z q represent the coordinate values of point q on the X, Y, and Z coordinate axes respectively, and d(p, q) represents the Euclidean distance from point p to point q; The specific method for concatenating the calculated local distribution characteristics, local height standard deviation, and distance to generate a local feature representation is: Use a multi-layer perceptron to map different local features to the same-dimensional space, thereby concatenating the local distribution characteristics, local height standard deviation, and distance; The multi-layer perceptron includes an input layer, a hidden layer, and an output layer. The input layer, hidden layer, and output layer all contain multiple neurons, and are fully connected between layers. Each neuron applies a ReLU activation function to generate the output; the calculation formula from the input layer to the hidden layer is: h = ReLU(W1f P + b1), Among them, h represents the feature vector output by the hidden layer, W1 represents the weight matrix from the input layer to the hidden layer, f P represents the input feature vector, and b1 represents the bias vector of the hidden layer; The calculation formula from the hidden layer to the output layer is: g P = W2h + b2, Among them, g P represents the feature vector after mapping, W2 represents the weight matrix from the hidden layer to the output layer, h represents the feature vector output by the hidden layer, and b2 represents the bias vector of the output layer.

5. The power line extraction method based on deep learning and morphological analysis according to claim 1, characterized in that The expression for the non-linear transformation is: h l = φ(W l ·h l-1 + b l ) where h I represents the output feature vector of the I-th layer, i.e., the concatenated local features; h I-1 represents the output feature vector of the (I-1)-th layer, W I represents the weight matrix of the I-th layer, b I represents the bias vector of the I-th layer, and φ represents the activation function; The expression for the feature matrix is: F = [p1, p2,..., p i , Among them, F represents the entire feature matrix, and p i is the final feature vector of the i-th feature point, that is: p i = [x i ,y i ,z i ,f dist,i ,f std,i ,f other,i1 ,f other,i2 ,f other,i3 , where x i , y i , z i respectively represent the normalized coordinates of the i-th point on the three coordinate axes X, Y, and Z, f dist,i represents the distance feature of the i-th point, f std,i represents the standard deviation feature of the z-axis of the i-th point, f other,i1 represents the local average position feature of the i-th point, f other,i2 represents the local variance feature of the i-th point, f other,i3 represents the local height feature of the i-th point.

6. The power line extraction method based on deep learning and morphological analysis according to claim 1, characterized in that In network input and classification, the spatial context feature module is combined with random sampling to fuse context features from different scales, The specific steps include: (1) Multi-layer convolution: Each layer of convolution kernels extracts features at different scales, including low-level features and high-level features. The low-level features include local information, and the high-level features include context information. The expression for the multi-layer convolution is: Among them, represents the feature map of the m-th layer at the position (i, j), represents the weight of the k-th filter in the m-th layer, F m-1 represents the feature map of the previous layer, b m represents the bias term; (2) Max pooling, and the expression for the max pooling is: Among them, represents the feature map of the I-th layer at the position (i, j), represents the feature map of the (I - 1)-th layer at the position (a, b); (3) Skip connection: Use skip connection to combine the features of the downsampling path with the features of the upsampling path. The expression for the skip connection is: F l = F l-1 + H(F l-1 ; W), Among them, H represents a non-linear transformation function, W represents the parameters of the non-linear transformation function, and F l-1 represents the feature map before the skip connection, and F l represents the feature map after the skip connection; (4) The multi-scale feature fusion is a fusion based on the attention mechanism: The expression for the multi-layer perceptron to process and restore the feature resolution layer by layer is: Among them, y j represents the output of the j-th neuron in the hidden layer, f represents the activation function, and w ij represents the weight connecting the i-th neuron in the input layer and the j-th neuron in the hidden layer, and x i represents the eigenvalue of the input vector, and b j represents the bias term of the j-th neuron; The transposed convolution is used for upsampling to process and restore the feature resolution layer by layer. The expression for the transposed convolution is: Y = Deconv(X; W, stride = s), where X represents the input feature map, Y represents the output feature map, W represents the transposed convolutional kernel, and s represents the stride; The fully connected layer generates the probability distribution of each category through the Softmax activation function, and the expression of the Softmax activation function is: Among them, O j represents the unnormalized score of the network output layer for class j, x represents the input data, y represents the predicted target class, and O k represents the unnormalized score of the network output layer for class k.

7. The method for extracting power lines based on deep learning and morphological analysis according to claim 1, characterized in that, In cross-power line extraction, the horizontal slicing process is specifically as follows: Slice the point cloud along the path of the power line, and the slicing direction is perpendicular to the direction of the power line; The distance threshold setting includes: calculating the height and horizontal distance of the points in each slice relative to the power line to set the distance threshold; The calculation method of the height and horizontal distance of the points in each slice relative to the power line is: if a power line is defined by two endpoints, namely P1(x1, y1, z1) and P2(x2, y2, z2), and a point P(x, y, z) in the point cloud, then the calculation formula for the horizontal distance of the point relative to the power line is: where d horizontal represents the horizontal distance of the point P(x, y, z) relative to the power line; The calculation formula for the height of the points in each slice relative to the power line is: d vertical = |z - Q z | Among them, Q x represents the coordinate of the projection of point P on the X-axis, and Q y represents the coordinate of the projection of point P on the Y-axis, and Q z represents the coordinate of the projection of point P on the Z-axis. z represents the Z coordinate value of point P(x, y, z), and d vertical represents the height of point P(x, y, z) relative to the power line; The method for setting the distance threshold is: D 水平 = μ 水平 + k·σ 水平 , H 垂直 = μ 垂直 + k·σ 垂直 , Among them, D 水平 represents the horizontal distance threshold, μ 水平 represents the average value of the horizontal distance, σ 水平 represents the standard deviation of the horizontal distance, H 垂直 represents the vertical height threshold, μ 垂直 represents the average value of the vertical height, σ 垂直 represents the standard deviation of the vertical height, and k is a constant.

8. The power line extraction method based on deep learning and morphological analysis according to claim 1, characterized in that, The steps of the clustering process include: (1) Select an unvisited point p as the starting point; the unvisited point is a point in the point cloud data that has not been marked as a power line; (2) If point p is a core point, create a new cluster and add point p to the cluster; (3) Find all neighbor points of point p and check whether these neighbor points are also core points; (4) For each neighbor point n, if neighbor point n has not been visited, recursively execute steps (1) to (3); (5) If neighbor point n has been assigned to a certain cluster, add n to the current cluster; (6) When all points have been visited, the algorithm ends; The distance matching includes: (1) For each detected cross-power line point, calculate its distance from the clustering center points of each tower; (2) Find the tower point clustering with the closest distance and associate the cross-power line point with the corresponding tower; The calculation formula for the distance between each detected cross-power line point and the clustering center points of each tower is: Among them, d represents the distance between the detected cross-power line point and the center point of the tower cluster, x p , y p , and z p respectively represent the X, Y, and Z axis coordinates of the detected cross-power line point, x c , y c and z c respectively represent the X, Y, and Z axis coordinates of the center point of the tower cluster.

9. The power line extraction method based on deep learning and morphological analysis according to claim 1, characterized in that, In the extraction of a single power line, the calculation method of the power line direction is to use principal component analysis to fit multiple points on the power line to calculate the power line direction. Let the set of points on the power line be: {P i =(x i , y i , z i )|i = 1, 2,..., n}, where n represents the number of points. Then the expression for calculating the mean μ of these points is as follows: Subtract the mean from each point to obtain the centered point P i : Construct the covariance matrix C using the centralized data: Among them, μ x represents the average coordinate of the point in the X-axis direction, μ y represents the average coordinate of the point in the Y-axis direction, μ z represents the average coordinate of the point in the Z-axis direction, n represents the number of points in the set, x i represents the normalized coordinate of point i in the X-axis direction, y i represents the normalized coordinate of point i in the Y-axis direction, z i represents the normalized coordinate of point i in the Z-axis direction, The centered X-axis coordinate, represents the centered Y-axis coordinate, represents the centered Z-axis coordinate; Solve the eigenvalue problem Cv = λv to obtain the eigenvalue λ and the eigenvector v, and select the eigenvector with the largest eigenvalue as the principal component direction, that is, the direction of the power line; The coordinate system rotation is specifically as follows: Rotate all power line points in the point cloud to a position parallel to the X-axis. Let the rotation angle be θ, and use the rotation matrix to rotate the point cloud data: Apply the rotation matrix R(θ) to each point p in the point cloud i : p′ i = R(θ) × p i , where p i represents the three-dimensional coordinates of point i before rotation, and p' i represents the three-dimensional coordinates of point i after rotation; The expression of the hierarchical processing is: Layer k ={p′ i |z′ i ∈[z min +k×Δz, z min +(k + 1)×Δz]} Among them, Layer k represents the point set of the k-th layer, and p′ i represents the three-dimensional coordinates of point i after rotation, and z′ i represents the Z-axis coordinate of point i after rotation, and z min represents the height of the lowest point in the point set, and Δz represents the height interval of layering; The hierarchical threshold in the hierarchical processing is: (1) Ground points: The height is less than 0.5m; (2) Vegetation points: The height is greater than or equal to 0.5m and less than or equal to 10m; (3) Power tower points: The height is greater than 10m and within a range less than 5m around the tower center point; (4) Power line points: The height is greater than 10m and the distance from the tower center point is greater than or equal to 5m, but between power towers.

10. The power line extraction method based on deep learning and morphological analysis according to claim 1, characterized in that The step-by-step separation includes the following steps: (1) Generate planar grid points uniformly according to the defined grid resolution. The Z-axis value of each grid point is initially set lower than the lowest elevation value of the span power line points, and project the power line points onto the grid surface. In the adjacent rectangular area of the grid point, the power line points projected within this area are designated as the search points set for the grid point; (2) Simulate the upward movement of the grid points at a constant speed by iteratively increasing the Z-axis value of each grid point. The expression for the increase in the Z-axis value is: (res * rate)(m), where res represents the resolution of the point cloud data, i.e., the average distance between adjacent points, and rate represents the scale factor; (3) Determine the stop of the movement of each grid point according to the following conditions: the Z-axis distance between the grid point and the nearest power line point in the corresponding search point set is less than (res * rate)(m), or the adjacent grid points have stopped. When all grid points stop moving, the iteration terminates; (4) Calculate the Z-axis distance between the power line point and the nearest elevation reference grid point, and select the separated single-layer power line points with the Z-axis distance less than the threshold h. The calculation method for the Z-axis distance between the power line point and the nearest elevation reference grid point is: Let the three-dimensional coordinates of the power line point P be (xp, yp, zp), and the coordinates of the grid point G closest to the power line point be (xg, yg, zg). Then the calculation formula for the distance between the power line point P and the grid point G closest to the power line point in the XY plane is: where d xy represents the distance between the power line point P and the grid point G closest to the power line point in the XY plane, and d z represents the distance between the power line point P and the grid point G closest to the power line point in the Z-axis direction; The adaptive calculation steps for the threshold h are: Calculate the average value: where μ represents the average height of the z - coordinate, n represents the number of points, and z i represents the z - coordinate of the i - th point; Calculate the standard deviation: Among them, σ represents the standard deviation of the height of the z coordinate, μ represents the average value of the height of the z coordinate, n represents the number of points, and z i represents the z coordinate of the i-th point; Determine the threshold: h = μ + k·σ, where h represents the threshold, μ represents the average height of the z coordinate, σ represents the standard deviation of the height of the z coordinate, and k represents a constant; (5) Rotate the extracted single-layer power line 90° along its length, and repeat steps (1) to (4) to separate a power line.

Citation Information

Patent Citations

  • High-voltage power transmission line extraction method combining power transmission trend and tower position

    CN117095318A

  • Point cloud data simplification method and system for power line tower

    CN117745788A