%% Video Stabilization
% This example shows how to remove the effect of camera motion from a video stream.
% Copyright 2006-2010 The MathWorks, Inc.
%% Introduction
% In this example we first define the target to track. In this case, it is the
% back of a car and the license plate. We also establish a dynamic search
% region, whose position is determined by the last known target location.
% We then search for the target only within this search region, which
% reduces the number of computations required to find the target. In each
% subsequent video frame, we determine how much the target has moved
% relative to the previous frame. We use this information to remove
% unwanted translational camera motions and generate a stabilized video.
%% Initialization
% Create a System object to read video from a multimedia file. We set the
% output to be of intensity only video.
% Input video file which needs to be stabilized. filename = 'v1.avi';
hVideoSource = vision.VideoFileReader(filename, ...
'ImageColorSpace', 'Intensity',...
'VideoOutputDataType', 'double');
%%
% Create a geometric translator System object used to