FFROST

Frost adaptive filter


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm :: References :: Related

Back to top

Description


FFROST performs Frost adaptive filtering on any type of image data. The adaptive filter is primarily used on SAR image data to remove high-frequency noise (speckle) while preserving high-frequency features (edges).
Back to top

Parameters


ffrost (file, dbic, dboc, flsz, mask, damp, imagefmt)

Name Type Caption Length Value range
FILE * str Input detected SAR image 1 -    
DBIC * List[int] Input raster channel 1 -    
DBOC * List[int] Output filtered image 1 -    
FLSZ List[int] Filter size (pixels, lines) 0 - 2 1 | 3 | 5 | 7 | 9 | 11 | 13 | 15 | 17 | 19 | 21 | 23 | 25 | 27 | 29 | 31 | 33
Default: 7,7
MASK List[int] Area mask 0 - 4  
DAMP List[float] Damping factor 0 - 1 0.0 -
Default: 1.0
IMAGEFMT str Image units 0 - 9 Amplitude, Power
Default: Amplitude

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the file that contains the image data to be filtered and to receive the output.

DBIC

Specifies the channel in the input detected SAR image to be processed.

DBOC

Specifies the output channel to receive the filtered results. This channel must already exist within the input file (FILE). If this parameter specifies the same channel as the one defined as the input (DBIC), DBOC overwrites the input channel.

FLSZ

Optionally specifies the horizontal and vertical dimensions of the filter, in pixel units. Acceptable values are odd integers from 1 to 33, inclusively. The filter need not be square. Minimum filter sizes are 1x3 or 3x1; the default size is 7x7.

MASK

Optionally specifies the window or bitmap that defines the area to be processed within the input raster. If this parameter is not specified, the entire channel is processed.

A window mask is specified as follows:

MASK=Xoffset, Yoffset, Xsize, Ysize 

Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

For a bitmap mask, you can specify the bitmap segment number from the input file (FILE) that you want to use. All 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.

DAMP

Optionally specifies the damping constant for the adaptive filter. This constant specifies the extent of the damping effect of the filtering. The default value of 1.0 is sufficient for most SAR images.

Note: The use of large values for the damping factor allows for better preservation of sharp edges, but reduces the smoothing effect. The use of small values increases the smoothing effect, but does not preserve sharp edges well. If this parameter is set to 0, the results are identical to those of an average filter, where the weights of each pixel in the filter window are equal.

IMAGEFMT

Optionally specifies the image format of the SAR image, which defines how the correction factor should be computed. By default, the image is assumed to be in amplitude units.

Image units can be "Amplitude" (or equivalently "AMP") or "Power" (or equivalently "POW").

Back to top

Details

FFROST consists of an adaptive filter used to suppress speckle where the result is further refined (or smoothed, or dampened) by applying a used-defined exponential weight to the initial filter output.

The Frost filter differs from the Lee and Kuan filters in that the scene reflectivity is estimated by convolving the observed image with the impulse response of the SAR system. The impulse response of the SAR system is obtained by minimizing the mean square error between the observed image and the scene reflectivity model.

The damping factor for adaptive filtering depends on the non-filtered image and may require trial-and-error experiments to determine the best value. The value of the damping factor defines the extent of the exponential damping (the smaller the value, the smaller the damping effect). The default damping factor is 1.

The MASK parameter specifies the area within the input channel to be processed. Only the area under the mask is filtered; the rest of the image remains unchanged. If a single value is specified, this value points to a bitmap segment that defines the area to be filtered. When four values are specified, these values define the x,y offsets and x,y dimensions of a rectangular window within the image to be filtered. If the MASK parameter is not specified, the entire image is processed.

FFROST was formerly named FAD.

Back to top

Example

A 5x5 Frost filter is used on a 16-bit image channel containing SAR image data.

from pci.ffrost import ffrost

file	=	'radar.pix'
dbic	=	[1]	# specifies SAR data image
dboc	=	[2]	# specifies output channel
flsz	=	[5,5]	# specifies a 5x5 filter
mask	=	[]	# process entire image
damp	=	[]	# default damping factor 1.0
imagefmt	=	'AMP'	# Amplitude image format

ffrost( file, dbic, dboc, flsz, mask, damp, imagefmt )
Back to top

Algorithm

The implementation of this filter consists of defining a circularly symmetric filter with a set of weighting values (M) for each pixel:

M = exp(- A * T)

where:

A = DAMP * (V / I**2)

The resulting gray-level value (R) for the smoothed pixel is:

R = (P1*M1 + P2*M2 + ... +  Pn*Mn) / (M1 + M2 + ... + Mn)
where:

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

The following is an example of using a 5x5 filter on an 8x8 database image, where the DAMP (Damping Factor) parameter is set to 2.0.
          Image before filtering            Image after filtering

          8 8  8 9 9 9 7 6 6 6   6 6
          8 8  8 9 9 9 7 6 6 6   6 6
          +----------------+           +----------------+
          8 8 |8 9 9 9 7 6 6 6 | 6 6       |8 8 8 8 7 7 6 6 |
          8 8 |8 9 9 7 6 6 6 6 | 6 6       |8 8 8 7 7 6 6 6 |
          9 9 |9 8 8 6 6 6 6 6 | 6 6       |8 8 8 7 7 6 6 6 |
          9 9 |9 8 7 7 6 5 6 6 | 6 6       |8 7 7 7 6 6 6 6 |
          7 7 |7 7 7 6 6 6 6 6 | 6 6       |7 7 7 6 6 6 6 6 |
          6 6 |6 6 6 6 6 6 6 6 | 6 6       |7 7 6 6 6 6 6 6 |
          6 6 |6 6 6 6 6 6 6 5 | 5 5       |6 6 6 6 6 6 6 6 |
          6 6 |6 6 6 6 6 6 6 6 | 6 6       |6 6 6 6 6 6 6 6 |
          +----------------+           +----------------+
          6 6  6 6 6 6 6 6 6 6   6 6
          6 6  6 6 6 6 6 6 6 6   6 6
        

In this example, the filter does not have a full window. To rectify the situation, the edge pixels are replicated, hence the extra rows and columns of data outside the box in the Image before filtering section.

Back to top

References

V.S. Frost, J.A. Stiles, K.S. Shanmugan, and J.C. Holtzman, "A model for radar images and its application to adaptive digital filtering of multiplicative noise," IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 4, no. 2, pp. 157-166, March 1982.

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