Solid object using point cloud

I am doing a 3D face identification and verification project using matlab. I already made the plot features. But I want to fill my point cloud with a solid object. How to do it?

Here is my code:

load('myOne.mat');
figure(3)
plot3(myOne(:,1),myOne(:,2),myOne(:,3),'r.');
%3D face building
shp = alphaShape(myOne(:,1),myOne(:,2),myOne(:,3),1,'HoleThreshold',15);
plot(shp)
title('3D surface from point cloud')

myOne.mat, point cloud and wrap 3D image

myOne.mat

+4
source share
1 answer

You can download MyRobustCrust.m (author: Luigi Giaccari), for example, from github .

Then do

[t,tnorm]=MyRobustCrust(myOne(:, 1:3));
hold on; 
title('Output Triangulation','fontsize',14);
axis equal;
trisurf(t,myOne(:,1),myOne(:,2),myOne(:,3),'facecolor','c','edgecolor','b');

gives you

enter image description here

Note:

The file used to exist in Matlab FileExchange, but no longer works. I don’t know why this is so, and I think that to be safe, it would be better to contact the author before using it.

+4
source

Source: https://habr.com/ru/post/1616509/


All Articles