FGA

Gaussian filter


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Algorithm :: Acknowledgements :: Related

Back to top

Description


FGA performs Gaussian filtering on image data. This program can be used as a low-pass filter to blur the image if only one Gaussian filter parameter, SigmLow, is specified. It can also be used as a band-pass filter to detect sudden intensity change in the image, if both SigmLow and SigmHigh parameters are specified.
Back to top

Parameters


Name Type Length Value range
Input: Input raster channels * Raster port 1 - 1024  
Output * Integer 1 - 1024  
Low and High Pass Cutoff * Float 1 - 2 1.0 - 32.0
Mask: Area mask Bitmap port 0 - 4
Port Settings: Resample mode Raster port 1 - 1024 Nearest | Bilinear | Cubic
Default: Nearest

* Required parameter
Back to top

Parameter descriptions

Input: Input raster channels

Specifies the input channels to filter.

Output

Specifies the output channels to receive the filtered result.

The output channels (DBOC) can be the same as the input channels (DBIC). If a mask is specified, only the area under the mask is written to the output channel.

If two Gaussian filter parameter (SIGMSQ) values are specified and the output channel is an 8-bit or 16-bit unsigned integer channel, the output contains absolute values.

Low and High Pass Cutoff

Specifies the low-pass filter cutoff value and, optionally, the high-pass cutoff value obtained by the square of Gaussian distribution deviation.

This parameter must be in the range of 1.0 to 32.0. If both values are specified, the first and second square Gaussian distribution values must be different; otherwise, the kernel for low-pass and band-pass filters are identical and the result will be 0.0.

Mask: Area mask

Optionally specifies the bitmap that defines the area to be processed within the input raster. If this parameter is not specified, the entire layer is used by default.

To define a bitmap mask, you must specify the bitmap segment that you want to use. All of the pixels within the specified segment, having a pixel value of 1, define the area to be processed.

Only the area under the mask is written to the output. Pixels that are outside the mask but within the filter size window will be used to determine the output pixel values.

Port Settings: Resample mode

Specifies the type of image resampling desired.

Supported methods include:
Back to top

Details

FGA performs Gaussian filtering on image data.

FGA accepts one or two SIGMSQ values. SIGMSQ is the square of the Gaussian distribution deviation. The SIGMSQ value must be in a range of 1.0 to 32.0.

If only one Gaussian filter parameter is specified, FGA is used as a low-pass filter to blur the image. The function computes the weighted sum of the gray-level values in a square filter window that surrounds each pixel. The weights are the results of the Gaussian function with the specified deviation. The filter window is a square of size 2*SIGMSQ + 1.

If both Gaussian filter parameters are specified, this function is used as a band-pass filter to detect any sudden intensity change in the image. The resulting image is the difference of the image produced by SIGMSQ(2) subtracted from the image produced by SIGMSQ(1). The filter window size is 2*n + 1, where n is the larger value of SIGMSQ(1) and SIGMSQ(2).

The MASK parameter specifies the area in the input channel that is processed. If no mask is specified, the entire image is processed by default.

The output channel (DBOC) can be the same as the input channel (DBIC). If FGA is a band-pass filter, the results are both positive and negative; if the output channel is an 8-bit or 16-bit unsigned integer channel, , however, FGA generates only the absolute value of the results.

Back to top

Algorithm

FGA uses the following Gaussian function to compute the filter weights:

G(i,j) = exp( -((i-u)**2 + (j-v)**2)/(2 * sigma**2) )
  
where:

The filter weights W(i,j) are the normalized values of G(i,j) over the entire filter window, hence the sum of all weights is 1.

The gray level of a filtered pixel is the sum of W(i,j)*V(i,j) over all pixels in the filter window, where V(i,j) is the original value at location (i,j).

All pixels in the image are filtered by FGA. To filter pixels located near edges of the image, FGA replicates edge pixel values to provide sufficient data.

Back to top

Acknowledgements

This program was developed with the assistance of the Institute for Space and Terrestrial Science (ISTS) at the University of Waterloo, Ontario, Canada.

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.