PEPPSALT filter

The Pepper&Salt (PEPPSALT) filter is a standard binary filter which works in a 3x3 environment. This filter can be used to remove 'noise' from an image.

When in the input map, the center pixel is 0 and all neighbours are non-zero, then value 1 will be assigned to the center pixel in the output map.

When in the input map, the center pixel is 1 and at least one neighbour is true as well, then value 1 will be assigned to the center pixel in the output map also.

In other cases value 0 will be assigned.

The result of using the PEPPSALT filter is that only the single true pixels and single false pixels are filtered out.

  

Input:

Output:

See also: