%% Create Image Sequence Source
% Specify the path to a folder containing an image sequence.

imseqFolder = fullfile(toolboxdir('driving'),'drivingdata','roadSequence');

% Load the timestamps corresponding to the sequence

load(fullfile(imseqFolder,'timeStamps.mat'))

% Create an image sequence source. Load the folder path and timestamps into the ImageSequenceSource object.

sourceName = imseqFolder;
sourceParams = struct;
sourceParams.Timestamps = timeStamps;

imseqSource = vision.labeler.loading.ImageSequenceSource;
loadSource(imseqSource,sourceName,sourceParams);

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

signalName = imseqSource.SignalName;
I = readFrame(imseqSource,signalName,1);

figure
imshow(I)

% Copyright 2019 The MathWorks, Inc.