Prima Homepage
Generating C++ Modules
User Manual
The Command Shell
Running Imalab
Plugin Process
Pixels and Images
Interactive selection
Graphics: plots, profiles
Image file I/O
Image display
Connectivity Analysis
Image Processing(1)
Gaussian operators
Technical Documentation
Creating New Modules
Tutorial Download



Download information (April 15, '08)

Imalab3_0 is ready for limited distribution.

If you are interested in obtaining a copy you should send us a mail

Imalab is a powerful development environment for complex applications in computer vision. It allows for flexible interactive experimentation with the vision modules developed in the Prima team, and can be dynamically extended with new modules. A versatile scripting mechanism provides for fast and convenient interactive development.

Imalab can be used in several ways: as an interactive system to study image processing and interpretation; as a fast development system by adding new procedures to the existing ones; as application development system, testing algorithms on images, and tying together pieces of processing in control scripts.

Imalab is a collection of modules and scripts: the modules provide general processing functionalities, the scripts give convenient ways to use these functionalities. Modules and scripts are set up within the Ravi kernel system which provides a way to dynamically construct and extend the system in a very general fashion. Ravi is a multi-language kernel: it allows to freely mix code written in C++, Scheme, Prolog, and a production rule system.

The documentation is organized into several sections:

Basic Interface: the Sequence Viewer

In its most basic version, Imalab works as an interactive sequence viewer. You can add your personal image processing procedures as plugins into the viewer.

When starting imalab as a Unix command , you give an image sequence as parameter. The sequence may be given live by a camera, it may be defined by an mpeg-file, or by all image files in a given directory. Imalab opens an X-window, called "imalab screen", and starts executing in "screen mode", displaying the sequence on the screen; you can interact during display to activate all functionalities of imalab. For instance, you can speed up the sequence with the uparrow-key, slow down with the downarrow, activate "step-mode" with the space bar, or enter "command mode" with the q-key. In command mode you type commands in C++ syntax for immediate execution; for instance you can apply various filters to the current image, and display the results.

The sequel of this page explains in more detail the working of the three basic modes:

  • continous mode : continous display of image sequence
  • step mode : visualizing single images on screen
  • command mode : commands typed into the xterm

Screen mode: continous and step

In both screen modes, imalab reacts to a certain number of keyboard keys, typed into the screen window.In particular:

  • The space bar switches back and forth between continuous and step mode
  • q: quit screen mode, go to command mode. The screen is no longer active; commands are typed to your xterm, see 2 paragraphs down.
  • x : exit to Unix, terminating imalab execution; the screen disappears.

The following keys have a specific meaning in each mode: the four arrows, page-up, page-down, mouse-click.

Continuous mode

In continous mode, the images of the sequence are displayed one by one, with a ceretain delay to produce a "movie".

  • left arrow makes the sequence go backward, right arrow makes it go forward again. Pushing an arrow twice makes the display jump to every tenth image, pushing again displays every image. These features depend however on the way images are acquired: you cannot jump forward in live input, and for mpeg input this depends on the cache size/
  • up arrow: speeds up the display, down arrow slows down. These keys affect the variable delai described later.
  • page up, page down no effect.

Step mode

In step mode, the screen displays a "page" of contiguous images of the sequence, depending on the size of the screen (as determined by the "screen" parameter of the imalab command, see also the init-screen command).

In order to view fine details on the screen, yu should use the X-magnifier (Unix command xmag); in fact, you should always have an xmag-window some place.

  • left arrow, right arrow: step backward/forward one image.
  • up arrow, down arrow step backward/forward one row of images.
  • page up, page downstep backward/forward one page of image.
  • mouse click: A circle is traced in the given position, in all images on the screen page.

Command mode - Shell mode

In command mode, nothing happens by its own, as in screen mode: you have to type commands into the imalab xterm. A command roughly is the same as one line in the main procedure of your program, except that it is executed immediately, as in any interactive system.

The command continue puts you back into screen mode. In a typical imalab session, you modify a number of parameters etc. in command mode, then continue to see how it works. In particular, you may rewind the image sequence to play it again, in a different setting.

In command mode, or shell mode, you may type as command any C++ instruction "valid in the current environment" ... so I have to explain to you the imalab environment, with about a hundred classes, 2000 methods, hundreds of functions - well, that's what the documentation is about...

More about shell mode.

Plugins and handles for image processing

With the set-process command you can plug image processing into the sequence viewer. You can also specify this with the -process parameter for the imalab command).

set-process lap;

The following processes are currently known when imalab starts:

To define your own process, you declare its name and associated function:

(declare-process name fp fd [fs])

fp process function
fd display function
step mode function

All these functions have 0 arguments, they control all operations through the global context.

More about plugin scripts

Each process will have its own parameters, that you can modify interactively during your experimentation. Not all processes will support requence reversal!