Hasitha Ediriweera
Hasitha Ediriweera

Reputation: 53

Solid object using point cloud

I am doing a 3D face identification and verification project using matlab. I have already done a plot of face feature points. But I want to fill my point cloud into a solid object. How do I do that?

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 face

myOne.mat

Upvotes: 4

Views: 532

Answers (1)

lhcgeneva
lhcgeneva

Reputation: 1981

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

Then doing

[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 of caution:

The file used to exist on Matlab FileExchange but doesn't anymore. I don't know, why that is and I think to be on the safe side it would be best to contact the author before using it.

Upvotes: 4

Related Questions