Unsharp masking

Unsharp masking is a technique to sharpen images, where a blurred version of an image is subtracted from the image itself. The typical blending formula used for unsharp masking is as follows: sharpened = original + (original − blurred) × amount.

Here, amount is a parameter. The next few sections demonstrate how to implement this with the ndimage module of SciPy functions in Python.

Get Hands-On Image Processing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.