Spatial Filters
Centre for Vision, Speech & Signal Processing
DEVELOP LIBRARIES AMMA SEARCH AMMA HOME
 

Spatial filters

In image processing, spatial filters are those from which an output pixel is computed from some neighbourhood (i.e. mask) (usually rectangular) surrounding the corresponding input pixel.

A characteristic of spatial filters is that, if the filter is to be applied strictly, the output image is smaller than the input image by an amount related to the mask size. Frequently this is not what is wanted; for example the user may want an output image that is the same size as the input image. In this case the problem is: what to do with the border regions? The problem is particularly acute if the filter mask size is significant compared with the data width. There are various options, used in the filter classes below, illustrated here using a constructor for an NxN averaging mask:

A separate problem is that of registering the output image with the input image. If the mask width N is odd, this is straightforward: the output pixel position is that of the input pixel under the centre of the mask. However, if N is even, there is no centre mask pixel, so that there is an effective ½ pixel shift. The direction of this shift can be controlled by the user (so that successive shifts can be cancelled if required). The default is to shift upwards and to the left. To shift the other way, the constructor might look like:

IPLinearAverageC g(N,N,Original,PBRescale,ShiftDR);

The options are documented in IPSpatFilterC, which is inherited by the filter classes. Note that not all of the possibilities are implemented for every filter. Also some arguments cause others to have no effect.

Subtopics:

    AMMA
        Image
            Image Processing
                Spatial Filters

Classes:

Default Classes Description
IPGaussNoiseBodyC Body class to add Gaussian noise to an image
IPGaussNoiseC Applies Gaussian noiso to an image
IPStatistic2dBodyC Body class for window statistics computation
IPStatistic2dC Window averaging filter
IPStatEnergy2dBodyC Body class for window statistics computation
IPStatEnergy2dC Window averaging filter
IPStatEntropy2dBodyC Body class for window statistics computation
IPStatEntropy2dC Window averaging filter
IPSpatFilterC Container for generic spatial filter parameters
IPRunLengthBodyC Body class for run-length filter
IPRunLengthC Run-length filter
IPLinearAverageBodyC Body class for window averaging filter
IPLinearAverageC Window averaging filter
IPSpatDiffBodyC Body class for spatial difference filter
IPSpatDiffC Spatial difference filter
IPGradientBodyC Body class for spatial gradient filter
IPGradientC Spatial gradient filter
IPConvSymBodyC Body class for IPConvSymC.
IPConvSymC Convolves an image with a 1-D odd-order symmetrical mask
IPGaussConvolveC Filters an image with an odd-order finite-width approximation to a Gaussian mask
IPConvolveBodyC Body class for IPConvolveC.
IPConvolveC Convolves an image with a 1-D mask
IPFft2dBodyC
IPFft2dC Computes FFT of 2D images
IPGaborBodyC Body class for computing set of Gabor filters
IPGaborC Computes Gabor feature images
IPPowerSpectrumBodyC
IPPowerSpectrumC Computes the powere spectrum for an image of complex numbers
IPDct3x3BodyC Body class for window averaging filter
IPDct3x3C Window averaging filter
IPWaveletBodyC Body class for window averaging filter
IPWaveletC Window averaging filter
ColourInvariantBodyC Calculate a colour invarient for each pixel.
ColourInvariantC Calculate a colour invarient for each pixel.
MultiLevelBodyC Class for producing multiresolution or multiscale images
MultiLevelC Class for producing multiresolution or multiscale images
IPSpatFilterN Namespace to define values for spatial filter parameters
Author: Bill Christmas, Generated by DocEntry: March 20, 2001