Spatial Percentile filter
Spatial Percentile filter.
A Spatial Percentile Filter is an image filtering technique that aims to enhance or suppress certain features in an image based on their intensity values. It is a non-linear filter that replaces the value of a pixel with a specified percentile value of its neighborhood.
Usage:
Start the algorithm from the Processing Toolbox panel.
Select the raster to process and modify the parameterization if necessary, then click run.
Processed image in comparison to the original.
Parameters
- Raster layer [raster]
Raster layer to be processed band-wise.
- Function [string]
Python code. See percentile_filter for information on different parameters. Default:
from scipy.ndimage.filters import percentile_filter function = lambda array: percentile_filter\(array, percentile=50, size=3\)
Outputs
- Output raster layer [rasterDestination]
Raster file destination.
Command-line usage
>qgis_process help enmapbox:SpatialPercentileFilter
:
----------------
Arguments
----------------
raster: Raster layer
Argument type: raster
Acceptable values:
- Path to a raster layer
function: Function
Default value: from scipy.ndimage.filters import percentile_filter
function = lambda array: percentile_filter(array, percentile=50, size=3)
Argument type: string
Acceptable values:
- String value
- field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field
- expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression
outputRaster: Output raster layer
Argument type: rasterDestination
Acceptable values:
- Path for new raster layer
----------------
Outputs
----------------
outputRaster: <outputRaster>
Output raster layer