Convolve Raster by Kernel
Overview
This tool applies convolution or statistical replacement to cell values within a neighborhood window. It is suitable for smoothing noise, enhancing edges, or extracting texture. Different kernels and boundary modes can significantly affect the output.
Use Cases
- Detect edges in raster imagery using Sobel, Scharr, Prewitt, or Roberts kernels.
- Enhance texture or gradients before visual interpretation and feature extraction.
- Use as an intermediate step in a longer raster processing workflow.
Parameters
| Parameter | Description | Notes |
|---|---|---|
| Input raster file | Raster file to process with convolution | Required |
| Kernel type | Convolution kernel type to use | Required; default: sobel_x; options include Sobel X edge detection (sobel_x), Sobel Y edge detection (sobel_y), Scharr X edge detection (scharr_x), Scharr Y edge detection (scharr_y), Prewitt X edge detection (prewitt_x), Prewitt Y edge detection (prewitt_y), Roberts X edge detection (roberts_x), Roberts Y edge detection (roberts_y), and others |
| Boundary mode | Boundary handling mode used during convolution | Required; default: reflect; options: reflect (reflect), constant fill (constant), nearest fill (nearest), mirror (mirror), wrap (wrap) |
| Boundary fill value | Fill value used when Boundary mode is constant | Optional; default: 0.0 |
| Convolution factor | Factor used to adjust kernel weights | Required; default: 1.0 |
| Output raster file | Output raster file after convolution | Required |
Steps
- Start the tool: Open Geoprocessing Toolbox → Spatial Analysis Tools > Visual Enhancement, then start the Convolve Raster by Kernel tool pane.
- Prepare input: Select the Input raster file and confirm that the data is complete and readable.
- Set core parameters: Configure Kernel type, Boundary mode, Boundary fill value, and Convolution factor based on the enhancement goal.
- Set output: Specify the Output raster file and confirm that the output path, format, and naming rules meet downstream requirements.
- Run and inspect the result: Click Run, then check whether the value range, edge response, and spatial position meet expectations.
Notes
- Convolution changes cell values and can amplify noise. Use the result cautiously for quantitative analysis.
- Boundary mode affects edge cells significantly; choose a mode that matches the data background and analysis goal.
- For multiband rasters, confirm that the same kernel behavior is appropriate for every band.