The filter package contains some filters:
Detailed information can be found in the online lecture (lectures.ps,
* snn (Symmetric nearest neighbour)
* ku (Kuwahara Nagao)
* sp (salt and pepper noise)
Author: Dirk Balthasar, 2002, Universitšt Koblenz-Landau
The zip archives filter-linux-1-1.zip and filter-windows-1-1.zip contain each the binary version of the command line tool filter.
With the command line tool filter you are able to make filter operations on color images.
The 'filtering' needs as input a color image in PPM-Format (Portable Pixmap in binary format with magic number 'P6'). It produces one images: The filtered ore manipulated image.
Syntax: filter [options] FilterName "name_of_input_image" "name_of_output_image"
|FilterName mandatory:||ku = Kuwahara-Nagao,
snn = symmetric nearest neighbour
sp = salt and pepper noise
[ku, snn, sp]
|-cs ColorSpace:||Only supported with filter -ku
rgb1: Replace center-pixel by the the mean color of sector with lowest variance in rgb colorspace
rgb2: Replace center-pixel by the pixel with lowest distance to mean color of sector with lowest varinace
rgb3: Replace center-pixel by the pixel with lowest distance to mean color of sector with lowest variance, only if center-pixel has highest distance to mean color
hsv: Replace pixel by mean color of sector with lowest variance, calculated in hsv colorspace
[rgb1, rgb2, rgb3, hsv]
|-n noise:||Percentage of salt and pepper noise [0..100] (only for filter -sp)
Suppose you want to add salt and pepper (10%) to an image with name example.ppm.
First be sure that your color image is in PPM graphics format and the PPM file has the magic number P6.
filter -n 10 sp example.ppm out.ppm
will produce an image with name out.ppm containing the input image distorted by salt and pepper noise.
Editor: Dirk Balthasar
Letzte Änderung: 15.07.2002