Filter löschen
Filter löschen

How might I display two pointclouds in one plot?

12 Ansichten (letzte 30 Tage)
Dylan
Dylan am 7 Aug. 2011
Beantwortet: Prashik Shende am 23 Sep. 2020
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)

Antworten (2)

Prashik Shende
Prashik Shende am 23 Sep. 2020
You can use pcshowpair insted
pcshowpair(1st_point_cloud, 2nd_pointcloud)

Walter Roberson
Walter Roberson am 7 Aug. 2011
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 ?)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by