フィルターのクリア

How might I display two pointclouds in one plot?

12 ビュー (過去 30 日間)
Dylan
Dylan 2011 年 8 月 7 日
回答済み: Prashik Shende 2020 年 9 月 23 日
Hi, I have two pointcloud data files and I would like to overlay them for comparison, the data is loaded into a struct and I can display the pointclouds individually, but I need a little help to display both of them at the same time:
function h = showface(z,zoo)
% showsurf(Z)
% Draw Lambertian surface
% axes('ActivePositionProperty','position','position',[0 0 1 1]);
cla reset;
[x,y] = meshgrid(1:size(z,2),1:size(z,1))
%h = surface(x,y,flipud(z));
h = surface(fliplr(x),flipud(z),y);
axis on
axis equal
shading flat
view(-160,20)
%colormap white;
colormap hsv
colorbar
li=light('position',[0 1 0]);
lighting('Gouraud');
set(h,'AmbientStrength',0,'DiffuseStrength',1,'LineStyle','none','SpecularStrength',0)
set(gcf,'renderer','zbuffer')
set(gca,'position',[0 0 1 1])
if nargin == 1
zoo = 3;
end
zoom(zoo)

回答 (2 件)

Prashik Shende
Prashik Shende 2020 年 9 月 23 日
You can use pcshowpair insted
pcshowpair(1st_point_cloud, 2nd_pointcloud)

Walter Roberson
Walter Roberson 2011 年 8 月 7 日
Remove the "cla reset" and use "hold on" after displaying the first of them.
You might also want to pass in a parameter that indicates an x or y offset to display the second cloud at. If you do that, you will probably want to revisit your logic about passing in the zoom (e.g., suppose you want an offset but want to default the zoom ?)

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by