Example binary filters
A binary filter interprets zero values in the input map as 0 (false), and all other defined values in the input map as 1 (true). For each 9 input pixels, these values are arranged in a special order or bit position:
5 |
6 |
7 |
|
4 |
8 |
0 |
|
3 |
2 |
1 |
where 0 means the last position, 1 the one but last position, etc.
This results in a binary number of 9 digits which solely depends on the position of true and false pixels in the input map. To decide whether the central pixel should be assigned a 0 or 1, the binary number is looked up in a table which is present in each binary filter itself.
0 |
0 |
0 |
|
0 |
0 |
0 |
|
1 |
1 |
1 |
See also: