rotating an object with opticalflow

Hi there,

I am rather new to C++ and am beginning to play with manipulating objects using the Lucas Kanade technique. I am having some success with pushing objects around but unfortunately I cannot figure out how to go about rotating them properly.

Does anyone have any pointers or tips they would like to share?

Many thanks,