Filters

Basic Filters Tool

The Basic Filters tool lets you apply several simple filters to your image. This can be very useful for data denoising; however, the real measured data will get altered in the process, so great care should be taken not to destroy important features of the image.

  • Mean filter – takes the mean value of neighborhood of the filtered value as the value.
  • Median filter – takes the median value of neighborhood of the filtered value as the value.
  • Conservative denoise filter – checks whether the value is not extreme within the neighborhood. If yes, filter substitutes the value by of the next highest (lowest) value.
  • Kuwahara filter – is an edge-preserving smoothing filter.
  • Minimum filter – also known as erode filter, replaces values by minimum found in neighborhood.
  • Maximum filter – also known as dilate filter, replaces values by maximum found in neighborhood.
  • Dechecker filter – a smoothing filter specially designed to remove checker pattern from the image while preserving other details. It is a convolution filter with kernel
    Dechecker filter 5 × 5 coefficient matrix
  • Gaussian filter – a smoothing filter, the size parameter determines the FWHM (full width at half maximum) of the Gaussian. The relation between FWHM and σ is
    FWHM-sigma relation for Gaussian

Tip

By default, these filters will be applied to the entire image. However, you can apply a filter to a specific region within your image by selecting it with the mouse. This can be useful for correcting badly measured areas within a good image. To apply a filter to the entire image again, just click once anywhere within the image window.

Moreover, there are more denoising functions in Gwyddion, for example DWT denoising and FFT filtering. For details see section Extended Data Edit.

If you need to only suppress some values in the SPM data that are obviously wrong, you can also try the Mask of Outliers module and the Remove Data Under Mask module. For details see section Data Edit.

Screenshot of filter tool with median filter applied to a rectangular selection

Convolution

Data ProcessIntegral TransformsConvolution Filter

Convolutions with arbitrary kernels up to 9 × 9 can be performed with the Convolution Filter module.

The Divisor entry represents a common factor all the coefficients are divided before applying the filter. This allows to use denormalized coefficients that are often nicer numbers. The normalization can be also calculated automatically when automatic is checked. When the sum of the coefficients is nonzero, it makes the filter sum-preserving, i.e. it the factor normalizes the sum of coefficients to unity. When the sum of the coefficients is zero, the automatic factor is simply let equal to 1.

Since many filters used in practice exhibit various types of symmetry, the coefficients can be automatically completed according to the selected symmetry type (odd, even). Note the completion is performed on pressing Enter in the coefficient entry.

In a fresh installation only a sample Identity filter is present (which is not particularly useful as it does nothing). This filter cannot be modified, to create a new filter use the New button on the Presets page.