Automatic Projector Alignment

bulletDescription
bulletHardware
bulletCode Overview
bulletRunning Auto-Alignment

Description:

    A method for automatically aligning the projectors of a tiled displaywall was developed by Yuqun Chen as part of his PhD thesis at Princeton University. Other papers from this work include "Automatic Alignment Of High-Resolution Multi-Projector Displays Using An Un-Calibrated Camera" which appeared in IEEE Visualization 2000.

    The method involves finding point and line correspondences between adjacent computers and using this information to align the projectors relative to each other rather than to a fixed coordinate system. One unique aspect of this approach is that it allows for the use of an uncalibrated camera which can pan around and zoom in on different points of the screen. This allows for the calibration of a very high resolution display by a low resolution camera which is important as resolution scales up.

    Three steps are involved in gathering and using the alignment information. First the camera is used to find line and point correspondences between adjacent screens. Next this data is used as the input to a global minimization problem. Simulated annealing is used to arrive at an alignment solution. Finally the alignment information must be feed to the applications which are using the displaywall so that each computer in the display cluster can do a projective warp on it's final rendered display.

 

Hardware:

    In addition to the displaywall hardware description, this project uses a Cannon VC-C3 camera and the Integral Technologies FlashBus MV frame grabber to capture the point and line correspondence information.

 

Code Overview:

The auto-alignment code has the following components:

Canvas
    canvas.exe is an executable that runs on each of the display cluster nodes. It is an rpc server that accepts and performs commands for displaying lines, dots, colors etc. on the screen. This program is used in conjunction with the camera so that point and line correspondences can be gathered between screens.

Camcontroller
    camcontroller.exe is an rpc server which runs on the console or control computer. It accepts requests to pan, tilt and zoom the camera.

Flash
    flash.exe is an rpc server which runs on the console or control computer. It accepts commands to capture an image and do image processing on the image such as finding a line or point.

Pyscreen
    pyscreen.dll is a python interface which allows for sending rpc commands to the canvas rpc server from within a python script.

Pycam
    pycam.dll is a python interface which allows for sending rpc commands to the camcontroller rpc server from within a python script.

Pyvision
    pyvision.dll is a python interface which allows for sending rpc commands to the flash rpc server from within a python script.

Python Scripts
    There are a group of python files (align.py, measure.py, movecam.py, screens.py etc) in the pyexts directory which form the top level portion of the point and line data gathering application. These python scripts make use of Canvas, Camcontroller and Flash to gather the point and line correspondences and then save this information in a data file.

Sareal
    sareal.exe is the application that takes the point and line data gathered from the python script align.py and does simulated annealing to try to reach a global minimum. It's output is a configuration file which specifies the corner locations of each projector. These corner locations represent which portion of the whole image this projector should render.

Manual
    manual.exe provides an alternate, more manual, method of aligning the projectors. A feedback loop is setup in which the user manipulates the corner specifications of a projector through the use of a GUI in manual.exe. This information is sent to the rpc server in canvas.exe which then adjusts the corners that projector is displaying. If the canvas program is displaying a grid or some pattern, the user can successively improve or adjust the alignment through this procedure.

 

Using the Auto-Alignment Software

Notes: 
    Python must be installed to run the alignment software.
    The release version of Pycam.dll, Pyvision.dll, and Pyscreen.dll must be used.

  1. Edit screens.py changing "wall-1" through "wall-24" to the names and row-column configuration of your display cluster.
  2. Start canvas.exe on the display nodes.
  3. Start camcontroller.exe and flash.exe on the control computer. (the computer that the camera and frame grabber are connected to).
  4. Open a command prompt on the console computer and cd to the align\bin directory.
  5. Run python from the command prompt.
  6. At the python command prompt (">>") run    >>execfile("align.py")
  7. Turn off all room lights and any other lights that may confuse the program (i.e. display monitors the camera can see etc.)
  8. Estimate an average overlap value for your projectors (Number of pixels one projector overlaps another). We'll call this value xoverlapand yoverlap.
  9. From the python prompt run    >>data=measure_wall(screens, xoverlap, yoverlap)
  10. After measure_wall has completed, run    >>save_walldata(data, "filename", screens, 1)
  11. The data collection process is now complete (python will not be used anymore).
  12. Now comes the simulated annealing projection calculation. Run >sareal.exe --r0 --g0 --f datafile --w outputfile --s num_steps
  13. Sareal.exe will produce a configuration file which specifies the virtual corners for each projector. This configuration file can then be used by applications to apply a projective warp.

 

Using align.py

>>helpme()    -provides a list of functions
>>camctrl.zoom(['r'|'a'], zoom)    -zoom relative or absolute compared to last position (-1 thru 1)
>>camctrl.pantilt(['r'|'a'], horz, vert)    -pan or tilt the camera
others...

 

Using sareal.exe

sareal.exe --x displaywall_width --y displaywall_height --r radial_correction --g graphical_interface --t initial_temperature --s num_steps --f datafile --w output_file

radial_correction = [0|1]
graphical_interface = [0|1]

 

Using manual.exe

Start canvas.exe on the display nodes. start manual.exe on the control node. Select "load config file and connect" from the manual.exe menu and choose a config file like those created from sareal.exe. Select "Load Alignment" from the manual.exe menu. Select "Load Pattern" from the menu and choose a pattern like align.pat in the manual directory. Hit 'E' and 'P'. Now the alignment can be adjusted with the following commands.

'E' - enable global correction
'D' - disable global correction
'P' - show a pattern
'I' - show an image
Tab - chooses a projector
Space - chooses a corner
'+'/'-' - zoom projector image
ins/del - rotate projector image
arrow keys - translate projector image


 

 

last edited 04/28/2008