Read Velodyne point cloud from file
Read Point Cloud from File Using Time Duration
velodyneFileReader object to read a Velodyne® packet capture (PCAP) file and select specific point clouds using a
Read in point clouds by using a Velodyne® file reader. Specify the PCAP file to read and the Velodyne® device model.
veloReader = velodyneFileReader('lidarData_ConstructionRoad.pcap','HDL32E');
duration scalar that represents one second after the first point cloud reading.
timeDuration = veloReader.StartTime + duration(0,0,1,Format='s');
Read the first point cloud recorded at or after the given time duration.
ptCloudObj = readFrame(veloReader,timeDuration);
Display the point cloud using
veloReader — Velodyne file reader
Velodyne file reader, specified as a
frameNumber — Frame number of desired point cloud in the file
Frame number of the desired point cloud in file, specified as a positive integer. Frame numbers are sequential.
frameTime — Frame time of desired point cloud in file
Frame time of the desired point cloud in the file, specified as a
duration scalar in seconds.
The first frame available at or after
ptCloud — Point cloud
Point cloud, returned as a
pointTimestamps — Timestamps for all points in point cloud
duration vector |
Timestamps for all points in the point cloud, returned as a
duration vector or a matrix.
The function returns timestamps as:
An M-element vector for unorganized point clouds. M is the total number of points in the point cloud.
An M-by-N matrix for organized point clouds. M and N are the number of rows and columns in the organized point cloud, respectively.
These values are between the values of the
EndTime properties of the