%% Create Point Cloud Sequence Source
% Specify the path to a folder containing a point cloud sequence.

pcSeqFolder = fullfile(toolboxdir('driving'),'drivingdata',...
    'lidarSequence');

% Load the timestamps that correspond to the sequence.

load(fullfile(pcSeqFolder,'timestamps.mat'));

% Create a point cloud sequence source. Load the folder path and timestamps into the PointCloudSequenceSource object.

sourceName = pcSeqFolder;
sourceParams = struct;
sourceParams.Timestamps = timestamps;

pcseqSource = vision.labeler.loading.PointCloudSequenceSource;
loadSource(pcseqSource,sourceName,sourceParams);

% Read the first frame in the sequence. Display the frame.

signalName = pcseqSource.SignalName;
pc = readFrame(pcseqSource,signalName,1);

figure
pcshow(pc)

% Copyright 2019 The MathWorks, Inc.