你好
起初是我在尝试用matlab进行点云数据拼接,结果它报了错:
代码是:
19 %进行点云数据的预处理:
20 %导入含有噪声的点云数据
21 noisy_pc=pointCloud('Image_Cloud_20260121_17_13_14_668.ply');
22 pcshow(noisy_pc)
23 %pcd_downsampled = pcdownsample(noisy_pc, 'random', 0.1);
24 % 应用高斯滤波进行去噪
25 filtered_pc=pcdenoise(noisy_pc);
运行信息是:
2026-01-24 20:16:37.444s | S : POINTCLOUD > IMPORT
+0.022s | I : POINTCLOUD > IMPORT : Point cloud label = 'Image_Cloud_20260121_17_13_14_668.ply'
2026-01-24 20:16:37.579s | S : POINTCLOUD > IMPORT > READ DATA
+8.888s | E : POINTCLOUD > IMPORT > READ DATA
+9.024s | E : POINTCLOUD > IMPORT
2026-01-24 20:16:46.585s | S : POINTCLOUD > INFO
+0.006s | I : POINTCLOUD > INFO : Point cloud label = 'Image_Cloud_20260121_17_13_14_668.ply'
| V : 2290000 = number of points
| V : 2290000 = number of activated points
| V : 0 = number of deactivated points
| V : -27.787 = min / x
| V : 21.221 = max / x
| V : -54.912 = min / y
| V : 0.000 = max / y
| V : -35.586 = min / z
| V : 38.366 = max / z
+0.077s | E : POINTCLOUD > INFO
报错信息是:
未识别类 'pointCloud' 的方法、属性或字段 'Location'。
出错 pointclouds.internal.pcui.validateAndParseInputsXYZC (第 14 行)
xyzPoints = ptCloud.Location;
出错 pcshow>validateAndParseInputs (第 71 行)
[X, Y, Z, C, map, ptCloud] = pointclouds.internal.pcui.validateAndParseInputsXYZC(mfilename, varargin{1});
出错 pcshow (第 5 行)
[X, Y, Z, C, map, ptCloud, params] = validateAndParseInputs(varargin{:});
出错 Left_Group_2 (第 22 行)
pcshow(noisy_pc)
然后我就尝试去用最简单的代码去排除错误,我直接进入了这篇官方文档,尝试去运行示例文件,结果它竟然也报了错:
Read Point Cloud from a PLY File
代码是:
ptCloud = pcread('teapot.ply');
pcshow(ptCloud);
运行信息是:
2026-01-24 17:27:59.529s | S : POINTCLOUD > IMPORT
+0.051s | I : POINTCLOUD > IMPORT : Point cloud label = 'noLabel'
2026-01-24 17:27:59.608s | S : POINTCLOUD > IMPORT > READ DATA
+0.017s | E : POINTCLOUD > IMPORT > READ DATA
+0.098s | E : POINTCLOUD > IMPORT
2026-01-24 17:27:59.631s | S : POINTCLOUD > INFO
+0.001s | I : POINTCLOUD > INFO : Point cloud label = 'noLabel'
| V : 41472 = number of points
| V : 41472 = number of activated points
| V : 0 = number of deactivated points
| V : -3.000 = min / x
| V : 3.434 = max / x
| V : -2.000 = min / y
| V : 2.000 = max / y
| V : 0.000 = min / z
| V : 3.150 = max / z
+0.010s | E : POINTCLOUD > INFO
错误信息是:
未识别类 'pointCloud' 的方法、属性或字段 'Location'。
rowColContextMenu = rowColContextMenu && (~isempty(ptCloud) && ~ismatrix(ptCloud.Location));
pointclouds.internal.pcui.updateColorContextMenu(hFigure);
initContextMenu(hFigure, hui);
registerCallbacks(hFigure,scatterObj,vertAxis,vertAxisDir,ptCloudThreshold);
pointclouds.internal.pcui.initializePCSceneControl(hFigure, currentAxes,...