How do I correctly parametrize the CSF for low vegetation on inclinded surface, especially the class threshold parameter?

조회 수: 8 (최근 30일)
I want to extract non-ground points from a Lidar point cloud by using the CSF. The data show short grass on an inclined, uneven surface, hence the height difference between ground points and non-ground points is small.
Thus, I used the following parametrization: rigidness of cloth: 2 (terrain with gentle slope), cloth resolution: 0.01, iterations: 0.5, class threshold: 0.1, time step: 0.39
My code looks as follows: [groundIndex,nonGroundIndex] = csf_filtering(ptCloud,2,true,0.01,0.1,500,0.39);
Plotting ground points and non-ground points, I got the following result:
I changed the class threshold to 0.5, since it just split the cloud at height 0.1:
Again, the cloud was just split at a height difference of 0.5 instead of applying the actual CSF.
I figure the algorithm has trouble filtering the inclined surface. But still, I have trouble understanding the influence of the class threshold parameter and why it has such significant effect.
Has someone experineced similar problems and knows possible solutions? Or maybe someone has alternative ideas how I could filter out the vegetation?
It would be great if someone could share some ideas. Thanks!

답변 (1개)

Abhishek Chakram
Abhishek Chakram 2024년 2월 8일
편집: Abhishek Chakram 2024년 2월 8일
Hi chris_chros,
From your description, it seems that adjusting the class threshold parameter significantly affects the results. This is because the class threshold determines the vertical distance from the cloth to the points at which they are considered non-ground. If the surface is uneven or inclined and the vegetation is short, setting an appropriate class threshold becomes challenging.
Below is a MATLAB pseudo code that demonstrates the use of the Cloth Simulation Filter (CSF) for ground and non-ground separation in a LiDAR point cloud:
% Load the point cloud data (replace with your actual data file)
ptCloud = pcread('path_to_your_lidar_data.pcd');
% Define CSF parameters
rigidness = 2; % Rigidness of cloth (1-3, with 3 being very rigid)
clothResolution = 0.01; % Resolution of the cloth simulation
classThreshold = 0.1; % Height threshold for classifying non-ground points
maxIterations = 500; % Maximum number of iterations for the simulation
timeStep = 0.39; % Time step for the simulation
% Placeholder for the CSF filtering function (replace with your actual CSF function)
% [groundIndex, nonGroundIndex] = csf_filtering(ptCloud, rigidness, true, clothResolution, classThreshold, maxIterations, timeStep);
% For demonstration purposes, let's assume that the first 70% of points are ground
numPoints = ptCloud.Count;
groundIndex = 1:round(numPoints * 0.7);
nonGroundIndex = (round(numPoints * 0.7) + 1):numPoints;
% Extract ground and non-ground points based on indices
groundPts = select(ptCloud, groundIndex);
nonGroundPts = select(ptCloud, nonGroundIndex);
% Visualize the ground points in green and non-ground points in red
figure;
pcshow(groundPts.Location, [0, 1, 0]);
hold on;
pcshow(nonGroundPts.Location, [1, 0, 0]);
hold off;
xlabel('X (m)');
ylabel('Y (m)');
zlabel('Z (m)');
title('Ground (Green) and Non-Ground (Red) Points');
legend('Ground Points', 'Non-Ground Points');
grid on;
You can refer to the following documentation to know more about the functions used:
Best Regards,
Abhishek Chakram

카테고리

Help CenterFile Exchange에서 Labeling, Segmentation, and Detection에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by