Part II: Example of Treatment using Triton

Once the shell script "triton" is configured for your own environment, you may run Triton. The directory Triton/sample contains a sample image, sample.raw, to illustrate the use of Triton.

First run Triton typing:

triton

The main menu appears on the screen. To load the image in memory, first select the memory where the image will be stored, image 0 for instance. Then click on the "Read image" button.

The image to be read contains 512 lines, and each line 512 pixels. Check the default values of width and height. In the file sample.raw pixel values are integer numbers each one encoded on one byte: select the "Raw byte" option on the top of the read menu.

click twice on the directory containing the file: "samples" in our example. The list on the right side of the menu displays all the files in the current directory. Click twice on the image file name, sample.raw. The read operation is then automatically processed.

Once the image is load in the selected memory, display it clicking on "Display image".

The image may be greatly enhanced using Fourier filtering. We will explain in detail the procedure to apply spatial and frequential filters to achieve this enhancement.

The discontinuities on opposite edges of the direct image introduce false high frequency components in its Fourier transform. We will use a rectangular filter to remove these discontinuities:

  1. select an unused memory, image 1 for instance, in which the rectangular filter will be stored.

  2. click on "Rectangular filter"

  3. the parameters defining the filter are:

  4. click on the "Build filter" button to build the filter and then on "close" to come back to the main menu.

In this example we have explained the general way to design any rectangular filter specifying manually each parameter. Note that the menu "Rectangular filter" contains an option "Reset default parameters" which allows to set automatically the parameters for a rectangular filter suitable to smooth the edges of the image. You may have used this option to build rapidly such a filter!

To apply this filter to the image you have to multiply the contents of the two memories 0 and 1:

  1. click on "Operations on two images" in the main menu.

  2. To multiply image 1 by image 0 with result in memory number 1:

  3. select image 1 as the destination.

  4. select the operation "dest = dest * src".

  5. select image 0 as the source.

  6. click on "exec" to process this operation.

Coming back to the main menu display memory 1 which contains now the smoothed image.

Now you may compute the Fourier transform of image 1: click on "Fourier transform". Once the calculus is achieved display the image 1 which represents now a Fourier transform. The aim of the frequential filtering that we will now process is to remove the very low frequencies from 0 to 20 and the very high frequencies beyond 150 in Fourier space: this is a band pass filter. To built the corresponding filter:

  1. select an unused memory, number 2 for instance, to store a new filter.

  2. click on "Unique frequential filter":

  3. click on "Build filter" and come back to the main menu.

Check the profile of this filter display image 2, by selecting "Profiles" on the top of the image window; then choose "Horizontal profile" and click on the point (0,0). The profile of the filter along the axe (Ox) is displayed. The smooth ascending transition begins at x = A = 0 and terminates at x = B = 20 with a smooth profile to avoid Gibbs effect. The filter value is 1.0 between 20 and 150 pixels as specified. The smooth descending transition begins at x = C = 150 and terminates at x = D = 180. Note that frequential filters are always symmetric for mathematical consistency.

You may now apply this frequential filter on image 1 multiplying it by image 2. Use the same procedure as for the rectangular filter:

  1. come back to the main menu and click on "Operations on two images".

  2. select image 1 as destination image.

  3. select the operation "dest = dest * src".

  4. select image 2 as source image.

  5. click on "exec" to process the operation.

Now the image 1 is the filtered Fourier transform of the original image. You may display it to see which frequencies have been retained. Compute the inverse Fourier transform of image 1 and display image 1 to see the result of the filtering.
Comparing image 0 ( the original one) and image 1 (the filtered image), one may see that the highly contrasted background has been flattened suppressing the very low spatial frequencies. The image has also been smoothed removing the noise in the high frequencies, where the signal to noise ratio is small.

Introduction

I. Using Triton

III. Installing Triton