mesakarghm

Sharpening an Image

Image Sharpening is an image enhancement technique which increases the contrast between bright and dark regions to bring out the features. Image Sharpening is used to highlight the edges and fine details in an image. We can use various sharpening filters, which performs an convolution operation to the existing image pixels to get a sharpened image. The sharpening filters are divided into the following groups:

• High Pass Filters
• Laplacian of Gaussian / Mexican Hat Filters

Here, I will show how to use a high pass filter to get the effect of image sharpening. A high pass filter lets high frequencies pass and reduces the lower frequencies and is extremely sensitive to shut noise. To construct a high-pass filter, the kernel coefficient should be set positive near the center of the kernel and should be set negative in the outer periphery.

One example of such high pass filter is :

$$\begin{bmatrix} -1/9 & -1/9 & -1/9\\ -1/9 & 1 & -1/9 \\ -1/9 & -1/9 & -1/9 \end{bmatrix}$$

This is just an example of one possible kernel for a sharpening filter. There can be many other filters which can be used for image sharpening.

Below I provide an all Python implementation, which uses the sharpening filter to sharpen a grayscale image.