Main Content


Segment powerline points from aerial lidar data

Since R2023b


    powerlinePtsIdx = segmentAerialLidarPowerline(ptCloud) segments the powerline points and non-powerline points from the input unorganized point cloud ptCloud and returns the powerline point indices.


    • The input point cloud dimensions must be in meters.

    • This function requires Deep Learning Toolbox™.


    [powerlinePtsIdx,nonPowerlinePtCloud,powerlinePtCloud] = segmentAerialLidarPowerline(ptCloud) additionally returns the powerline points and non-powerline points as individual pointCloud objects.

    [___] = segmentAerialLidarPowerline(___,ExecutionEnvironment=env) specifies the execution environment for the function in addition to any combination of arguments from previous syntaxes.


    collapse all

    Download a ZIP file containing aerial lidar data.

    zipFile = matlab.internal.examples.downloadSupportFile("lidar","data/");
    saveFolder = fileparts(zipFile);
    fileName = fullfile(saveFolder,"PowerlineAerialData","powerlineAerialLidarData.las");

    Read point cloud data from the LAS file into the workspace.

    lasReader = lasFileReader(fileName);
    ptCloud = readPointCloud(lasReader);

    Segment the powerline points from the point cloud.

    [~,nonPowerlinePtCloud,powerlinePtCloud] =  segmentAerialLidarPowerline(ptCloud);

    Visualize the powerline and non-powerline points.


    Figure contains an axes object. The axes object contains 2 objects of type scatter.

    Input Arguments

    collapse all

    Unorganized point cloud data, specified as a pointCloud object.

    Hardware resource to use to process the point cloud, specified as one of these options.

    • "auto" — Use a GPU if available. Otherwise, use the CPU. The use of a GPU requires Parallel Computing Toolbox™ and a CUDA® enabled NVIDIA® GPU. For information about the supported compute capabilities, see GPU Computing Requirements (Parallel Computing Toolbox).

    • "gpu" — The function uses a GPU. If a suitable GPU is not available, the function returns an error message.

    • "cpu" — The function uses a CPU.

    Data Types: char | string

    Output Arguments

    collapse all

    Binary map of the segmented point cloud, returned as an M-element logical vector. M is the number of points in the input point cloud.Elements that correspond to powerline points in the point cloud are true, and non-powerline points are false.

    Point cloud of non-powerline points, returned as a pointCloud object.

    Point cloud of powerline points, returned as a pointCloud object.


    This function uses a RandLA-Net network to segment powerline points from aerial lidar data. RandLA-Net is a simple and efficient neural network for performing semantic segmentation on large point clouds.

    Each layer of the network randomly downsamples the large point cloud which significantly decreases the point density. To retain the key features of the downsampled point cloud for semantic segmentation, the network uses a local feature aggregation module on each point.

    The local feature aggregation module has these units.

    1. Local Spatial Encoding — Embeds the coordinates of all neighboring points to observe local geometric patterns. This eventually enables the network to effectively learn complex local structures.

    2. Attentive Pooling — Aggregates the set of neighboring point features.

    3. Dilated Residual Block — Stacks multiple Local Spatial Encoding units and Attentive Pooling units with a skip connection to preserve the geometric details of the points.

    Using these modules, RandLA-Net stacks multiple local feature aggregation modules and random sampling layers to infer semantic labels for large point clouds.

    Version History

    Introduced in R2023b