Here is a great tutorial on how to do camera tracking in Blender, using the Voodoo camera tracker. The Voodoo software can estimates camera parameters, like position and rotation and reconstructs a 3d scene from image sequences.
At the tutorial, a virtual object is placed in real footage. Go check out the tutorial here. All credits for the tutorial goes for Sympodius, from the BlenderArtists forums.