convolution
Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49 elements.
The filter accepts the following options:
- '0m'
- '1m'
- '2m'
- '3m'
- '1m'
-
Set matrix for each plane. Matrix is sequence of 9, 25 or 49 signed integers in square mode, and from 1 to 49 odd number of signed integers in row mode.
- '0rdiv'
- '1rdiv'
- '2rdiv'
- '3rdiv'
- '1rdiv'
-
Set multiplier for calculated value for each plane. If unset or 0, it will be sum of all matrix elements.
- '0bias'
- '1bias'
- '2bias'
- '3bias'
- '1bias'
-
Set bias for each plane. This value is added to the result of the multiplication. Useful for making the overall image brighter or darker. Default is 0.0.
- '0mode'
- '1mode'
- '2mode'
- '3mode'
- '1mode'
-
Set matrix mode for each plane. Can be square, row or column. Default is square.
Command line examples
- Apply sharpen:
convolution="0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0"
- Apply blur:
convolution="1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9"
- Apply edge enhance:
convolution="0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:0 0 0 -1 1 0 0 0 0:5:1:1:1:0:128:128:128"
- Apply edge detect:
convolution="0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128"
- Apply laplacian edge detector which includes diagonals:
convolution="1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:1 1 1 1 -8 1 1 1 1:5:5:5:1:0:128:128:0"
- Apply emboss:
convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2"