MediaMath

MediaMath is an environment for image processing, computer vision, robotics etc. It provides facilities for manipulation of most data structures that are generally used in these areas. Its target audience is the research and teaching community in the above areas. The user is assumed to be proficient in programming and comfortable with modern software tools. This user can use the system to implement algorithms in a small fraction of the time needed in plain C. The algorithms that have a mathematical form are particularly well suited for this purpose. This is not however a tool for interactive image editing or of any use to the non-programmer.

MediaMath Functionality

MediaMath is a stand alone interpreter for the MediaMath language. It is capable of general programming but it was designed right from the beginning for image, audio and matrix manipulation. The most important features of the language include:

C syntax
The syntax of the language is very similar to the syntax of C, and it is capable of general programming.
Fully dynamic
Anything can change or be redefined at runtime. In fact everything is defined at runtime by reading a set of files from the default directory when starting up.
Functional programming
MediaMath is a functional programming language like lisp, yet it fully supports imperative style.
Object oriented features
It has object oriented features like multimethods operator overloading etc
Rich set of image, vector and matrix operators
These allow easy implementation of most algorithms in computer vision and related fields. Several vision and robotics algorithms have already been implemented.
Flexible computational model
The programmer can mix the highest level operations with the most primitive ones, or can tinker with the MediaMath engine internals. So the user not familiar with one programming style can use another.
Dynamic linking
New functions written in MediaMath can just be typed in or loaded. New primitives written in C can be linked, unlinked, fixed, recompiled and relinked at run time without any negative side effects. In most cases the system can recover even after severe errors like segmentation violation.
Memory management
The user does not have to worry what happens to large data structures after they cease being useful. The garbage collector will pick them up when they are no longer accessible. Unless the user needs many and big images or matrices on a small computer, freeing is not a concern.
Small runtime size
MediaMath needs about 3MB to start and depending on the number of images used may need more memory.
User interface
There are Emacs utilities that allow one to run MediaMath through emacs and send function definitions and statements across buffers. It also provides on-line help for any function.
Software tools to write and link C programs to MediaMath
These take care of the tedious work like putting functions on the hash table, provide safety features for linking and unlinking etc.
Connectivity
Provides facilities to communicate with other programs, like xv and gnuplot, and libraries, like pbmplus and numerical libraries, either by dynamic linking or by spawning a new process

All these make MediaMath an ideal tool to prototype computer vision and related algorithms of all kinds: flow estimation, structure from motion, image enhancement, robot navigation etc. Algorithms that are expressed in a clear mathematical way can be implemented debugged and optimized in a couple of hours (Arun et al 3-D point fitting, Horn and Schunck optic flow computation, Tsai and Huang structure from motion, Spetsakis and Aloimonos optimal structure from motion etc. None of them took more than an afternoon) In addition MediaMath provides an excellent alternative to raw C programming because it has the same power but is interactive and incremental.

MediaMath as Programming Language

Object System