This software tool is designed to be used as a learning aid for demonstrating
the effects of different image morphology transformations on binary (black
and white) images.
Images can be loaded into the tool, a structuring element defined or
chosen from the list of predefined ones, and then the chosen transformation
applied. The original and morphed images are displayed at the same time
to visualize the changes that have been made. A third image displayed provides
an interactive view that can be transformed pixel by pixel demonstrating
exactly what the morphology is doing. This interactive view has an automatic
zoom to show the individual pixels.
An online help facility provides explanation of all the transformations
as well as guiding the user around the tool. This can be disabled if not
Two versions of the tool are available. The first may be used directly
from this page. This restricted version allows you to load images from
a choice of five.
The second version can be downloaded from this page onto your own system
where you will be able to load in any of your own images.
The main features of the tool include:
Defining your own structuring elements.
Applying a morphological transformation from a list of many including finding
the homotopic and non-homotopic skeletons.
Animation of the sequential thinning and thickening transformations.
Manual application of the basic transformations (erosion, dilation, opening
to demonstrate the effect of your structuring
element locally in the image
Replacement of the original image with the transformed one so that another
transformation can be applied
to study the results of combining different transformations.
Comparison by subtraction of the original image with the transformed one.
This version can be used directly on the web by clicking the button below.
It will allow you to choose from a small number of images to manipulate.
Sometimes the processing may take a little time, so give the program
This applet will only run under Java 1.1 enabled browsers.
This version must be downloaded from this page onto your own system. The
only differences here with
version 1 are that you can load any of your own images and it also
runs slightly faster.
Your system must have java 1.1 installed.
Download the file. Then:
Uncompress with "gunzip morph.tar.gz"
followed by "tar -xf morph.tar.gz" Then run with
"java morph" Download the gzipped Tool
Select the .gif or .jpeg file you would like to process (if the file is
not binary then the program will not load it)
Defining a structuring element
Choose the size of the grid in the top right of the window
Click 'Move Origin' and then click on the square you want the elements
representative point to be (the red cross will now occupy this square).
Now fill in the element by clicking on the squares. A white square represents
a 0, clicking once will turn a square blue representing a 1 and clicking
again will turn it grey meaning it is not used in the transformation (a
'don't care'). Clicking more times simply cycles back to through the values.
The element is now defined.
Applying a simple transformation
>From the Morph menu choose a simple transformation (e.g. 'Erode').
The transformed image is now displayed in the rightmost image.
Applying a more complex sequential transformation
The sequential thinning and thickening operation require the use of a predefined
Click 'User defined/Golay structuring element' button in the usergrid area
to toggle to the predefined element list.
Choose an element (e.g. L, info on the uses of the different elements can
be found by clicking on 'More Info').
>From the Morph menu choose a sequential transformation (e.g. 'Seq Thin').
Choose the number of iterations or click the tick box to allow the program
to continue until convergence occurs.
Click apply. If the 'Anim on' option is choosen under the Options menu
then the rightmost image will be updated with every iteration.
Locally applying a transformation
Choose the required transformation from the checkboxes below the interactive
view (erode, dilate, open or close).
Move the mouse pointer over the interactive view and the zoom view will
appear. The red box on the zoom view represents the structuring element
and clicking once will apply it.
The program will automatically scale in input image so images of any size
can be used.
It will automatically detect if an image is not binary and not load it
if it is not.
The sequential transformations are fairly computationally expensive so
some of them may take quite a long time (depending on the size of the mask,