5x5 Symmetric Convolution

Use the Grid and Image > Filters > 5x5 Symmetric Convolution menu option (GRIDFLT5 GX) to apply a 5x5 symmetric filter to a grid using any number of passes.

5x5 Symmetric Convolution dialog options

Input grid file

File Name of the Input Grid. (.grd file)

Script Parameter: GRIDFLT5.GRD

New resultant grid

File Name of New Grid. (.grd file)

Script Parameter: GRIDFLT5.NEW

OPTION 1 - Select a predefined filter

Name of pre-defined 5x5 symmetric filter. (option 1 of 3)

Script Parameter: GRIDFLT5.DEFFILT

OPTION 2 - Choose a filter file

Name of file containing 5x5 symmetric filter. (option 2 of 3)

Script Parameter: GRIDFLT5.FILT

OPTION 3 - Type a 6-Coef. filter string

6-coefficient filter string - 6 comma delimited numbers: e.g. 1,2,3,4,5,6 (option 3 of 3)

If none of the above parameters are set, the GX will default to using the "Least Square" filter! 

Script Parameter: GRIDFLT5.FILTSTR

Number of passes to apply

Number of filter Passes to apply to create the new grid.

Script Parameter: GRIDFLT5.PASS

Application Notes

The 5x5 symmetric filter consists of a 5x5 convolution symmetric matrix. They are used commonly in image processing applications.

There are three options to choose for defining the filter:

  1. You can enter the name of a pre-defined filter in the .DEFFILT parameter.
  2. Enter into the .FILT parameter the name of a filter file that you have created.
  3. You can enter the 6 coefficients of the filter as a command delimited string into the .FILTSTR parameter.

The choices of pre-defined filters are:

Least Square:

-0.07428

0.01142

0.04000

0.01142

-0.07428

0.01142

0.09714

0.12571

0.09714

0.01142

0.04000

0.12571

0.15428

0.12571

0.04000

0.01142

0.09714

0.12571

0.09714

0.01142

-0.07428

0.01142

0.04000

0.01142

-0.07428

Minimum Curvature:

0.0

0.0

-0.05

0.0

0.0

0.0

-0.1

0.4

-0.1

0.0

-0.05

0.4

0.0

0.4

-0.05

0.0

-0.1

0.4

-0.1

0.0

0.0

0.0

-0.05

0.0

0.0

A filter file contains the 6 filter coefficients starting with the centre point of the centre row, then continued with successive rows listed centre then the next right, then continued with successive rows listed centre to right. (e.g. the Least Square filter is: 0.15428, 0.12571, 0.09714, 0.04000, 0.01142, -0.07428) There cannot be any spaces within or between numbers, and the numbers themselves must be real numbers in the range of-1e31 to 1e32.

If you enter the 6 coefficients as a string, then enter them just like the above filter file format, using commas to delimit the values.

If any grid dummies within filter coverage (i.e. 5x5 area), dummies are replaced by interpolated values, except for the centre value if it is a dummy. The resultant grid will have the same coverage as the input grid.