Spatial Laplace filter
Spatial Laplace filter. See Wikipedia for general information.
The Spatial Laplace filter enhances and detects edges or areas of rapid intensity changes in an image by convolving it with a Laplacian kernel. The Laplacian kernel is a matrix that represents the discrete approximation of the Laplace operator, which calculates the sum of the second partial derivatives of the image with respect to the x and y directions. By convolving the image with the Laplacian kernel, the filter highlights areas of significant intensity changes, such as edges or transitions between regions with different intensities. It amplifies these intensity variations by emphasizing high-frequency components in the image.
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 laplace for information on different parameters.
Default:
from scipy.ndimage.filters import laplace function = lambda array: laplace(array)
Outputs
- Output raster layer [rasterDestination]
Raster file destination.
Command-line usage
>qgis_process help enmapbox:SpatialLaplaceFilter
:
----------------
Arguments
----------------
raster: Raster layer
Argument type: raster
Acceptable values:
- Path to a raster layer
function: Function
Default value: from scipy.ndimage.filters import laplace
function = lambda array: laplace(array)
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