Filter types |
Example binary filters |
Binary filters |
|
Binary filters are used to morphologically filter binary structures or objects in images or other maps. You can for instance enhance the outlines of a structure by making (the edges of) structures 1 pixel wider in any direction (dilate), by making (the edges of ) structures 1 pixel smaller in any direction (shrink), etc.
In short, binary filters are 3 by 3 filters that consider defined values unequal to zero in the input map as true values (the 'structures') and zero values in the input map as false. Depending on the number and position of true and false values of a central pixel and its 8 neighbours, a 9 digit binary number is produced which determines whether a 0 (false) or a 1 (true) should be returned for the pixel in the output map.
This means that:
Each 9 binary pixels examined by a binary filter are put in a special order or bit position as below (where 0 means the last position, 1 the one but last position, etc.):
5 |
6 |
7 |
|
4 |
8 |
0 |
|
3 |
2 |
1 |
This results in a binary number of 9 digits (when only lower right pixel is true: 000000010). Thus depending on the position of true pixels in the input map a unique number is obtained. 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.
Standard binary filters:
The standard binary filters are: BINMAJOR, CONN8TO4, DILATE4, DILATE8, SHRINK4, SHRINK8, INBND4, INBND8, OUTBND4, OUTBND8, PEPPSALT, LIFEGAME.
User-defined binary filters:
There are no possibilities in ILWIS to define your own binary filters. However, you could copy an existing binary filter (*.FIL), edit it with an ASCII editor like Notepad and thus create your own binary filter.
Only Pattern filters, which work more or less the same as binary filters, can be user-defined via the Filter dialog box or the command line.
See also: