Filters can be used to enhance the appearance of an image. The filter can be viewed as a matrix that is moved over the image. Each value in the filter is multiplied by the value in the image underneath it, and then the sum replaces the value at the center of the filter. Filters can also be applied to DEMs or others grids, either to enhance trends or to smooth out random noise or generalize the map.

Filters can be used to smooth or average the image, sharpen the image, or search for edges.

Filtering is available:

- On the
**Raster GIS menu for DEMs or other grids including Multi-grids. For these you can get larger sizes using mean, median, min, and max filters compared to imagery.** - On the Imagery analysis menu, create new band for satellite imagery.

An unweighted averaging or smoothing filter would look like this:

1 | 1 | 1 |

1 | 1 | 1 |

1 | 1 | 1 |

Smoothing filters included with MICRODEM include AV-5x5.fil, AV-7x7.fil, AV-9x9.fil, and SMOOTH.FIL.

A sharpening filter might look like this:

-1 | -1 | -1 |

-1 | 9 | -1 |

-1 | -1 | -1 |

The sharpening or coarsening filter will enhance differences. If a pixel had the same value as its neighbors, their eight values would be subtracted from nine times the central value, and the result would be the same at the initial central value.

Sharpening filters included with MICRODEM include DIAGLINE.FIL, VERTLINE.FIL, DIAGLINE.FIL, EDGE.FI, and Laplacian of Gaussian (LoG) filter. See examples of these edge filters with NAIP imagery.

MICRODEM allows only square filters (number of rows equals the number of columns); the current maximum size is 15x15. Values in the filter must be integers; the final result will be divided by the sum of the values in the filter to insure that the average value of the image will not change.

TM Band 4, no filter | TM band 4, sharpening (diagonal) filter applied | TM Band 4, smoothing filter (9x9) applied. |

*Last revision 3/7/2017*