MATLAB点云工具箱函数(pcmerge)

clc;clear;
% 读取点云A和点云B
ptCloudA = pcread('.\test\pig1.pcd');
ptCloudB = pcread('.\test\pig2.pcd');
% 显示点云A和点云B
figure
subplot(121)
pcshow(ptCloudA)
title('点云A')
view(2)
subplot(122)
pcshow(ptCloudB)
title('点云B')
view(2)
hold on
% 合并两个点云,并进行体素下采样
ptCloudOut = pcmerge(ptCloudA, ptCloudB, 0.001);
figure
pcshow(ptCloudOut);
title('合并后的点云')

你可能感兴趣的:(matlab,matlab)