1 function varargout = cvcalcopticalflowpyrlk(varargin)
\r
2 %CVCALCOPTICALFLOWPYRLK Calculate optical flow between two images for certain set of points.
\r
3 % [featuresB, error] = cvCalcOpticalFlowPyrLK(IMAGE imgA, IMAGE imgB,
\r
4 % featuresA, guessFeaturesB,
\r
5 % winSize, level, [maxIter epsilon]);
\r
8 % imgB - second frame
\r
9 % featuresA - [n][2] array of feature points on the first frame
\r
10 % guessFeaturesB - [n][2] initial guessess about newfeatures' locations.
\r
12 % winSize - [width height] size of search window
\r
13 % level - maximal pyramid level number
\r
14 % [maxIter epsilon] - specify when to stop search process.
\r
15 % One of them may be 0.
\r
17 % featuresB - calculated feature points positions.
\r
18 % Coordinates of points for which flow was not found are [NaN NaN]
\r
19 % error - array of differences between
\r
20 % patches around the original and moved points
\r
23 error 'Invalid number of parameters';
\r
33 error 'Too many output parameters'
\r
37 varargout{idx} = [];
\r
40 [varargout{1:2}] = feval('cvwrap', 'CalcOpticalFlowPyrLK', varargin{:});
\r