FFmpeg 3.1.11
Since* 3.0
#

Apply convolution 3x3 or 5x5 filter.

The filter accepts the following options:

0m, 1m, 2m, 3m

Set matrix for each plane. Matrix is sequence of 9 or 25 signed integers.

0rdiv, 1rdiv, 2rdiv, 3rdiv

Set multiplier for calculated value for each plane.

0bias, 1bias, 2bias, 3bias

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.

#

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 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"