Pattern filters
A pattern filter always works in a 3x3 environment. For each neighbour, it checks whether the absolute difference between the value of the center pixel and the value of the neighbour is smaller than or equal to a specified threshold value. According to the position of a true neighbour, a certain bit is set. The value assigned to the output center pixel is the bitwise combination of all true neighbours.
The pattern filter is thus able to detect areas where pixels have more or less the same value (value 255 in the output map), outliers where there are large differences between the center pixel and all neighbouring pixel values (value 0 in the output map), and bitwise the directions in which differences are found (other output value).
As there is no standard pattern filter, you always use user-defined pattern filters: specify the threshold value.