Processing of LiDAR point cloud data

11 views (last 30 days)
MHMD
MHMD on 3 Jan 2024
Commented: MHMD on 26 Nov 2024 at 14:33
how can i set 2d regular grid on point cloud data ?
i want to extract buildings from point cloud in matlab , how can i do this with using point normals and hights?

Accepted Answer

Sai Pavan
Sai Pavan on 25 Nov 2024 at 10:58
Hello,
If I understand you correctly, it appears like you have 2 queries. You want to get a 2D grid of points from point cloud data and secondly, you want to know the process of extracting buildings with point normals and heghts.
To set up a 2D regular grid on point cloud data, you can use the "pcbin" function by setting the desired grid resolution and then use "select" function to create a new point cloud from a particular grid location.
Refer to the below documentation pages to learn more about:
Below is the workflow to extract buildings from point cloud data with the help of normals and height information:
  1. Import your point cloud data into MATLAB.
  2. Compute normals to distinguish between vertical and horizontal surfaces.
  3. Use normals and height thresholds to filter building points.
  4. Display the filtered points to verify building extraction.
Please refer to the below code snippet that illustrates this workflow:
ptCloud = pcread('dummy.ply');
normals = pcnormals(ptCloud);
normalThreshold = 0.9; % Vertical surface threshold
heightThreshold = 2; % Minimum height for buildings
zNormals = normals(:, 3);
% Filter points
buildingIndices = abs(zNormals) < (1 - normalThreshold) & ...
ptCloud.Location(:, 3) > heightThreshold;
buildingPoints = select(ptCloud, buildingIndices);
figure;
pcshow(buildingPoints);
title('Extracted Buildings');
Hope it helps!

More Answers (0)

Categories

Find more on Labeling, Segmentation, and Detection in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!