port of http://code.google.com/p/gsoc11-opencv-tracking/ to proper OpenCV