Hello Mat

 找回密码
 立即注册
查看: 5836|回复: 2

MATLAB点云处理--三维曲面构建

[复制链接]

1294

主题

1520

帖子

110

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22633
发表于 2017-4-20 23:16:22 | 显示全部楼层 |阅读模式
  1. function ysw
  2. clc;clear all;close all
  3. x=[0.4,0.4,0.4,0.4,0.4,...
  4.     0.5,0.5,0.5,0.5,0.5,...
  5.     0.6,0.6,0.6,0.6,0.6];
  6. y=[0.15,0.2,0.28,0.35,0.4,...
  7.     0.15,0.2,0.28,0.35,0.4,...
  8.     0.15,0.2,0.28,0.35,0.4,];
  9. z1=[566,566,566,907,1351,...
  10.     472,472,472,907,1351,...
  11.     377,377,377,907,1351];
  12. z2=[810,810,810,2000,3000,...
  13.     675,675,675,2000,3000,...
  14.     540,540,540,2000,3000];
  15. sf1=fit([x',y'],z1','poly23');
  16. sf2=fit([x',y'],z2','poly23');

  17. xx = min(x):0.01:max(x);
  18. yy = min(y):0.01:max(y);
  19. [xx,yy] = meshgrid(xx,yy);
  20. zz1 = sf1(xx,yy);
  21. zz2 = sf2(xx,yy);
  22. % figure(1),hold on;
  23. % plot3(xx,yy,zz1,'ro');
  24. % plot3(xx,yy,zz2,'go');
  25. % hold off

  26. p(:,1) = [xx(:);xx(:)]/2;
  27. p(:,2) = [yy(:);yy(:)]/2;
  28. p(:,3) = [zz1(:);zz2(:)]/5000000;
  29. [t]=MyCrust(p);
  30. % plot3(p(:,1),p(:,2),p(:,3),'g.')
  31. %% plot of the oyput triangulation
  32. figure(2)
  33. hold on
  34. % axis equal
  35. % trisurf(t,p(:,1),p(:,2),p(:,3),'facecolor','c','edgecolor','b')%plot della superficie trattata
  36. trisurf(t,p(:,1)*2,p(:,2)*2,p(:,3)*5000000,'edgecolor','b')
  37. view(-37.5,30);
  38. % axis tight;
复制代码

具体的代码下载链接:
游客,如果您要查看本帖隐藏内容请回复






本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复

使用道具 举报

0

主题

2

帖子

6

金钱

新手上路

Rank: 1

积分
8
发表于 2017-9-11 17:11:36 | 显示全部楼层
谢谢楼主,学习学习,看看哪个对我有用
回复 支持 反对

使用道具 举报

0

主题

13

帖子

1

金钱

新手上路

Rank: 1

积分
17
发表于 2019-4-11 22:00:26 | 显示全部楼层
谢谢楼主分享,正在学习中
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Python|Opencv|MATLAB|Halcom.cn ( 蜀ICP备16027072号 )

GMT+8, 2024-4-25 08:06 , Processed in 0.223676 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表