%% Create Ground Truth Data Source from Video File
% Create a data source from a video.

videoName = 'caltech_cordova1.avi';
dataSource = groundTruthDataSource(videoName)

%
% Create a VideoReader object to read frames.

reader = VideoReader(videoName);

%
% Read and display the fifth frame in the video.

timeStamp = seconds(dataSource.TimeStamps(5));
reader.CurrentTime = timeStamp;
I = readFrame(reader);

figure
imshow(I)

% Copyright 2012 The MathWorks, Inc.