📜  Wand – Python中的 blur()函数

📅  最后修改于: 2022-05-13 01:55:42.788000             🧑  作者: Mango

Wand – Python中的 blur()函数

模糊图像意味着使图像模糊或模糊。模糊图像是不确定的,无法清楚地看到图像。模糊有多种类型,例如 - 自适应模糊、高斯模糊、选择性模糊等。为了模糊图像,我们使用blur()函数。 blur()函数接受三个参数。

例子 :

示例 #1:

输入图像 -

wand.image.blur(radius="radius_value", 
                  sigma="sigma_value",  
    channel = "optional_channel_value")

输出:

示例 #2:

输入图像 -

# import Image from wand.image module
from wand.image import Image
  
# read file using Image function
with Image(filename ="koala.jpeg") as img:
  
    # perform blur effect using blur() function
    img.blur(radius = 0, sigma = 3)
  
    # save final image
    img.save(filename ="blur_koala.jpeg")

输出: