Main Page Modules Class Hierarchy Compound List File List Compound Members Related Pages
OpenMorpho: An Open Source Mathematical Morphology toolbox
1.0
Introduction
Mathematical morpholology is an image analysis method, based on interpreting images as sets. For a more extended description, look at Pierre Soille's book, or wait until one is here!
The description here is rather rough, and need to be polished.
Tools used:
- SWIG, for generating the Tcl interface.
- doxygen, for generating the documentation
Library overview
Overview.
OO is not really useful in image processing per se. Indeed, the two main features of OO: encapsulation and heritage are something that you want to bypass for speed reasons. OO here is used where it is needed: it used for the error management and for writing high-level image operators (see The library).
We have images, and operators that take an image(or several images) as input and return something (hopefully meaningful) as an output.
The CError class is a base class for every operator in the library. It allows to set an error, and the end user can check this error. The image
An image is a block of memory. Each pixel is an int
. The image memory is allocated with a band of pixels around it, which are used to ease the implementation of border effects.
Something has to be said on 4, 6, and 8 connectivity and their differences
Each class is a simple container for operators on images. The class CMorpho
is a virtual class, which implements only high-level functionnality. For example, the dilation of size n is implemented by n calls to the base dilation (of size 1). The size 1 dilation is not implemented in CMorpho
, as it depends on the connectivity. It is thus implemented in CMorpho4c
, CMorpho6c
, and CMorpho8c
.
It is now well known that object-oriented technology alone is not enough to ensure that the system we want to develop is flexible and adaptable. Scripting languages go a step further than object oriented framework, as they integrate concept for component-based application development. As it is written by Ousterhout, scripting languages assume that there already exists a collection of useful components written in other languages. Scripting languages aren't intended for writing applications from scratch; they are intended primarily for plugging together components. They thus tend to make architecture of applications much more explicit than object-oriented framework.
- Scripting languages are extensible: this means that new abstractions can easily be added to the language, encouraging the integration of legacy code.
- They are embeddable, which means that they offer a flexible way to adapt and extend applications. The composition of components using a script leads to a reusable component. Therefore, components and scripts can be considered as a kind of component algebra.
- Scripting languages support a specific architectural style of composing components, namely the pipe and filter style supported by UNIX shells. This is a good prototyping architecture, well adapted to image processing.
We have scripted the library using SWIG. The result is simple to use.
Two functions are useful for TclTk: TransferToPhoto and TransferFromPhoto. These functions transfer to and from the photo image of Tk, with a colormap if needed. They are available at compile time if USE_TK_STUBS is defined.
See the section Related Pages for examples of uses of the library.
Generated at Sun May 12 19:04:21 2002 for OpenMorpho by
1.2.0 written by Dimitri van Heesch,
© 1997-2000