Neighbourhood Operations

Neighbourhood operations are a generalization of the point operations. A pixel in the processed image now depends not only on the corresponding pixel in the input image but also its neighbouring pixels. This generalization also allows for defining linear as well nonlinear filtering operations. An example of linear filtering in image editing is to produce a soft focus effect by smoothing away the fine details. Image denoising is another application where neighbourhood operations are very useful. During transmission, an image may get corrupted with salt and pepper noise, where isolated pixels turn black or white and stand out from their background. Performing a nonlinear filtering such as replacing a pixel by the median value of its neighbourhood values effectively removes the noise.

In this experiment, you will study the linear and non-linear operations. Specifically, you will study the effect of changing the size of the neighbourhood and the rule for combining the pixel values from the neighbourhood, on the result of processing.