I want to create a simple program that could calculate transformation of camera based on recorded video. The idea is that I could put some picture on top of the video and transformation of the picture will be matching the image in the video.
I was looking at optical flow, but then can not figure out how to calculate transformations (translate, scale, rotation) based on the results.
What would be the best way of doing it?