Dense optical flow algorithm to track visual features in the input video