Segment building points from aerial lidar data
segments the building points and non-building points from the input unorganized point cloud
buildingPtsIdx = segmentAerialLidarBuildings(
ptCloud using a pretrained PointNet++ model and returns the building
The input point cloud dimensions must be in meters.
This function requires Deep Learning Toolbox™.
[___] = segmentAerialLidarBuildings(___,ExecutionEnvironment=
specifies the execution environment for the function in addition to any combination of
arguments from previous syntaxes.
Segment Buildings from Aerial Lidar Data
Specify a LAZ file that contains aerial lidar data.
fileName = fullfile(toolboxdir("lidar"),"lidardata","las", ... "aerialLidarData.laz");
Read point cloud data from the LAZ file into the workspace.
lasReader = lasFileReader(fileName); ptCloud = readPointCloud(lasReader);
Segment the building points from the point cloud.
[~,nonBuildingPtCloud,buildingPtCloud] = segmentAerialLidarBuildings(ptCloud);
Visualize the building and non-building points.
ptCloud — Unorganized point cloud
Unorganized point cloud data, specified as a
env — Hardware resource
"auto" (default) |
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 runs on a GPU. If a suitable GPU is not available, the function returns an error message.
"cpu"— The function runs on a CPU.
buildingPtsIdx — Binary map of segmented point cloud
M-element logical vector
Binary map of the segmented point cloud, returned as an M-element
logical vector. Elements that correspond to building points in the point cloud are
true, and non-building points are
nonBuildingPtCloud — Point cloud of non-building points
Point cloud of non-building points, returned as a
buildingPtCloud — Point cloud of building points
Point cloud of building points, returned as a
Introduced in R2022b