Non-Linear Filters

There are three types of non-linear spatial filters implemented:

Median filtering, for noise removal

Outlier Objects Filter, for recovery of areas covered by contamination and spike removal

Statistical Differencing, for contrast enhancement

Median Filtering

The advantage of a median filter is that it is very robust and has the capability to filter only outliers and is thus an excellent choice for the removal of especially shot noise and horizontal scanning artifacts.

A median filter is performed stepwise by moving a data window of specified size over the image. If the center value in the data window differs more than a certain value from the median value it will be exchanged by the median value. The threshold value determining whether or not to modify a pixel value depends on the local standard deviation within the data window. The higher the standard deviation is the higher the threshold value will be set.

 

images\median.gif

Target Noise

The target noise specifies the type of noise the filter should reduce. There are four options:

Horizontal Noise: This is mostly used for removing bad scanning lines or stripes that often occurs for images, such as SPM images, acquired in raster scans with the horizontal direction as the fast scanning direction. In this mode the x-size of the data window will be fixed to 1.

Vertical Noise: This works as above but for noise in the vertical direction. In this mode the y-size of the data window will be fixed to 1.

Non Directional Noise: This mode is used for reducing noise with our specific directionality. The x and y size of the data will be set equal.

Customize: This mode allows setting the data window of any size and shape

 

Noise Level.

The noise level for the target noise can be set to:

High Values: In this mode only outliers having values higher than the median value can be modified. Therefore, this mode is good for reducing artifacts which are above the normal image plane.

Low Values: In this mode only outliers having values lower than the median value can be modified. Therefore, this mode is good for reducing artifacts which are negative.

High & Low Values: This mode will modify both high and low values based on their distance from the median values.

 

The Replace Pct. value determines the percentage of pixels that will be modified. When set 1.0 only the 1.0 percent worst outliers will be modified. In is this way possible to perform very gentle filtering leaving the most pixels intact but still get a significant noise reduction. In many cases removing between 1-5% of the values would be an effective median filtering, removing outliers without blurring the image.

 

The data window size can be adjusted in both x and y directions. By having for example a 1 ´ 5 kernel the filter will only be sensitive to corrugations in the y-direction. Kernels for median filters are typically small, lower than or equal 9 pixels in length.

 

Include Border If this option is checked the also the pixels at the border can be filtered by applying the border-mode as specified in the border-mode settings dialog.

 

It is possible to define the data window shape different from the default rectangular form and make it more or less sensitive to particular directions:

- Rectangular (default) shape 


- 45 degrees turned rectangle shape 


- Circular shape ( = octagonal for smaller kernels).

images\shapes1.gif

Below is seen an example of an image distorted mostly by short horizontal lines. By defining a 3´7 Median mask we achieve a filter that is extremely selective for this type of artifact. The bottom image shows the difference between the original image and the filtered result. It clearly displays the removed line artifacts and in addition also the "under shoot" artifacts typically occurring when scanning across steep slopes.

 

images\medianfilteexample.gif