Implementation of Lucas-Kanade optical flow algorithm.