Why do I get holes in my AlphaShape in MATLAB, even though the point spacing is smaller than the alpha value?

조회 수: 2 (최근 30일)
I have a set of 3D points and want to reconstruct the shape of a car using AlphaShape. The problem I'm encountering is that I still get holes, even though the distance between the points is smaller than the alpha value. I have already tried adjusting the HoleThreshold with different values, but it has no effect on the result. I have included the code I am using and a picture (zoomed in on the door) showing the type of holes I am referring to.
%% Downsampling
gridstep = 0.008;
ptCloudDownSampled = pcdownsample(ptCloud,"gridAverage",gridstep);
pcshow(ptCloudDownSampled)
x = double(ptCloudDownSampled.Location(:,1));
y = double(ptCloudDownSampled.Location(:,2));
z = double(ptCloudDownSampled.Location(:,3));
%% AlphaShape
shp = alphaShape(x, y, z, 0.13);
  댓글 수: 4
John D'Errico
John D'Errico 2024년 9월 17일
The data might be of value. In fact, it will be terribly difficult to know for sure what happened otherwise. But my guess is it is a large data set, and that might make it problematic to upload the data.
I might make a random conjecture, but any guess will be certainly wrong, based on nothing more than a picture.
Lars Urban
Lars Urban 2024년 9월 19일
@Matt J I attached the data i use here now.
@Walter Roberson See below my Code I use for plotting. But i am exporting the results as a stl file and i can see the holes in other softwares too. Like CloudCompare or Autodesk Fusion.
@John D'Errico Yes the data is large and i would say realitve noisy. But i could not find anything about problems reconstructing a noisy pointcloud with alphashape.
%% Plot
figure;
plot(shp, 'FaceColor', [0.2 0.6 0.8], 'EdgeColor', 'none');
hold on;
ax = gca;
ax.FontSize = 14;
ax.FontWeight = 'bold';
ax.XColor = 'k';
ax.YColor = 'k';
ax.ZColor = 'k';
%
title('AlphaShape 3D', 'FontSize', 16, 'FontWeight', 'bold');
xlabel('X-Achse', 'FontSize', 14, 'FontWeight', 'bold');
ylabel('Y-Achse', 'FontSize', 14, 'FontWeight', 'bold');
zlabel('Z-Achse', 'FontSize', 14, 'FontWeight', 'bold');
%
axis equal;
az = -90;
el = 0;
camlight(az,el);
set(gcf, 'Color', 'w');
view(az, el);
grid off;
hold off;

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by