st take a smaller background average using all the frames of</span>
0056 <span class="comment">% interest.</span>
0057 <span class="keyword">if</span> (NBackFrames &gt;= NFrames)
0058     NBackFrames = NFrames;
0059 <span class="keyword">end</span>
0060 
0061 <span class="comment">%initialize some variables</span>
0062 x = [];
0063 y = [];
0064 orientUHP=[];
0065 orientLHP=[];
0066 
0067 <span class="comment">%load in video object using videoReader</span>
0068 video = videoReader(filename);
0069 info = geti