Turned lucas-kanade analysis into a class to get rid of global variables.