The tracking context has a member called sequentialMode which,
when set to
causes KLTTrackFeatures() to store the gradients of the second image,
along with its smoothed version, into the tracking context.
When KLTTrackFeatures() is called, it ignores its second parameter and
replaces it with the previously stored image (except for the first
time the function is called, in which case it must use both images);
in the same way, KLTReplaceLostFeatures() also ignores its second parameter.
The computation is identical, but the speed is improved.
WARNING: If it is desired to turn the sequential mode off after
it has been set
and KLTTrackFeatures() has been called, do NOT simply set
FALSE. You must call
KLTStopSequentialMode(), which deletes the images.
Otherwise, the next call to
KLTTrackFeatures() will use the previously computed images,
even though they are no longer valid.
Sample code demonstrating the use of the sequential mode is delayed until the next chapter.