The unsharp_mask() function is an inbuilt function in the Python Wand ImageMagick library which is used to sharpen an image. This function convolves the image with a Gaussian operator of the given radius and standard deviation.
Syntax:unsharp_mask(radius, sigma, amount, threshold, channel)
Parameters: This function accepts four parameters as mentioned above and defined below:
- Radius: This parameter stores the radius of the Gaussian blur effect.
- Sigma: This parameter stores the standard deviation of the Gaussian effect.
- Amount: This parameter stores the percentage of the difference between the original and the blur image that is added back into the original.
- Threshold: This parameter stores the threshold in pixels needed to apply the difference amount.
- Channel: This parameter is used to specify the value of image channel as undefined, ‘red’, ‘gray’, ‘cyan’, ‘green’, ‘magenta’, ‘blue’, ‘yellow’, ‘alpha’, ‘opacity’, ‘black’, ‘index’, ‘composite_channels’, ‘all_channels, ‘sync_channels’, ‘default_channels’.
Return Value: This function returns the Wand ImageMagick object.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course