Example linear filters

An example of a linear filter is for instance the standard AVG3x3 filter. This filter contains the following values in its matrix:

  

1

1

1

1

1

1

1

1

1

  

Gain factor 0.111111

When 9 values in an input map are:

  

17

22

18

21

15

18

17

20

23

The AVG3x3 filter calculates:

(1*17 + 1*22 + 1*18 +

1*21 + 1*15 + 1*18 +

1*17 + 1*21 + 1*23 ) * 0.111111 = 19

The output value assigned to the central pixel is 19.

Also, you can create your own user-defined linear filters (defining filter size, matrix value, and gain), and user-defined average filters (defining filter size).