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. Installation
Tools used:
Architecture
We have images, and operators that take an image(or several images) as input and return something (hopefully meaningful) as an output.
The error class
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.
Connectivity
Something has to be said on 4, 6, and 8 connectivity and their differences
The library
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
.
TclTk: The scripting interface
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.
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.
Examples
See the section Related Pages for examples of uses of the library.