Stargate Studios offers a technology called ‘Virtual Backlot’ that incorporates motion tracking, green/blue screens, and compositing techniques that allow you to easily merge principal photography into your video shoots seamlessly.  From their description:

Stargate Studios’ Virtual Backlot™ is a proprietary technology that gives filmmakers unparalleled access to any location through a variety of techniques. These can range from totally immersive sequences shot entirely on green screen to simple set extensions that marry into principal photography.

The common thread between all the variations of the Virtual Backlot™ is that it has been designed as a seamless and unobtrusive addition to the first unit. The goal is to enhance the story as well as solve production issues. Each production has unique challenges and needs and the Stargate Virtual Backlot™ aims to meet those challenges and needs in a creative and cost effective manner.

They’ve posted a video showing how it works, including shots from several shows you’ve probably seen (I recognized Ugly Betty, Monk, and Grey’s Anatomy) that I never would have suspected were edited to such degree.  See the video after the break.

Updated 2/23/2010: The Vimeo video included originally is now password protected.  Replaced with an HD Youtube Equivalent.