How can I change elevation data in point cloud

This is exactly my problem, how can I distribute elevation points on x and y axes in point cloud.I could not find any information

回答 (1 件)

Adam Danz
Adam Danz 2021 年 1 月 12 日
編集済み: Adam Danz 2021 年 1 月 12 日

0 投票

Extract (x,y,z) coordinates from the pointCloud object (ptCloud.Location), make changes to the coordinates, and then reassign to a new pointCloud.
Demo: scatter the z-coordinates.
% Load build-in data, create pointcloud
load('xyzPoints');
ptCloud = pointCloud(xyzPoints);
% Extract (x,y,z) coordinates and randomly scatter the z-values
xyzRand = double(ptCloud.Location);
randIdx = randperm(size(xyzRand,1));
xyzRand(:,3) = xyzRand(randIdx,3);
% Create new pointcloud
ptCloudScat = pointCloud(xyzRand);
% Plot both pointclouds
figure
ax(1) = subplot(1,2,1);
pcshow(ptCloud,'Parent',ax(1))
title(ax(1),'Original')
ax(2) = subplot(1,2,2);
pcshow(ptCloudScat,'Parent',ax(2))
title(ax(2),'Z-scattered')
% Link and rotate axes
fig.UserData = linkprop(ax,'view');
set([ax.Toolbar],'Visible','off')
rotate3d('on')

2 件のコメント

Ahmet Selim Arslan
Ahmet Selim Arslan 2021 年 1 月 13 日
編集済み: Ahmet Selim Arslan 2021 年 1 月 13 日
Thank you for the comment it will helps me :)
Adam Danz
Adam Danz 2021 年 1 月 13 日
編集済み: Adam Danz 2021 年 1 月 15 日
Glad I could help.
@Ahmet Selim ArslanYou can accept helpful answers by pressing the blue 'accept' button.

サインインしてコメントする。

カテゴリ

製品

リリース

R2020b

質問済み:

2021 年 1 月 11 日

編集済み:

2021 年 1 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by