您的位置:首页 > 编程语言 > MATLAB

MATLAB 对Ply文件进行 读取、显示、连线操作

2016-10-27 20:28 330 查看
1、函数:pcread

showPointCloud([x_s(:),y_s(:),z_s(:)+4]);
title('Sphere with the default color map');
xlabel('X');
ylabel('Y');
zlabel('Z');
hold on,
showPointCloud([x_t(:),y_t(:),z_t(:)]);

for k = 1:size(matchedPointsValid,1)
x = [matchedPointsValid(k,7) matchedPointsValid(k,10)];
y = [matchedPointsValid(k,8) matchedPointsValid(k,11)];
z = [matchedPointsValid(k,9)+4  matchedPointsValid(k,12)];
plot3(x,y,z,'r.-');
hold on,
end
saveas(hf,matched_points_file);  % 保存图片


蒙特卡洛方法

画矩形 :

选取矩形框内数据:

figure, imshow('pout.tif');

h = imrect;

position = wait(h);

1、函数:pcread

showPointCloud([x_s(:),y_s(:),z_s(:)+4]);
title('Sphere with the default color map');
xlabel('X');
ylabel('Y');
zlabel('Z');
hold on,
showPointCloud([x_t(:),y_t(:),z_t(:)]);

for k = 1:size(matchedPointsValid,1)
x = [matchedPointsValid(k,7) matchedPointsValid(k,10)];
y = [matchedPointsValid(k,8) matchedPointsValid(k,11)];
z = [matchedPointsValid(k,9)+4  matchedPointsValid(k,12)];
plot3(x,y,z,'r.-');
hold on,
end
saveas(hf,matched_points_file);  % 保存图片


蒙特卡洛方法

1、函数:pcread

showPointCloud([x_s(:),y_s(:),z_s(:)+4]);
title('Sphere with the default color map');
xlabel('X');
ylabel('Y');
zlabel('Z');
hold on,
showPointCloud([x_t(:),y_t(:),z_t(:)]);

for k = 1:size(matchedPointsValid,1)
x = [matchedPointsValid(k,7) matchedPointsValid(k,10)];
y = [matchedPointsValid(k,8) matchedPointsValid(k,11)];
z = [matchedPointsValid(k,9)+4  matchedPointsValid(k,12)];
plot3(x,y,z,'r.-');
hold on,
end
saveas(hf,matched_points_file);  % 保存图片


蒙特卡洛方法
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐