-
Filtres: Indiscriminate filtering of raster values
Access this help text as a web page: Filtres
Presentation and options
This application generates a raster as the result of the application of a specified convolution filter to an input raster. Each pixel in the input raster is substituted in the output raster by the result of the calculation defined according to the filter. This calculation uses all the pixels in a square window, defined by the user, centered on the original pixel and which has an odd number of pixels along each side.
Usually, pixels containing NoData values are not used in the calculation. In the case where the number of valid values within the window is less than the number of NoData values, then the user may choose either to set NoData in those pixels or to perform the calculation with the reduced number of pixels. Using an optional parameter it is possible to invert this behavior and force the application to work only with NoData pixels in order to selectively eliminate them.
The output raster will be of the same type as the input. Consequently, if the input raster is byte and you want the result in real numbers, you should convert the input raster into real with IMGIMG.
In the current MiraMon version the following filters are defined. These will be added to in future versions:
- Mode: Smoothing or indiscriminate generalization filter for classified rasters. The FagoVal application usually produces better results by applying selective generalizations.
- Average: Smoothing filter for continuous rasters.
- Median: Smoothing filter suitable for any type of treatment. It should be noted that each time 2 different central values are found, the value of one of them will be chosen alternatively (in contrast, in the CombiCap application, the average of the 2 central values is chosen if the data is quantitative). In this case, it is preferred that the median filtering procedure does not generate possible values in the result that do not exist in the origin image.
- Standard deviation: Determines the spread of the values in the neighborhood of a pixel. The higher the value the "rougher" the texture around a pixel. Not suitable for use with classified rasters.
- Variability: Gives a measure of the number of pixels that are different to the modal value. Adequate for categoric rasters. May be an indirect autocorrelation indicator and a filter for detecting an object's perimeter.
- Minimum: Determines the local minimum within the window.
- Maximum: Determines the local maximum within the window.
- Laplacian: In the case of the 3x3 window, this rectangular Laplacian filter can be applied where all elements other than the central one have a weight of -1 and the central one a weight of 9, without the need to use the procedure of applying a variable weight window. In order to use this last procedure it is possible to choose the corresponding option within predefined matrices.
- Pre-defined matrix: Allows to choose one of the predefined filters corresponding to matrices of variable weights. The filter collection is hosted in the MiraMon directory within a set of filter files with the mft extension. This collection basically incorporates different types of smoothing and edge detection and reinforcement filters. New versions of the application will progressively add new elements to the current collection.
- User matrix: Allows to explicitly define the different weights of the matrix to be applied. Once defined, it can be saved in any address (highly recommended other than the MiraMon directory) to use in subsequent executions and thus complete the collection of predefined filters.
The weights file is a text file in INI format, which includes all the parameters necessary to correctly apply the filter. In the example its format with the different keys and sections and their correspondence in the graphical interface can be seen.

Dialog box of the application

Syntax
Syntax:
- Filtres Option InputFile OutputFile ConvolWin [/NODATA_MAJORITARI] [/NOMES_SOBRE_NODATA] [/RECLASS_NODATA] [/RLE] [/PESOS] [/NORMALITZAR] [/DIVISOR] [/F_PESOS]
Options:
- 1. for the mode filter
- 2. for the average
- 3. for standard deviation
- 4. for variability
- 5. for minimum
- 6. for maximum
- 7. laplacian 3x3
- 8. pre-defined matrix.
- 9. user matrix.
- 10. median.
Parameters:
- InputFile
(Input File -
Input parameter): The input raster file.
- OutputFile
(Output File -
Output parameter): Is the output raster file.
- ConvolWin
(Convolution Window -
Input parameter): Is the length of the edge of the convolution window (an odd number)
Modifiers:
/NODATA_MAJORITARI
(Assigns NoData)
Assigns NoData when there are less valid values in the convolution window. (Input parameter) /NOMES_SOBRE_NODATA
(Only NoData)
Apply the filter only in NoData pixels. (Input parameter) /RECLASS_NODATA
(Reclassify NoData)
Valid value to NoData after filter. (Input parameter) /RLE
(Compressed and indexed)
Output file will be compressed and indexed. (Input parameter) /PESOS=
(Weights)
matrix of weights (Input parameter) /NORMALITZAR
(Normalize)
Normalize. (Input parameter) /DIVISOR=
(Divisor)
Divisor (Input parameter) /F_PESOS=
(Weight file)
Weight File. (Input parameter)
