Raster & Image Processing and Removal Filters TNTmips provides several sets of image filters that can be applied to grayscale or color images temporarily as a Display option (using the Filter tabbed panel on the Raster Layer Display Controls window) or permanently using the Spatial Filters proces (Image / Filter / Spatial Filter). For ease of selection these spatial filters are organized into groups based on their purpose. To select a filter, choose the filter group from the Type menu and the specific filter from the Filter menu (see the Technical Guide entitled Spatial Filter Process). Filters in the Smoothing and Noise Removal group are designed to reduce detail and remove “noise” from an image. occurs as local extreme (outlier) cell values that are very different from the majority of the surrounding cell values. Distinguishing noise from desired image detail is difficult, however, so loss of valid image detail (blurring) also occurs when smoothing / filters are applied. You can blend the source image and the filter result in any proportion using the Blending slider to vary the amount of smoothing in the final blended result. Smoothing filters (especially the filter) are also Sample Grayscale Image commonly used prior to applying edge-detection filters, which are sensitive to image noise. The Low Pass / Average and Gaussian filters are simple filters that use a set of kernel coefficients (weights) to process values in the filter window. In the Spatial Filters process the weights for these filters can be viewed and edited on the Kernel tabbed panel. The remaining filters in this group do not use kernel coefficients, so the Kernel panel is inactive when they are selected. Many of these filters are designed to preserve valid image detail while removing random noise. Some of the filters in this group have a user-defined parameter (its name varies depending on the filter) that can be adjusted using a slider control.

Low Pass / Average The shape of the The Low Pass/Average Gaussian kernel function filter computes the is set by the Sigma pa- simple average (mean) rameter with a value of the cells in the filter expressed in decimal window. All of the numbers of standard weights in the filter ker- deviations. A larger value nel have a default value of Sigma results in a of 1.0. This filter can broader, less peaked be used to remove noise Gaussian kernel func- and emphasize general tion, more weight given brightness trends, but to more distant cells in results in some blurring the filter window, of edges, general loss of Low Pass / Average, 5 x 5 greater smoothing, and Gaussian Blur, 5 x 5, Sigma = 1.0 detail, and reduction in less preservation of edges. image contrast. These effects increase as the size of the filter window increases. Because the value of the local mean is influenced by extreme values of noise cells, the Low Pass / The ranks Average filter is less successful at removing noise than the the input cell values in other filters in the Smoothing group. the filter window in nu- merical order and Gaussian Blur assigns the median value The is a convolution filter in which the filter (middle value in the rank weight values vary across the filter kernel according to the order) as the output. shape of a Gaussian distribution (a normal-frequency bell-shaped Because the output curve) in two dimensions. The highest weight value is in the value is not affected by center of the kernel (corresponding to the value of the cell the actual value of out- being filtered) and the weight values decrease with distance lier cells within the filter from the center . The resulting weighted average is thus window, the Median fil- heavily biased toward the center cell and its immediate neigh- Median, 5 x 5 ter is particularly good bors, which means that the Gaussian Blur filter preserves edges at removing isolated random noise. The Median filter preserves better than the simpler Low Pass / Average filter. (over)

MicroImages, Inc. • TNTgis - Advanced Software for Geospatial Analysis Voice (402)477-9554 • FAX (402) 817-0151 • email [email protected] • web www.microimages.com • May 2014 edges better than the Low Pass / Average filter, but thin lines filter preserves edges (narrower than the filter window dimensions) can be removed. better than the simple Modal median filter, but does The Modal filter evalu- not smooth small-scale ates the raster values in noise as well. the filter window and P-Median (PM) assigns the mode (most The P-Median filter is frequent value) as the designed to suppress filter result. If no im- noise while preserving age value occurs more edge and line detail. The than once in the filter filter calculates median window, the input cell values for two subsets value is used. The of the values in the filter Multi Level Median, 7 x 7 Modal filter produces window: 1) combined considerable smooth- horizontal and vertical Modal, 3 x 3 ing, but can produce transects through the irregular shifts in edges, which make them appear ragged. Since center cell, and 2) two no averaging is performed, this filter is appropriate to use to diagonal transects simplify a categorical (class) raster in which the cell values through the center cell. serve only as labels and have no numerical significance. These two median val- Olympic ues are then averaged. The Olympic filter is a The PM filter preserves variant of a low pass edges better than the (averaging) filter. It is simple median filter, but named for the system of provides less noise sup- scoring used in certain pression in uniform P-Median, 5 x 5 Olympic events, in regions. which the highest and Adaptive Mean P-Median (AMPM) lowest scores are The Adaptive Mean P- dropped and the re- Median filter is a variant maining ones averaged. of the P-Median filter The Olympic filter ranks that is designed to pro- the values within the fil- vide better smoothing in ter window and discards Olympic, 5 x 5, Clip = 8 uniform regions while a range of high and low values before calculating the mean of still preserving edges those remaining. Because extreme values are excluded, the and line detail. The filter averaged result is less influenced by outlier values than the first classifies the cen- simple Low Pass / Average filter, but it can still blur edges and ter cell in the filter remove fine detail. The Clip setting for this filter is an integer window as belonging to value that sets the number of values discarded at each end of either a uniform region the distribution. Increasing the Clip value reduces the number or an edge region. The of image values used in the averaged result, which tends to AMPM filter then ap- Adaptive Mean P-Median, 3 x 3, Speckle Smoothing = 3.0 reduce the blurring of discrete sharp edges but makes areas of plies the P-Median filter fine-scale variability appear more uniform. in windows containing edges, but uses a simple averaging fil- Multi Level Median (MLM) ter in windows with relatively uniform values. The Speckle The MLM filter is designed to reduce image noise (outlier val- Smoothing parameter value controls the initial classification or ues) while preserving edges, corners, and thin line detail in the uniform or edge by setting a threshold value expressed as the image. The filter calculates separate median values for hori- fractional number of standard deviations from the mean. If zontal, vertical, and two diagonal transects through the central the center cell value exceeds the threshold, the window is des- cell in the filter window. The minimum and maximum of these ignated as an edge and the P-Median filter is applied. Increasing four values are then found. The minimum, maximum, and origi- values of the Speckle Smoothing setting increase the propor- nal center raster value are then ranked, and the median of these tion of the image designated as uniform and subject to the three values is assigned as the filter output value. The MLM averaging procedure, producing a smoother image with less preservation of edges and fine detail.

MicroImages, Inc. • TNTgis - Advanced Software for Geospatial Analysis Voice (402)477-9554 • FAX (402) 817-0151 • email [email protected] • web www.microimages.com • May 2014