Levelling of 3D built in stl file

3 次查看(过去 30 天)
Noor Mohammad
Noor Mohammad 2019-8-6
评论: KSSV 2019-8-7
Hello Community,
I have a stl file of 3D image. This image is titled 45 degree. I want to level (project) it on a plane so that I could get z values (height of the different parts of the cracks). For details please have a look at the attachment. This is sample which contains many cracks. Some of the cracked are elevated, i.e., curled ups. I want to know the height of these curlings. Thanks.
  2 个评论
darova
darova 2019-8-6
You forgot to attach the image :(
Noor Mohammad
Noor Mohammad 2019-8-6
编辑:Noor Mohammad 2019-8-7
It is uploaded now. Thanks drova for your response.

请先登录,再进行评论。

回答(1 个)

KSSV
KSSV 2019-8-7
编辑:KSSV 2019-8-7
Download this file exchange function:
[t,p] = stlread('Tr_3.stl') ;
% Rotate along z axes by 45 degrees
th = 45 ;
R = [cosd(th) -sind(th) 0 ; sind(th) cosd(th) 0 ; 0 0 1] ; % Rotation matrix
pr = p*R ; % Rotate the points
pr(:,3) = pr(:,3)-mean(pr(:,3)) ;
% plot
trisurf(t,pr(:,1),pr(:,2),pr(:,3),'EdgeColor','none')
xlabel('x')
ylabel('y')
zlabel('z')
  4 个评论
Noor Mohammad
Noor Mohammad 2019-8-7
Actually, I want to something like this attachment. I want to measure the height of the curling cracks using the z-values obtained from matlab. I think it would be clear now. Thank you so much for your efforts..
KSSV
KSSV 2019-8-7
Okay.....the points have been shifted to (x,y) plane and mean is removed along z......wont this work out?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Filtering and Enhancement 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by