http://cg.tutsplus.com/tutorials/maxon-cinema-4d/match-your-3d-animation-to-live-action-footage-using-syntheyes-cinema-4d-realflow-and-after-effects/

3d camera matching is simultaneously one of the most widely used and most elusive to learn CG techniques in both the film and advertising industries today. In this video tutorial, we will discuss a comprehensive method for tracking video footage, and eventually exporting it for use in your 3d package of choice.