Sharpening with Laplacian

An image can be sharpened using the Laplacian filter with the following couple of steps:

  1. Apply the Laplacian filter to the original input image.
  2. Add the output image obtained from step 1 and the original input image (to obtain the sharpened image). The following code block demonstrates how to implement the preceding algorithm using scikit-image filters module's laplace() function:
from skimage.filters import laplace
im = rgb2gray(imread('../images/me8.jpg'))
im1 = np.clip(laplace(im) + im, 0, 1)
pylab.figure(figsize=(20,30))
pylab.subplot(211), plot_image(im, 'original image')
pylab.subplot(212), plot_image(im1, 'sharpened image')
pylab.tight_layout()
pylab.show()

The following is the output of the preceding code block, the original image, and the sharpened image using the previous algorithm:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.210.17