RasterConvolver
Accepts input features containing a raster geometry and outputs the features after applying a convolution filter to all the bands.
Convolution filters are applied using a kernel, specified by a matrix of weights for the neighboring values, over all the cells of an input raster geometry. Such filtering is used for smoothing, sharpening, enhancing edges and other raster image manipulation operations.
Input Ports
This transformer accepts only raster features
Output Ports
The output feature after applying a specified convolution filter to the input raster feature.
Non-raster features are output through this port.
Rejected Feature Handling: can be set to either terminate the translation or continue running when it encounters a rejected feature. This setting is available both as a default FME option and as a workspace parameter.
Parameters
Filter
The transformer provides a list of commonly used pre-defined convolution filters:
Convolution |
Kernel Divisor |
Kernel Size |
Kernel |
Operation |
|||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Blur: Box | Sum of weights (9) | 3 |
|
Sum | |||||||||||||||||||||||||
Blur: Gaussian 3 | Sum of weights (16) | 3 |
|
Sum | |||||||||||||||||||||||||
Blur: Gaussian 5 | Sum of weights (256) | 5 |
|
Sum | |||||||||||||||||||||||||
Dilate 3 | 1 | 3 |
|
Maximum | |||||||||||||||||||||||||
Dilate 5 | 1 | 5 |
|
Maximum | |||||||||||||||||||||||||
Edge Detection: Laplacian 3 | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Edge Detection: Laplacian 5 | 1 | 5 |
|
Sum | |||||||||||||||||||||||||
Edge Detection: Sobel Top | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Edge Detection: Sobel Left | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Edge Detection: Sobel Right | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Edge Detection: Sobel Bottom | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Emboss 3 | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Emboss 5 | 1 | 5 |
|
Sum | |||||||||||||||||||||||||
Erode 3 | 1 | 3 |
|
Minimum | |||||||||||||||||||||||||
Erode 5 | 1 | 5 |
|
Minimum | |||||||||||||||||||||||||
Gradient: East | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Gradient: North | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Gradient: North-East | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Gradient: North-West | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Gradient: South | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Gradient: South-East | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Gradient: South-West | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Gradient: West | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Line Detection: Horizontal | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Line Detection: Left Diagonal | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Line Detection: Right Diagonal | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Line Detection: Vertical | 1 | 3 |
|
Sum | |||||||||||||||||||||||||
Sharpen 3 | 1 | 3 |
|
Sum |
If the option User Defined is specified, Kernel Options can be used to specify a custom filter to be applied.
Kernel Options
Kernel size must be an odd number greater than or equal to 3. Only square kernels are supported, hence only one size parameter.
If Derived from Weights is selected, the number of weights specified in the Weights parameter will determine the kernel size.
This option specifies the neighborhood of the local values that will be participating in the calculation of the final value for each pixel.
If the Size parameter has been set to Derived from Weights, then the kernel weights must be specified as a space separated list of floating point values. The number of weights must be equal to the square of kernel size (for example, a length of 9 for kernel size of 3).
Specifying a weight of 0 signifies the cell will not participate in the calculation. This makes it possible to specify custom shapes of the kernel.
Weights may be both positive and negative floating point values. If integer weights are desired for better readability, consider using the Divisor parameter.
After applying a filter to every pixel, the final value can be adjusted with a divisor. Specifically, each weight will be divided by the divisor. Usually this divisor is implied by operations like Sum which imply dividing the sum of weights by the number of weights. This value is in addition to any implied operation division. Must be a non-zero floating point value.
Alternatively, the special value, Sum of Kernel Weights, can be specified and the divisor will be equal to the sum of kernel weights, instead of the usual number of kernel weights.
This option specifies which operation will be applied to the weighted neighboring values.
- Majority: Determines the value that occurs most often in the neighborhood.
- Maximum: Determines the maximum of the values in the neighborhood.
- Mean: Computes the mean of the values in the neighborhood.
- Median: Computes the median of the values in the neighborhood.
- Minimum: Determines the minimum value in the neighborhood.
- Minority: Determines the value that occurs least often in the neighborhood.
- Range: Determines the range of values in the neighborhood.
- Standard Deviation: Computes the standard deviation of the values in the neighborhood.
- Sum: Computes the sum of the values in the neighborhood.
- Variety: Determines the number of unique values in the neighborhood.
Advanced
Edge and Nodata Handling
When the pixel being processed is at the edge of the raster, some parts of the kernel might be outside the raster. This option specifies how the values outside the raster are handled.
Use Nodata Outside Raster: This is the default behavior. Kernel values that are outside the raster will be set to Nodata.
Extend Border Values: For the purpose of calculating edge values of the raster, the raster borders will be extended. This means that kernel values that are outside the raster will be set to the value of the nearest pixel in the raster.
The option determines Nodata handling if the center pixel of the kernel is Nodata.
- Output Nodata: This is the default behavior. Output Nodata if the center pixel is Nodata.
- Ignore Pixel Nodata: Center pixel will not participate in the calculation.
The options determines Nodata handling for the neighboring pixels.
- Use Center Pixel: This is the default behavior. With this option selected, all neighbor values will be set to the value of the center pixel.
- Ignore Pixel Nodata: The pixel will not participate in the calculation.
- No: This is the default behavior. Band interpretation for each band will be converted to Real64
- Yes: The original band will be preserved
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
FME Licensing Level
FME Professional edition and above
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.