用途:在 MATLAB 中使用 Lidar Toolbox 的文件 I/O 函数读写三维点云数据,支持 PLY、PCD、LAS/LAZ、Velodyne/Ouster/Hesai 的 PCAP 录包、E57 与 Ibeo IDC。
主要能力:将点云文件载入 pointCloud 对象;将 pointCloud 保存为受支持格式;按扩展名选择合适读写器;对 LAS/LAZ 做 ROI、分类、GPS 时间等筛选读取;读取或保留分类、GPS 时间戳、扫描角等激光雷达属性;逐帧读取 PCAP;按索引读取多扫描 E57;按消息读取 IDC;在地面格式间转换。
必要用法:按扩展名路由。pcread 仅支持 .ply 与 .pcd;.las/.laz 用 lasFileReader + readPointCloud;.pcap 用对应传感器读取器;.e57 用 e57FileReader;.idc 用 ibeoLidarReader + readMessages。PCAP 读取器必须提供设备标识,velodyneFileReader 与 hesaiFileReader 需 DeviceModel,ousterFileReader 需 CalibrationFile,未指定时应询问而非假定默认值。LAS/LAZ 用 [ptCloud, ptAttributes] = readPointCloud(reader) 获取属性;写入时用三参数 writePointCloud(writer, ptCloud, ptAttributes) 保留属性。PCAP 需用 hasFrame/readFrame 循环逐帧读取。
限制:pcread 不能读 LAS/LAZ/PCAP/E57;pcwrite 仅写 PLY 与 PCD,LAS/LAZ 输出用 lasFileWriter + writePointCloud。PLY 仅支持 ascii 与 binary 编码,compressed 仅用于 PCD。属性(分类、GPS 时间戳等)在 lidarPointAttributes 上,Intensity 在 pointCloud 上。lasFileWriter 仅支持非组织化点云。实时传感器流、点云滤波、网格读写、MAT 文件保存和可视化不在本技能范围。