How might I display two pointclouds in one plot?

9 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Point Cloud Processing 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by