FGA -- Gaussian Filter

Performs Gaussian filtering on image data.

Progress of this program can be monitored. See MONITOR section.

See Also: FAV, FED, FME, FMO, FPR, FAD, FLE, FSOBEL, FPRE, FSHARP

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

PARAMETERS

FGA is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
DBIC     Database Input Channel List             1         Int
DBOC     Database Output Channel List            1         Int
SIGMSQ   Square of Gaussian Filter Parameter     1-2       Real
MASK     Area Mask (Window or Bitmap)            0-4       Int

FILE

Specifies the name of the PCIDSK file containing channels to filter.

 EASI>FILE="filespec"

DBIC

Specifies the input channel to be filtered.

 EASI>DBIC=i

DBOC

Specifies the output channel for the filtered result.

 EASI>DBOC=j

SIGMSQ

Specifies the square of Gaussian distribution deviation:

 EASI>SIGMSQ=s                  | low-pass filter
 EASI>SIGMSQ=s1,s2              | band-pass filter
SIGMSQ must be in the range from 1.0 to 32.0.

MASK

Specifies the area in the input channel which should be processed. This can be one of the following:

 EASI> MASK=                      | process entire channel
 EASI> MASK=xoff,yoff,xsize,ysize | process window
 EASI> MASK=b                     | process only under bitmap
                                  | stored in segment b

DETAILS

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

If only one SIGMSQ value is specified, then FGA is a low-pass filter. FGA computes the weighted sum of the grey level values within a square filter window surrounding each pixel. The weights are the results of the Gaussian function with the given deviation. The filter window will be a square of size 2*SIGMSQ + 1.

If two SIGMSQ values are specified, then FGA is a band-pass filter. 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 will be 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 (DBIC) to be processed. If one value is specified, the required area is under specified bitmap segment. If four values are specified, the required area is under specified database window. If MASK is defaulted, the entire database is processed.

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

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 (i,j) is a pixel within the filter window, (u,v) is the centre of the filter window, and sigma**2 is the parameter SIGMSQ.

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 grey level of a filtered pixel is sum of W(i,j)*V(i,j) over all pixels in filter window, where V(i,j) is the original value at location (i,j).

All pixels in the image are filtered by FGA. In order to filter pixels located near edges of the image, it replicates edge pixel values to give sufficient data.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"           | turn monitor ON  (default)
 EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                             | running in batch/background mode)

EXAMPLE

A Gaussian filter with SIGMSQ=2 is used under bitmap 11 (Urban area) on 8-bit database channel 4 (Near Infra-Red) from IRVINE.PIX:

 EASI>FILE="IRVINE.PIX"
 EASI>DBIC=4                    | Near IR
 EASI>DBOC=8                    | Working channel
 EASI>SIGMSQ=2.0                | Filter 5x5
 EASI>MASK=11                   | Bitmap 11
 EASI>RUN FGA
A Gaussian filter with SIGMSQ=8,9 is used on the above image channel to detect intensity changes.

 EASI>FILE="IRVINE.PIX"
 EASI>DBIC=4                    | Near IR
 EASI>DBOC=8                    | Working area
 EASI>SIGMSQ=8.0,9.0            | Filter 19x19
 EASI>MASK=                     | Entire database
 EASI>RUN FGA

About PCI Help Gateway