Lots of resources say that there are two types optical flow algorithms. And Lucas-Kanade is a sparse technique, but I can\'t find the meanings of sparse and dense? Can some one
Sparse optical flow - Lucas-Kanade method computes optical flow for a sparse feature set (e.g. corners detected using Shi-Tomasi algorithm). Dense optical flow - Gunner Farneback's algorithm computes the optical flow for all the points in the frame. This is explained in "Two-Frame Motion Estimation Based on Polynomial Expansion" by Gunner Farneback in 2003.
Example implementation of can be found in opencv docmentation here