Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Video Projector Calibration

per edited this page Apr 13, 2013 · 1 revision

Video projector calibration using BLAM

Introduction

This tutorial gives a more detailed description of the procedure outlined in this video. The workflow contains some tedious UI adjustment steps which, as far as I can understand, cannot be automated using the current python API. If you're not familiar with BLAM, you may want to read the user's guide before proceeding.

When doing projector calibration, the basic idea is to set up the Blender camera so that a 3D scene matches a real world scene when projected onto it. For example, if a 3D scene with a cube is projected onto a real world cube and if the Blender camera is properly calibrated, the edges, faces and corners of the Blender cube will be projected onto the corresponding features of the real cube.

Once calibration has been performed and a 3D reconstruction of a scene has been built, it is for example possible to create interactive projection mapping setups using the game engine, including real-time physics and dynamic lighting and shadows.

Below are some examples of what can be achieved with a projector and a calibrated Blender camera.

Performing the calibration

1. Create a placeholder image

Projector calibration is similar to photo based calibration in that the camera parameters are computed based on an image with user defined vanishing lines. However, the starting point is not a photo but an image of what the projector "sees". It doesn't really matter what this image looks like, but the image has to have the same resolution as the projector. Using an image like the one below, where the corners are clearly marked, makes the following step easier.

2. Project the placeholder image

Using the projector as an additional display, open the Movie Clip Editor and duplicate it into a new window (View > Duplicate Area into New Window). Move the new window to the projetor display and enter full screen mode (Window > Toggle Fullscreen). Load the placeholder image created in step 1 and add a grease pencil layer for vanishing line drawing. Before drawing any vanishing lines, make sure the zoom is 1:1 (View > Zoom 1:1) and that all panels are hidden. N and T hides the properties and tools panels. Also make sure to hide the top and bottom bars. As a last step, move the image so that the corners line up with the corners of the projector display.

We're now ready to draw vanishing lines. Make sure the projector position and orientation remain fixed from now on.

3. Draw vanishing lines

Looking at the projection of the placeholder onto the scene, draw grease pencil strokes to indicate vanishing lines in perpendicular directions as usual. The image below shows what this procedure looks like using three vanishing points. Note that many projectors require calibration using three vanishing points, since the principal point is not in the center of the image.

Seen from the projector, the resulting grease pencil strokes look like this:

4. Calibrate the camera and reconstruct the scene

Once the vanishing lines have been drawn, calibrate the Blender camera by pressing Calibrate active camera as usual. The example scene can now be easily reconstructed using extrusion along the x, y and z axes:

The final scene reconstruction looks like this.

Game engine notes

Many projectors have principal points that do not coincide with the center of the image. This calls for the use of three vanishing points and a shift will applied to the principal point of the Blender camera. The game engine does not automatically take this shift into account. See Camera lens shift at the bottom of this Blender wiki page for instructions on how to use Python to properly set the shift (copy the shiftx and shifty values from the calibrated Blender camera).