Image Enhancement in Spatial Domain: Neighbourhood Processing Lecture 2(b)
Neighbourhood Processing We have seen that an image can be modified by applying a particular function to each pixel value whereby this is known as point processing. Neighbourhood processing may be considered as an extension of this, where a function is applied to a neighbourhood of each pixel. The idea is to move a mask/window/kernel: a rectangle (usually with sides of odd length) or other shape over the given image. As we do this, we create a new image whose pixels have grey values calculated from the grey values under the mask, as shown in Figure 3.1.
Neighbourhood Processing
Filter The combination of mask and function is called filter. If the function by which the new grey value is calculated is a linear function of all the grey values in the mask, then the filter is called a linear filter.
Linear Filter A linear filter can be implemented by multiplying all elements in the mask by corresponding elements in the neighbourhood, and adding up all these products. Suppose we have a 3 x 5 mask as illustrated below:
Linear Filter and that corresponding pixel values from an image are
Spatial Filtering
Spatial Filtering
Spatial Convolution
Linear Filtering Example (1)
Linear Filtering Example (1)
Linear Filtering Example (1)
Linear Filtering : Math Notation
Linear Filtering Example (2)
Edges of the Image
Filtering in Matlab
Separable Filters
Edge Sharpening
Edge Sharpening
Edge Sharpening
Edge Sharpening
Non-linear Filters A non-linear filter is obtained by a non-linear function of the greyscale values in the mask. Simple examples are the maximum filter, which has as its output the maximum value under the mask, and the corresponding minimum filter, which has as its output the minimum value under the mask. Examples: median filter, maximum filter, minimum filter