Est. c. 1988 Intermediate

Lambda (DIAS)

LAMBDA, the built-in command and programming language of DIAS, the interactive image-processing system developed by Klaus Voss's Digital Image Processing Group at Friedrich Schiller University Jena

Created by Klaus Voss and the Digital Image Processing Group (Lehrstuhl Digitale Bildverarbeitung), Friedrich Schiller University Jena

Paradigm Procedural, domain-specific (image processing and analysis)
Typing Implicit; integer, floating-point, complex and string modes selected by a prefix character, with variables needing almost no declarations
First Appeared c. 1988 (DIAS was used for Jena image-processing teaching from the 1987/88 lecture and autumn 1988 lab course; the system claims predecessor versions back to 1975; the catalogue year 1985 is unconfirmed)
Latest Version DIAS 5.1 (Windows and Linux builds, 2003)

LAMBDA is the programming language built into DIAS, an interactive system for digital image processing and analysis. DIAS was developed by the Digital Image Processing Group (Lehrstuhl Digitale Bildverarbeitung) of Friedrich Schiller University Jena, led by Klaus Voss. Despite its name, LAMBDA has nothing to do with the lambda calculus. It is a compact, procedural command language. A line typed at the DIAS> prompt is compiled and run immediately, and the same instructions can be saved as a program. Its data types are images, contours, histograms, classifiers and geometric transformations. Its most unusual feature is the way arithmetic is written. Every calculation runs left to right through a hidden accumulator, a prefix character selects integer, floating-point, complex or string arithmetic, and the result is stored with =name at the end. DIAS was the teaching tool for image processing at Jena from the late 1980s to the early 2000s. It ran on East German Robotron PCs, then on MS-DOS, Windows and Linux.

History & Origins

An image-processing group in Jena

According to the lab manual the Jena group published in 2000, DIAS “together with its predecessor versions” had been in development and practical use since 1975. The group’s web pages from 1996 to 2000 make a similar claim: DIAS brought together “20 years of experience in research, teaching and application” in digital image processing. Klaus Voss led the chair. Wolfgang Ortmann maintained the DIAS web pages and listed DIAS among the image-processing software he developed. The surviving sources do not say who designed LAMBDA itself, or why it is called LAMBDA.

The earliest firmly dated uses of DIAS come from teaching. The lecture “Grundlagen der Digitalen Bildverarbeitung” (Foundations of Digital Image Processing) began at Jena in the 1987/88 academic year. The lecturers soon decided that students needed hands-on exercises. The first lab course ran in the autumn semester of 1988, in a room of Robotron A7100 personal computers, a 16-bit East German PC. Klaus Voss wrote the first version of the lab guide in 1989. From 1990 the course ran on IBM-compatible PCs, where DIAS drew images on standard VGA graphics, so no special image-processing hardware was needed.

This page uses c. 1988 for LAMBDA’s year, the date of the first lab course that used DIAS. The encyclopedia catalogue gives 1985, but no source found for this page confirms that year. The predecessor systems of DIAS date back to 1975, according to the group itself, but it is not documented when the language took its LAMBDA form or name.

The textbook and the 1990s

In 1991 Voss and Herbert Süße published Praktische Bildverarbeitung (Carl Hanser Verlag, Munich), a textbook built around DIAS version 3.1. Its first chapter covers DIAS as a dialog system (basic, editor, file and help commands, and interrupts) and as a programming system (instructions; integer, floating-point and string arithmetic; control structures; subroutines; system procedures). The rest of the book works through image processing, image analysis, data analysis and image synthesis, and ends with a list of procedures and a list of programs. From the 1991/92 academic year the book and the lab guide were the Jena course materials.

By January 1996 the group had put DIAS pages on its web server, pandora.inf.uni-jena.de. At that time DIAS ran under MS-DOS on a 386 or better with VGA and at least 2 MB of RAM (8 MB recommended), and it supported several frame grabbers for camera input. It was sold through TOWER_SOFT Gesellschaft für Bildverarbeitung in Berlin. A free MS-DOS demo version followed in October 1997.

Windows and Linux

Work on a full 32-bit version for Windows 95 and Windows NT began in 1997. By late 1999 the group was selling DIAS for Windows 95/98/NT for 630 DM (322 euros), or 150 DM for students. It also offered a version for Linux on Intel-compatible PCs with X11, with a simpler interface, for 470 DM, or 90 DM for students. The group also offered a “Web DIAS” that people could try in a browser. The last builds preserved in public archives are DIAS 5.1: a Windows package dated September 2003, and a Linux executable built with GCC 2.95.3 on SuSE Linux. The Windows installer registered .amb files as “Lambda Document”, so double-clicking a LAMBDA program opened it in DIAS.

Design Philosophy

The group described DIAS as “not only a collection of library functions, but a development system with its own special-purpose language and the typical control and data structures of image processing”. Their stated goals were:

  • Interactivity. Every command typed at the prompt is a LAMBDA command line, compiled and executed at once. A whole program uses the same language, so a sequence tried interactively can be pasted into a program unchanged.
  • Short turnaround. One environment covered command entry, editing, debugging, compiling, linking, running a program and talking to the operating system, so the user never had to switch to another tool.
  • Low hardware requirements. DIAS used only the PC’s own graphics, so a whole class could work on the ordinary PCs found in any university computer room.
  • Little typing. LAMBDA needs, “apart from very few exceptions”, no declarations, which the lab manual explains as a way to keep programs short and to make program lines and interactive command lines interchangeable.

Key Features

Instructions

The lab manual sorts LAMBDA instructions into six groups: comments, declarations, label definitions, conditional jumps, arithmetic assignments and procedure calls. Instructions are separated by a semicolon or a line end. A comment starts with / and runs to the next semicolon or the end of the line, so a comment can follow a statement on the same line. A comment starting with // always runs to the end of the line. Labels are written $name.

This example from the manual inverts every unmarked pixel in the current window:

1
2
3
4
5
/Invertierung unmarkierter Bildpunkte im aktuellen Fenster
WLOOP BILD X Y ;/ Fensterschleife
IFN [X,Y]=0 ENDE ;/ Markierungstest
+63-(X,Y)=(X,Y) ;/ Grauwertinvertierung
$ENDE; END BILD ;/ Ende der Schleife

WLOOP is a loop over every pixel of a rectangular window, with X and Y as its counters. (X,Y) is the grey value of a pixel, and [X,Y] is its value in a separate “marking” image that DIAS displays as an overlay. IFN [X,Y]=0 ENDE jumps to the label ENDE if the pixel’s marking is not zero. X and Y are never declared.

Accumulator arithmetic

LAMBDA’s arithmetic does not use the usual variable = expression form. An assignment starts with a sign, applies a series of operations to an internal accumulator, and ends with =target:

1
+3*zahl-5=zahl

This puts 3 in the integer accumulator, multiplies it by zahl, subtracts 5 and stores the result back in zahl. Operations are applied in the order they are written, so +a+b/4 means (a + b) / 4. Operators that take one operand are written after the value they apply to: +{x*x} + {y*y} sqrt = z computes the square root of x² + y². Curly braces turn a sub-expression into a single operand, and they can go anywhere a constant or variable can. If no target is given, the value is printed.

LAMBDA has four accumulators, one for each kind of value, and a prefix character selects which one an assignment uses:

PrefixModeExample from the manual
' or a bare signinteger (32-bit)+3*zahl-5=zahl
"floating point (8-byte)"+a-b=diff
°complex°<5,-7.5>=KOMPLEX
^string^+^Ziffern ^+FOLGE=FOLGE

The same characters also convert within an expression. In +A*3"+B-5=C, A*3 is computed as an integer, the result is converted to floating point, and the rest of the expression and the target C are floating point. String constants are delimited by ^, not by quotes. All angle functions work in degrees. Integer arithmetic has its own versions that scale the result by 1000, for example sin, which gives 1000·sin.

A variable’s type comes from how it is used, and each type has its own namespace. The manual points out that in OUT I J; FOUT I F1; CMPLOUT I; SOUT I S ^Text^ there are four different variables called I: an integer, a float, a complex and a string.

Besides named variables, integer operands can be registers in a global register array (#n), single bytes of a register (#n(i)), grey values (X,Y) or (X,Y,Z), and marking values [X,Y]. All of these can also be targets, so writing a pixel is just an assignment such as =(x,y).

Control structures

LAMBDA keeps the jump-based style of early command languages and adds block structures on top:

  • JMP label is an unconditional jump. IF condition label and IFN condition label are conditional jumps.
  • IF ... THEN ... ELSE ... ENDIF is the block form. Floating-point and string comparisons are marked with " or ^ after the IF.
  • LOOP name var from to [step] ... END name is a counted loop with a named end.
  • FOR var from to [step] ... ENDFOR is a counted loop without a label.
  • WLOOP name x y ... END name is the double loop over a window of pixels described above.

Procedures

User procedures are declared with PROCEDURE name params ... ENDP and have local variables. Each formal parameter carries a mode character for its type and a direction marker: > for input, < for output and @ for input/output.

1
PROCEDURE mittelwert ">A ">B "<MEAN

From the Windows versions onwards a procedure can call itself. Procedures that call each other recursively must be declared with DECLARE PROCEDURE name ... : RECURSIVE. INCLUDE file pulls a library of procedures in at compile time. The older DOS mechanism, CALL ^PROG1^, loaded and compiled a separate program file at run time. It was dropped in version 5.0.

Image-processing data structures

The built-in procedures are where DIAS’s image-processing work happens. The group’s data-structures page lists:

  • images: n × m matrices of non-negative integers, each paired with a marking overlay
  • 3D vectors, and matrices that also serve as homogeneous lists
  • contours: open or closed chains of neighbouring pixels, from which geometric features are computed
  • 2D and 3D transformations: translations, rotations, scalings, affine and projective maps, which can be inverted and chained
  • statistics, regression, function and variance domains: accumulators that collect values and then report results such as the mean and standard deviation
  • histograms: INITH, VALH, GRAYH, TABH, VISH, and the Kolmogorov–Smirnov test KTST
  • classifiers: linear, parallelepiped, minimum-distance and hierarchical, trained with CLLEARN, applied with CLCLASS and saved with CLSAVE
  • linear filters: applied with LSI, designed with LSIDESIGN, inverted with LSIINV and chained with LSICONV

The group’s sample program measures a circular object. It finds the object, follows its contour, fits an ellipse, and reports the mean radius and the difference of the axes as an error measure:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SCAN 1;               / scanning in image 1
+5=d;                 / search line distance
+31=p;                / object threshold
START 1 1 d p x y;    / search start point beginning with point (1,1)
CONTUR x y 31;        / calculate contur of circle
EFEATR a b xm ym phi; / fitted ellipse parameter
"+a+b/4=radius;       / radius as half of the mean value of the axis
"+a-b=diff;           / difference of the axis as a measure for the error
FPRN RADIUS;          / output of the result
FPRN DIFF

The environment

DIAS opens three windows: a graphics window that always shows the current images, a shell window for commands and text output, and an editor for programs. The most frequent commands are single letters: G runs the compiled program and X quits. Ctrl+A aborts a long operation. Ctrl+T sets a trace flag, so the program stops at its next label and drops into a trace dialog, which DIAS calls the “Tialog”. There the user can inspect and change variables, step from label to label with G, or continue normally with NRM. The Windows editor has a “traffic light” button: green means the program compiled cleanly, yellow means it compiled with warnings, and red means it failed with an error. The Linux version can run as a server (dias -s), so that Emacs’s compile command can send a program to DIAS with dias -c program and jump to compiler errors.

Evolution

The available sources document these stages:

Version or platformEvidence
Predecessor systems, from 1975Claimed in the 2000 lab manual; no details survive
DIAS on Robotron A7100 PCsFirst Jena lab course, autumn 1988
DIAS 3.1, MS-DOSDescribed in the 1991 textbook
MS-DOS with VGA and frame grabbersWeb pages 1996-1997; free demo October 1997
32-bit Windows 95/NT (5.x)Development from 1997; user handbook version 5.0
Linux/X11 (i386)Offered from 1999; 5.1 build in 2003
DIAS 5.1Windows and Linux packages, 2002-2003

Over these versions LAMBDA gained recursive procedures (Windows versions only) and lost run-time-loaded external programs (from version 5.0). The 5.1 example file Example.amb draws a Mandelbrot set (“Apfelmann”) and prints “Geschrieben in LAMBDA” (“written in LAMBDA”). It uses // comments and a procedure ... endp block alongside $label jumps.

Current Relevance

DIAS and LAMBDA are historical. The group’s server, which hosted the documentation, the Web DIAS and the downloads, no longer responds. What survives is in the Internet Archive: the web pages, the 80-page lab manual and DIAS 5.1 packages for Windows and Linux. The newest of these was built in 2003. The language reached a wider audience once, when Oliver Storch submitted a LAMBDA version of “99 Bottles of Beer” to the 99-bottles-of-beer.net collection in 2007. According to the comment at the top of the program, he wrote it in 2006 while learning the language for a pattern-recognition seminar. It opens:

1
2
3
4
+99=x
loop countdown n 1 99
	IF x<2 THEN
		PLF 1; OUT x; SOUT ^bottle of beer on the wall,|10|^

There is no Docker image, no open-source implementation and no maintained distribution.

Why It Matters

LAMBDA is an example of a language that grew inside a university research tool rather than being designed as a language first. Its accumulator arithmetic, mode prefixes and label-based loops look odd today. They made sense for a system whose main job was letting a researcher or student type GRAYH, look at the histogram, adjust a threshold and try again, with each attempt compiled and run immediately. Its built-in types are the objects image analysts work with: images with overlays, contours, histograms, classifiers and transformations. Few general-purpose languages have offered these as built-in types. DIAS is also a record of image-processing teaching that ran across the end of the GDR and German reunification. It started on Robotron PCs in 1988, moved to IBM-compatible PCs in 1990, gained a textbook from a Munich publisher in 1991, and continued on Windows and Linux into the 2000s.

Timeline

1975
Work begins on the predecessor versions of DIAS, according to the group's later lab manual, which describes DIAS as in development and practical use 'together with its predecessor versions' since 1975
1988
Friedrich Schiller University Jena holds its first image-processing lab course in the autumn semester, in a room of Robotron A7100 personal computers, following the lecture 'Grundlagen der Digitalen Bildverarbeitung' that began in 1987/88
1990
The Jena lab course moves to IBM-compatible PCs, where DIAS uses VGA graphics so that no special image-processing hardware is needed
1991
Klaus Voss and Herbert Süße publish the textbook Praktische Bildverarbeitung (Carl Hanser Verlag, Munich), built around DIAS version 3.1 and its dialog and programming system
1996
The group's web pages describe 'the programming language LAMBDA of the system DIAS' and its image-processing data structures; DIAS for MS-DOS is sold through TOWER_SOFT Gesellschaft für Bildverarbeitung in Berlin
1997
Development of DIAS as a full 32-bit application for Windows 95 and Windows NT begins, and a free MS-DOS demo version is published on the group's server
1999
DIAS is offered for Windows 95/98/NT and for Linux (i386) with X11, in standard and discounted student editions
2003
The last builds preserved in public archives appear: DIAS 5.1 for Windows (September 2003) and for Linux, with help files in German, English and Spanish

Notable Uses & Legacy

Image-processing lab course at FSU Jena

From autumn 1988 DIAS and LAMBDA were the software for the university's image-processing lab course, first on Robotron A7100 PCs and from 1990 on ordinary IBM-compatible PCs; the lab guide was revised by successive students from 1989 to 2000

Praktische Bildverarbeitung (1991 textbook)

Voss and Süße's textbook teaches image processing, image analysis, data analysis and image synthesis through DIAS 3.1, with chapters on DIAS as a dialog system and as a programming system, and an appendix listing its procedures

Robot grasp planning research

The group used DIAS to recognise a workpiece and reconstruct its 3D pose for robot grasp planning: it detected edges, extracted line segments, built a graph and matched that graph against CAD data

Research institutes in Germany and Mexico

According to the Jena group, institutes in Germany and Mexico used DIAS for biomedical imaging, quality control, contact-free measurement, 3D reconstruction and character recognition; the Windows version shipped with Spanish as well as German and English help

Running Today

Run examples using the official Docker image:

docker pull
Last updated: