67
3. Implementation
Alexander Is written mainly in the local
Archimedes “dialect" of the widely used Basic
language. It offers most of the possibilities of
languages such as Pascal while retaining the
advantages of typical Basic features. One of
the reasons for using Basic is that program
ming the WIMP environment is not supported
in Pascal or Fortran as much as it is in Basic
or C. For reasons of speed, critical loops and
procedures are implemented in Archimedes
Assembly Language. Because of the RISC
concept, this Assembly contains only a limited
set of instructions and is thus comparatively
easy to leam. However, some procedures are
implemented in C and are easily integrated in
the system.
Version 1.0 of the package contains mainly
image processing functions. Programs provide
for simple radiometric corrections, feature
extraction, image calculations, filtering and
classification. The display program shows
clearly the capabilities of the system. Colour
composites are created within a few seconds.
By changing the hardware palette, it is
possible to find the best colour range to
display the image. A selection can be made
between 3-3-2, 3-2-3 and 2-3-3 for number of
bits per pixel for the primary colours red,
green and blue. The 3-3-2 selection, for
example, yields a colour composite build up
by 8 levels of intensity for red. 8 levels for
green and 4 levels for blue. Greytone images
are displayed by 16 levels for intensity. A
pseudo colour scale uses 64 colours. Another
special hardware palette setting is used for
anaglyphic display of stereo images. The
lefthand image displayed with 8 levels of
intensity for red is mixed with the right hand
image with 16 levels of intensity for green.
This way the terrain relief can be perceived
when using red and green filters (glasses) for
channel separation.
Though restricted to 8 bits per pixel, the
display of an image (on multisync monitors)
compares favourably with 24 or 32 bit display
systems. Computation of a vegetation index,
image calculations or linear and non-linear
filtering are achieved within a few seconds.
The local maximum within a 3 by 3 kernel of a
256 by 256 image is done in 1 second. For
version 1.0, all image arithmetic is performed
in fixed point integer, computing with 3
decimals. In and output data are raster files
with one byte per pixel. Figure 5 shows the
programs currently implemented.
The package standardises on images of 256
lines by 256 columns, though 512 by 512 is
also supported, provided the user has at least
2 Mbyte RAM. A multisync monitor is needed
to display the full image, whereas, to view the
entire image on the medium resolution moni
tor, you would have to zoom the image or
scroll the window.
An image consists of a header file plus the
respective raster files. The header files reside
in directory INF, the raster files in directory
RAS. The header file contains information like
number of spectral bands available, number
of lines and columns, data source, etc.
Example: The image with the name AUS has
4 spectral bands of Landsat TM which are
bands 2. 3, 5, and 7. This is recorded in the
header file. The respective raster files are
then named AUS2, AUS3, AUS5, AUS7. An
image is selected by its name, the bands are
loaded by specifying the band numbers. The
raster data structure is line sequential (similar
to sprites, but without header) with 1 byte per
pixel. The header file can be read with the
program “View header".
Version 2.0 will include more advanced image
processing functions as well as GIS tech
niques, e.g. m1m2l transformations, RGB to
HSI, overlay of maps, digitization and distance
analysis. Image arithmetic will be extended
with binary and logic operations.