Python – Adaptive Blur in Wand
Last Updated :
18 Oct, 2021
Adaptive Blur is a kind of blur. The only difference is that blur intensity around the detectable edges in image is less while, it is greater on areas without edges. Adaptive Blur can be done using adaptive_blur function.
Syntax :
Python3
wand.image.adaptive_blur(radius = "radius_value" ,
sigma = "sigma_value" ,
channel = "optional_channel_value" )
|
Parameters :
Parameter |
Input Type |
Description |
radius |
numbers.real |
the radius of the, in pixels, not counting the center pixel. Default is 0.0. |
sigma |
numbers.real |
the standard deviation of the, in pixels. Default value is 0.0. |
channel |
basestring |
Optional color channel to apply blur. |
Example #1:
Python3
from wand.image import Image
with Image(filename = "gfg.png" ) as img:
img.adaptive_blur(radius = 8 , sigma = 4 )
img.save(filename = "adblur_gfg.png" )
|
Output:
Example #2:
Python3
from wand.image import Image
with Image(filename = "koala.jpeg" ) as img:
img.blur(radius = 8 , sigma = 3 )
img.save(filename = "adblur_koala.jpeg" )
|
Output:
Share your thoughts in the comments
Please Login to comment...