Ask Your Question

Revision history [back]

Looking at the OpenCV docs for this function, it is clearly that it is contained inside the Video Analysis Library.

Basically it is a dense approach for calculating the optical flow between subsequent frames, indicating how movement of pixels is happening. Using the calc function you will create the optical flow map for a sequence of subsequent images, as for the collectGarbage, it basically releases all inner intialization of elements, making sure that two subsequent calculations of the optical flow field, won't interfere with eachother.

Optical flow field can then be used to track objects, based on their movement.

The difference between dense and sparse indexing can be read here.