필터 지우기
필터 지우기

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 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