Back in 2007, one Johnny Chung Lee made a popular video demonstrating how to use head tracking to create a virtual window. He used a Wiimote and Sensor Bar to track the position of his head:
Similar schemes had been used previously - for example, on The Amazing Adventures of Spider-Man ride at Universal Florida, built in 1999. The Spider-Man ride doesn't need head tracking, though - instead, the motion of the ride vehicles is simply synced to the video:
Here are a couple more examples of virtual window effects created with head tracking from YouTube: