Convolution¶
Usage: convolution(matrix_items, number_of_columns, should_normalize)
Description¶
This filter runs a convolution matrix (or kernel) on the image. See Kernel (image processing) for details on the process. Edge pixels are always extended outside the image area.
Arguments¶
matrix_items
- Semicolon separated matrix items.number_of_columns
- Number of columns in the matrix.should_normalize
- Whether or not we should divide each matrix item by the sum of all items.
Example¶
Normalized Matrix:
1 2 1
2 4 2
2 1 2
http://localhost:8888/unsafe/filters:convolution(1;2;1;2;4;2;1;2;1,3,true)/http://upload.wikimedia.org/wikipedia/commons/5/50/Vd-Orig.png
Matrix:
-1 -1 -1
-1 8 -1
-1 -1 -1
http://localhost:8888/unsafe/filters:convolution(-1;-1;-1;-1;8;-1;-1;-1;-1,3,false)/http://upload.wikimedia.org/wikipedia/commons/5/50/Vd-Orig.png