Part I: Using Triton:

Description of Triton menus and functions

Triton main menu:

To run Triton type `triton' on the command line. This command initializes several environment variables used by Triton, and opens a log file named triton.log. Triton will write in this file messages for each operation performed during the session. Note that these messages also appears in the control window ( from which you launched the triton command). Error messages are also written in triton.log. To change the location and the name of the file triton.log see section "INSTALLATION".

Once these initializations are successfully performed, Triton displays the main menu. First of all note the push button labelled "Help" on the bottom of this menu (as in most of Triton menus): this allows you to view the in-line help documentation. This "help" function needs a HTML browser. See section "Installation" for more information.

Triton main menu is divided in four parts:

I.1. Selection of the active image

Up to six images can be simultaneously load into memory. The user must specify the active image on which the treatment is processed. This is done by clicking on one of the six toggle buttons on the top of the menu. The selected image button appears as red. Each of these buttons is labelled with the number of the corresponding image and a supplementary character specifying the nature of the image. For instance:

At the beginning of a Triton session all the memories are empty. The first operation is to read an image from the disk and to load it in one of the six memories. To increase the number of memories to load more images, edit the file Triton/c/trn.h and set the variable MAX_IMG_NUMBER to the desired value. Then recompile the program ( see section Compiling Triton).

I.2. Input / Output operations:

I.2.1. Read and Write image. Available formats

Triton supports several image file formats: TIFF, PGM, GIF, PPM, LMCP and raw data format. Note that Triton uses Pbmplus routines to convert image file in its own internal format. If you do not have Pbmplus on your machine, Triton will still work but LMCP, PGM and raw file formats only will be available.

I.2.1.1. Raw format:

In such a format pixel values are sequentially stored, line after line without any other information. Therefore to read or write such an image file first you must specify three parameters:

I.2.1.2. TIFF format:

As for raw byte format, pixels are stored as integer values between 0 and 255. But in Tiff format the number of lines and the number of pixels per line are already stored in the file: you do not have to specify them to read the image.

TIFF automatically compresses the image to reduce the place on disks. This operation does not alter the quality of the image.

I.2.1.3. PGM format:

Pixels are stored as integer values between 0 and 255. The number of lines and the number of pixels per line are already stored in the file: you do not have to specify them to read the image. There is no compression.

I.2.1.4. PPM format:

Images stored in this format are encoded in true colors. This means that pixels are stored as three integer values, each one between 0 and 255. The first one corresponds to the Red component, the second one to the Green component and the last one to the Blue component. The number of lines and the number of pixels per line are already stored in the file: you do not have to specify them to read the image. There is no compression.

Note that Triton supports this format for read operation only: it converts the colored image in grey scale. You can not write images in PPM format.

I.2.1.5. LMCP image file format:

Using LMCP format, one may associate different information about the image, such as:

In LMCP format pixel values may be encoded as bytes or floating point numbers (float) or complex (see section Raw Format). All these informations are encoded in the image header which may be viewed and modified using the View / Modify header menu.

I.2.1.6. Read image:

To read an image in a raw file format (see section Raw Format) you have to specify first the pixel encoding ( "byte", "float", or "complex"), the width ( i.e. the number of pixels per line of image), and the height (i.e. the number of lines in the image). To set correctly these specifications use the input fields on the top of the "Read" menu:

The other formats ( i.e. TIFF, PGM, PPM, and LMCP) are automatically recognized by Triton: select "automatic" file format at the top of the "read" menu.

Once the image format is specified, select the name of the image file and click on "OK".

I.2.1.7. Write image:

You have to select the format in the pulldown list on the top of the window. See section Read/Write for a description of the different formats.

You may also write the image in PostScript format clicking on the "EPS" button. The generated file may be sent later to a printer supporting PostScript format. Note that this format is not readable by Triton.

Be careful: selecting floating point pixel format takes a large amount of place on disk (1Megabyte for a 512x512 image). In most cases select byte pixel format. In this case pixel values are renormalized between 0 and 255: the loss of information is negligible( and the gain of disk memory is large!).

To save supplementary information together with the image, select the LMCP file format: the image header will be written in the image file. You may modify the current contents of the header before writting the image: click on the button labelled "Modify image header". The current header of the image is then displayed. When modifications are done, validate the changes clicking on "Update header".

Once you have specified a format select a file name or type it in the "Selection" field. Once this is done validate the operation with the "OK" push button. A message in the control window tells you if the write operation has been successfully completed.

I.2.2.View / Modify image header:

Triton associates an internal header to each image in memory. This header contains different information about the image: a title, a date, real sizes and statistical data (see section LMCP format). The menu "View/Modify header" allows you to view the current information in the header of the selected image. You may modify or add missing information clicking on the corresponding field in the header menu:

If you read an image from a LMCP file, its header is automatically initialized with the information stored in the file. If you write an image in LMCP format, the internal header is copied in the LMCP file.

For a complete description of the header see section LMCP format.

I.2.3. Display image:

Once an image is load into memory click on the "Display image" push button to display it. The image is automatically renormalized to be displayed with the best dynamic of grey levels; note that this normalization does not change the actual pixel values of the image in memory.

When the first image is displayed, a window labelled "color map" appears which allows you to modify the current color map.

This window contains two sliders, called "color contrast" and "color shift". You may enhance the visual quality of the display fitting these parameters for the displayed image. This operation does not modify the actual pixel values in the memory. This "color map" window contains three toogle buttons: you may select a grey color map or a pseudo-color map. To invert the current color map, click on the "Invert color map" button.

For an image in direct space the origin is at the upper left corner of the image. The coordinates and the value of a pixel appears at the bottom of the window. For an image in Fourier space the origin of dual space is in the center of the image. The displayed image represents in fact the logarithm of the modulus of the true image in memory in order to enhance the visibility of the high frequency components. It does not modify the actual image in memory.

Each image window contains a menu bar:

I.2.3.1. Display:

I. Print Image

You may print the image using this menu: a dialog window asks you for the PostScript printer name:

The image is printed together with a description text established from the values of internal image header ( see section "View/Modify header ).

I. View image header

This option displays the current header of the image. The information contained in this header are used when printing or writting ( with LMCP file format) images. You may modify it from this menu before printing or saving the image.

I. Close

This operation close the window of the displayed image, which is still in memory.

I.2.3.2. "Profiles" analysis:

To view horizontal or vertical profiles in the image, select the profile option and click on one point in the image. A new window is created, containing the profile passing through the selected point:

For oblique profiles you have to specify two points in the image; click on the first point, move to the second point and click on it. The profile is then displayed in a new window.

The maximum and the minimum along the profile are indicated on the upper left side of the profile window. One know the pixel values along the profile using the slider in the profile window. The coordinates of the current point are given together with the pixel value.

The profile may be saved in a file. Click on the button labelled "Write profile": a new menu allows to save either the (X,Y) values or the Y coordinates only in a ASCII file. This is intended for users who want to plot a profile for publication using a graphic tool such as xmgr, Kaleidagraph...

I.2.3.3. "Zoom" operation:

To magnify a particular area of the image, first select the zoom value. Then click on a point in the image; a new window displays the magnified area; if you click on another point in the image, the magnified area is automatically updated.

The magnification is obtained by repeating the pixels in the image; no interpolation is performed.

This submenu allows you to choose the value for the magnifying operation between 2 and 6.

I.2.3.4. "Statistics":

Histogram: this function calculates and displays in a new window the pixel values distribution.

Statistics: this function calculates and displays in the control window statistical data: minimum, maximum, mean, root mean square over the whole image.

I.3. Image treatments

Warning: in all subsequent operations the value of the pixels are modified. Thus the original image is lost. It may be advisable to duplicate an image in another memory before starting any treatment to be able to come back to the original image in case of an error.

I.3.1. 3x3 Convolution:

This function performs the convolution of the image by a 3x3 matrix, denoted (aij). Each pixel pnew(i,j) of the new image is defined as:

where pold(i,j) denotes the original value of the pixel at the location (i,j).

The nine akl coefficients appear at the center of the "conv3x3" window and may be manually modified. Classical operators have been introduced. Just click on the operator name in the "conv3x3" window: the coefficients are automatically set to their right values. Sobel operators perform numerical differentiation of the image in particular directions, Laplacian operator may be used for edge detection, the smoothing operator performs a pixel averaging over a close neighbouring of each pixel.

After selecting the coefficients, execute the convolution by clicking on the "exec" button.

I.3.2. Geometric operations:

These operations are available for real images only, not for images in Fourier space.

I.3.3. Fourier transform:

For images in direct space this function performs the Fourier transform of the image, using the Cooley algorithm. The width and the height of the image must be a power of two. The result is an image in Fourier space. One may then use dual filters to analyse or enhance it. ( see section Frequential filters about dual filters).

For images in Fourier space this function performs automatically the inverse Fourier transform. The result is an image in direct space.
Note: this operator may take a rather long time when using lowed workstation.

I.3.4. Wavelet analysis

This menu provides two methods to de-noise an image, i.e. to remove the noise blurring the image. Both methods require that the noise is a white ( uncorrelated) gaussian noise. If this is not the case, you may apply a transformation to the image, such as the Anscomb transform for Poissonian noises, before processing the image. You have also to specify ( or give an estimation) of the noise root mean square. The algorithm based on orthonormal wavelets is much faster than the multiresolutions algorithm.

Orthogonal Wavelets:

Two functions are provided to perform noise reduction using orthonormal wavelets:

MultiResolution Denoising:

This function is intended to reduce the effect of noise in an image. From this point of view it is similar to Wiener filtering.
This method consists in decomposing the image I to be denoised in a serie of sub-images I(n) of coarser and coaser resolutions: the sub-image ( or plane) I(n) contains all the features which sizes are about 2**n pixels.
One recomposes the image I by adding all the planes I(n).
The maximum number of planes depends on the image width W: for W=2**N, one may build N planes.

Number of planes used for the noise reduction:

The image I being blurred by noise, this noise propagates through each plane I(n); but one may prove that the planes I(n) corresponding to coarse resolutions are not much affected by noise: the noise reduction is to be processed on the finest planes only, typically for n=0 to 3.

Noise r.m.s.:

This parameter represents the root mean square ( or noise level)of the noise blurring the image. It is used to process the selection of significant information from the noisy image.

Denoising function

A pixel value lower than the noise level contains less statistically significant information than a pixel value greater than the noise level. Weighting pixels according to their information contents allows to keep the significant information only.
Two methods may be used to perform the selection between significant and unreliable pixels:

One can not choose 'a priori' the right function to denoise an image: users should try both of them.

Threshold coefficient:

One may adjust the denoising efficiency of the algorithm using the threshold coefficient: for large threshold values ( above 5.0) most of the noise is removed but small details in the image are also lost. Experience shows that the least compromising threshold coefficient values are about 2.

Number of iterations:

The denoising algorithm is much more efficient when iterating the denoising process. Typically the algorithm converges after 3 iterations. More iterations do not change many details in the image and would only increase the processing time!

Once you have specified these parameters, run the denoising operation by clicking on the button labelled " Iterative Denoising".

Note: the processing time may be rather long on some lowed workstations.

I.3.5. Operations on two images:

This menu provides several operations requiring two images as input, called "source image" and "destination image"; the output result is stored in the image called "destination image". The two input images must have the same widths and the same heights. To perform one of these operations you have to:

  1. select the first image ("Destination image") clicking on the corresponding toggle buttons at the top of the menu. Warning: this image will contain the result of the operation: its previous contents are definitely lost.

  2. select the operation to be processed.

  3. select the second input image ("Source image") with the toggle buttons on the bottom of the menu. The operation will not modify this image.

  4. Click on the "Exec" push button to execute the operation.

Available operations:

I.3.6. Arithmetic operations:

This submenu provides some useful operations on images. For images in direct space the following operations are available:

For images in Fourier space the following operations are available:

I.3.7. Histogram equalization

This function equalizes the density of grey levels in the image: the number of pixels per grey level is the same for all the grey levels. This is a good means to enhance the contrast of an image.

I.4. Filter creation:

Triton allows to build two kinds of filters: direct filters, which are to be applied on images in direct space, and frequential filters, to be applied on images in Fourier space.

I.4.1. Frequential filters:

Unique frequential filters:

Frequential filters( also called dual filters) are used in Triton to select a restricted elliptical area of the Fourier transform of an image. Note that these filters are hermitian, i.e. they are centro-symmetric to preserve the consistency of the filtering. Such filters are defined by several parameters:

Once you have specified these parameters click on the button "Build filter" at the bottom of the filter menu: this validates the parameters and processes the filter. The result is stored in the current selected image (its previous content is lost).

The button "Reset parameters" sets automatically the parameters to build a circular low cut filter used for background equalization.

Periodic frequential filters:

An image may contain in its Fourier transform several peaks equally spaced, corresponding to a two dimensional lattice. We have designed periodic filters which allow you to select or remove easily only these peaks. To build such a filter specify the coordinates (X1, Y1) and (X2, Y2) of the two vectors generating the lattice, and define the shape of the filter which will be located on each peak. The parameters to define this profile are the same as in "unique dual filter": A and B specify the position of the ascending edge of the filter, and C and D specify the descending edge. Be careful: the great axis is limited by the translation vector. This means that D has a limit value depending on the translation vectors. Once you have entered these vectors, click on the button

"0<=A<=B<=C<=D<..." to update this limit value.

I.4.2. Direct filters

Circular direct filters:

These filters are defined by the same parameters as "unique dual filters" but are applied to images in direct space. You have to specify:

Rectangular direct filters :

Rectangular filters are designed to level opposite edges in an image to avoid artefacts in the numerical Fourier transform which assumes that the visible image, in real space, is a period of an infinite periodic image. It allows to select ( or suppress ) a rectangular area of the direct image defined by:


II. Example of treatment using Triton

III. Installing Triton