FilterApplet Help

Basic operations

Reload the source

- reloads the source image, path and filename of which is given in the 'Source image:' - textfield. The file is searched only from machine where the actual applet code is, NOT from the machine where the user are running the applet. The largest picture can be 1000 * 1000. Resize the image if the width is over 750.

Add more noise

- Adds noise to source image, this can be used to see how noise is removed with mean and median filters.

Height and width

Height and width of image can be changed. Remember to change height also if you are changing width, otherwise width doesn't work. Might be a bug in the source code or in Java.

Flip x, Flip y

-Mirrors the image either vertically or horizontally.

Copy filtered to source window

- Copy filtered image to a new source image. This makes it possible to do multiple operations for an image.

Mask steps:

- These defines the mask sizes. Remember to push Enter after changing. The change in mask size appears in Mask size - field in pixels (x * y).

Filters

If you want to know more about these filters below, see Image operations 2. The filtered image appears below the source image,except for 'Color to gray image'. If the mask size is over 5 *5, the applet might sometimes be rather slow.

Color to gray

This converts color image to gray image with following equation:

gray = (r + g + b)/ 3
r = g = b = gray;

r ,g ,b are red, green and blue components of image . The Java language converts all images to RGB+ alpha format and to an array, where every array elements contains four values for one pixel : r, g, b and alpha. Every component can each have values between 0 - 255. The gray image is copied to a new source image.

Mean

Mean filters the source image by using mask size defined by user. The filtered image appears below the source image.

Median

Median filters the source image by using mask size defined by user. The filtered image appears below the source image.

Bartlett

Bartlett filters the source image. To simplify the calculations a little, pixels in near borders (3 pixels in every border) are filtered with fewer available pixels and only rather random parts of mask matrix weigths are used. These pixels might not be correctly filtered but it's very hard to see any difference compared to other parts in image. The other pixels are correctly filtered with using all the mask weigths. The mask size is always 7 * 7.

Gaussian

Gaussian filters the source image. The border pixels (3 pixels in every size) are filtered with fewer pixels and only rather random parts of mask weigths are used. These pixels might not be correctly filtered but it is very hard to see any difference compared to other parts in image. The other pixels are correctly filtered with using all the mask weigths. The mask size is always 7 * 7.

High-pass

High-pass filters the source image with following procedure:

  1. Low-pass filter the source image by using mean filter.
  2. Subtract low-pass filtered image from source image to produce a high-frequency component.
  3. Add some of (k = 0.7) the substraction to source image :
    Filtered(x,y) = source(x,y) + k *subs(x,y)

The mask size is defined by user. Usually two or more times of filtering are needed for any clear result. Remember to 'Copy filtered to source window' before filtering again.