This is a simple demonstration of the Lucas-Kanade algorithm. It's not very readable, and I'm sorry for it. I never thought it would find its way onto the webs.
Depends on HConLib.
To compile, you need to clone and build HConLib (running build.sh in the root of HConLib is usually sufficient). Then, use the line
g++ lucas_kanade.cpp -I /path/to/HConLib/include/ -L /path/to/HConLib/lib/ -l HCam -l Winval -l HGraf -l FlatAlg -l X11 -std=c++11 -o lucas_kanade -O3
and you should be good