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:
- Import your point cloud data into MATLAB.
- Compute normals to distinguish between vertical and horizontal surfaces.
- Use normals and height thresholds to filter building points.
- 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);
zNormals = normals(:, 3);
buildingIndices = abs(zNormals) < (1 - normalThreshold) & ...
ptCloud.Location(:, 3) > heightThreshold;
buildingPoints = select(ptCloud, buildingIndices);
title('Extracted Buildings');
Hope it helps!