Doo Interactive · iPIX · 2002 · Case study

Harry Potter, dewarped

A film set inside a fisheye circle

2002: fisheye footage from the set of Harry Potter and the Chamber of Secrets, dewarped frame by frame with my own algorithm, for the film’s DVD, through iPIX.

In the summer of 2002 a job came to us through iPIX, the American company behind the immersive photography we had used since Biron. The footage had been shot with a fisheye lens on the set of Harry Potter and the Chamber of Secrets, for the film’s DVD.

A fisheye circle is not something you can watch as it is. My job was to turn it into a normal, navigable view, frame by frame, with a dewarping algorithm I had written myself. Twenty years after iPIX closed its doors, the frames were still on my drive.

Fisheye, as filmedDewarped, as viewed

One shot from the Chamber set, 2002. Left, the frames as they came off the camera; right, the same frames dewarped and panned the way a viewer would look around. Rebuilt in 2026 from the original files.

1,068

frames in this single shot

11 June 2002

on set, take 7

Aug 2002

dewarped at Doo Interactive

The clapperboard

Potter 2, the DVD

The first frame of the shot still carries the slate: “Potter 2 – The DVD”, Warner, slate C4-5, take 7, 11 June 2002. Behind it is the Chamber itself: the stone walkway, the serpent heads rising from the water, the round opening in the ceiling.

Frame 1: the slate, inside the fisheye circle.
Frame 1: the slate, inside the fisheye circle.
Frame 100, dewarped: the walkway and the serpent heads as a normal view.
Frame 100, dewarped: the walkway and the serpent heads as a normal view.
The algorithm

Undoing the fisheye

A fisheye lens squeezes half a sphere of space into a circle: straight lines bend, and the edges are compressed. Dewarping runs the lens backwards. In 2002 there was no GPU to help and no library to call: every pixel of every output frame was computed on the processor, with code I wrote for the job.

STEP 1
Find the circle
Locate the centre and radius of the fisheye image in the frame. Every frame of a shot shares them.
STEP 2
Trace back
For each pixel of the flat output view, compute its direction in space, then its angle from the lens axis.
STEP 3
Map to the circle
That angle gives a distance from the centre of the fisheye circle; the direction gives the position around it.
STEP 4
Sample and repeat
Read the colour there, interpolate between neighbours, and do it again for every pixel of every frame.
The iPIX years

From space robots to Hogwarts

iPIX came out of a NASA-funded project to guide robots with fisheye cameras. By 1998 it sold immersive photography to the world, and Doo Interactive was one of its partners in France: Biron and Lascaux in 1998, the nuclear sites in 1999, Accor from 2000. This job was the strangest of them all. iPIX went bankrupt in 2006, and its patents were sold the following year.

Credits

Doo Interactive for iPIX (Internet Pictures Corporation), 2002. Dewarping algorithm and processing: Stéphane Jacob.
Harry Potter and the Chamber of Secrets © Warner Bros. Shown here as a record of the work.