%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%顶层函数camshift%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Adam Kukucka
% Zach Clay
% Marcelo Molina
% CSE 486 Project 3
function [ trackmov probmov centers ] = camshift
%用camshift算法跟踪运动物体,跟踪目标须手动选定
% ******************************************************************
% initialize vari ables
% ******************************************************************
rmin = 0; %min row value for search window
rmax = 0; %max row value for search window
cmin = 0; %min col value for search window
cmax = 0; %max col value for search window
numofframes = 0; %number of frames in the avi
threshold = 1; %threshold for convergence
centerold = [0 0]; %for convergence... previous center of window
centernew = [0 0]; %for convergence... new center of window