Concept of Mask
The concept of a mask is also known as spatial filtering. Mask is a type of filter which performs operation directly on the image. The filter mask is also known as convolution mask.
To apply a mask on an image, filter mask is moved point to point on the image. In the original image, at each point(X, Y), filter is calculated by using a predefined relationship.
There are two types of filters:
A linear filter is the simplest filter. In linear filter, each pixel is replaced by the average of these pixel values. The entire linear filter works in the same way except when the weighted average is formed instead of a simple average.
The formula for a linear filter
Frequency Domain Filter
In frequency domain filter, an image is represented as the sum of many sine waves which have different frequencies, amplitudes and directions. The parameter of sine waves is referred to as Fourier coefficients.
Reasons for using this approach:
Filters are used for 2 purposes:
Blurring and noise reduction
Filters can be used for blurring as well as noise reduction from an image. Blurring is used to remove small details from an image. Noise reduction can also be done with the help of blurring.
Commonly used masks for blurring are:
Edge Detection and sharpness
Filters can be used for edge detection and sharpness. To increase the sharpness of an image, edge detection is used.