Is there is a way to export mesh in figure to stl or obj???

조회 수: 25 (최근 30일)
muhammad farttoos
muhammad farttoos 2017년 6월 13일
답변: Young Dae 2018년 9월 14일
Hello I have a matlab code as i below that result 3d mesh, I wonder is there is any simple way that give me an option to export it to 3D object as stl or obj or any else 3d extension
if true
% Img = imread('MK2.jpg');
Img=double(Img(:,:,1));
sigma=1.5;
G=fspecial('gaussian',15,sigma);
Img_smooth=conv2(Img,G,'same');
[Ix,Iy]=gradient(Img_smooth);
f=Ix.^2+Iy.^2;
g=1./(1+f);
c0=2;
initialfunc=c0*ones(size(Img));
initialfunc(10:95, 8:100)=-c0;
phi=initialLSF;
figure(1);
mesh(-phi);
hold on; contour(phi, [0,0], 'r','LineWidth',2);
title('M1');
view([-80 35]);
imagesc(Img,[0, 255]); axis off; axis equal; colormap(gray); hold on; contour(phi, [0,0], 'r');
end
end
alfa=0;
iter_refine = 10;
.
.
.
figure;
mesh(-finalLSF);
hold on; contour(phi, [0,0], 'r','LineWidth',2);
str=['Final level set function, ', num2str(iter_outer*iter_inner+iter_refine), ' iterations'];
title(str);
axis off;
end
end

답변 (2개)

Young Dae
Young Dae 2018년 9월 14일

Walter Roberson
Walter Roberson 2017년 12월 27일
Note: mesh are surf that have face color turned off.

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by