3D tracking
March 11 2008
Wikipedia: match moving is a special effects technology to allow the insertion of virtual objects into real footage with the correct position, scale, orientation and motion in relation to the photographed objects in the scene.
So basically you make a 3d object, which you can import to video.
These programs are free, there are more but they are expensive.
Icarus for OSX and Windows
Voodoo for Windows
Tracking 2D images to video you can do in After Effects.