%% Create Video Source
% Create a video source from a video on the MATLAB® search path. Load the source name into the VideoSource object. The video has no source parameters needed to load it, so sourceParams is empty.

sourceName = 'caltech_cordova1.avi';
sourceParams = [];

vidSource = vision.labeler.loading.VideoSource;
loadSource(vidSource,sourceName,sourceParams);

%
% Read the first frame from the video. Display the frame.

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

figure
imshow(I)

% Copyright 2019 The MathWorks, Inc.