FAV

Averaging (mean) filter


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

Back to top

Description


FAV performs an averaging of the values in one or more of the channels you specify. Channels containing amplitude, decibel, or complex values are converted to intensity prior to averaging.
Back to top

Parameters


Name Type Length Value range
Input: Input raster channels * Raster port 1 - 1024  
Output: Output raster channels * Raster port 1 - 1024  
Port Settings: Resample Mode: Resample mode for Port Settings Raster port 1 - 1024 Nearest | Bilinear | Cubic
Default: Nearest
Filter X Size Integer 0 - 1 1 - 1001
Default: 3
Filter Y Size Integer 0 - 1 1 - 1001
Default: 3
Mask: Area mask Bitmap port 0 - 4 See parameter description
Background Range Float 0 - 2  
Failure Range Float 0 - 1  
Background Set to Zero String 0 - 1 YES | NO
Default: YES

* Required parameter
Back to top

Parameter descriptions

Input: Input raster channels

The input image channels to filter.

Output: Output raster channels

The output channels to which to write the filtered result.

The output channels can be the same as those you specify as input. If you specify an area mask, only the area under the bitmap mask is written to the output channels.

Port Settings: Resample Mode: Resample mode for Port Settings

The type of image resampling to apply.

Supported methods are as follows:

Filter X Size

The x-width of the filter, in pixels.

The filter need not be square; that is, the pixel x-size and the pixel y-size can differ in value. Both values must be odd integers greater than 1. The default value is 3,3 for a filter size of 3 x 3.

Filter Y Size

The y-height of the filter, in lines.

The filter need not be square; that is, the pixel x-size and the pixel y-size can differ in value. Both values must be odd integers greater than 1. The default value is 3,3 for a filter size of 3 x 3.

Mask: Area mask

The bitmap that defines the area to process in the input raster, which you can specify as an option. If you do not specify a value for this parameter, 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 in the segment you specify, having a pixel value of one, define the area to process.

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 values of the output pixels.

Background Range

The range of background values. All pixels with values in the minimum and maximum background range are excluded from the calculations. If you enter only one value, the image contains only one background value. If you do not specify a value for this parameter, the image contains no background value.

Failure Range

The pixel value that represents an unknown or invalid pixel. All pixels of the failure value you specify are excluded from the calculations. If you do not specify a value for this parameter, no failure value is applied.

Background Set to Zero

Whether to keep the values outside the specified mask area or set them to zero.

Available options are as follows:

If you do not specify an area mask, this parameter is ignored.

Back to top

Details

FAV computes the mean (average) of the gray-level values that surround each pixel in a rectangular filter window you define. This effect smoothes the image and eliminates noise. With channels with SARPixelContent set to Amplitude or Decibel, the input values are converted to Intensity prior to computing the average. With complex-valued layers, such as [C16S] and [C32R], the output represents the argument of the coherent phase, scaled to the average intensity.

You specify the background values with the Background Range parameter. If you specify only one value for the background range, the maximum and minimum values are considered the same. All pixels in the range you specify are excluded from calculation.

The failure value specifies a pixel value that represents an unknown or invalid pixel. All pixels with a value equal to the failure value are excluded from calculation.

The dimensions of the filter window must be an odd number. The minimum filter size is 1 x 3 (or 3 x 1). The filter window need not be square.

With the Mask parameter, you specify the area in the input channel to process. When you do so, only the area under the mask is filtered, and the rest of the image remains unchanged.

If you do not specify a mask, the entire image is processed.

Back to top

Algorithm

FAV performs spatial filtering on individual pixels in an image by using the gray-level values in a square or rectangular window that surrounds each pixel. The dimensions of the filter size must be odd and can range from 1 x 3 or 3 x 1.

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

        +---------+
        |a1 a2 a3 |
        |a4 a5 a6 |     <---   3 x 3 filter window
        |a7 a8 a9 |
        +---------+
      

The averaging filter calculates the sum of all pixels in the filter window and divides that sum by the number of pixels in the filter window.

The filtered pixel at:

With real-valued input channels with SARPixelContent set to Amplitude.

The filtered pixel at:

With real-valued input channels with SARPixelContent set to Decibel.

The filtered pixel at:
With complex-valued input channels with the real part given as an and the imaginary part given as bn , the real and imaginary parts of the filtered output are given by formula and formula, where:

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