Sunday, June 14, 2026
HomeLanguagesPython – noise() function in Wand

Python – noise() function in Wand

Image noise is random variation of brightness or color information in images, and is usually an aspect of electronic noise. We can add noise to the image using noise() function. noise function can be useful when applied before a blur operation to defuse an image. Following are the noise we can add using noise() function:

  • gaussian
  • impulse
  • laplacian
  • multiplicative_gaussian
  • poisson
  • random
  • uniform

Syntax :

wand.image.noise(noise_type, attenuate, channel)

Parameters :

Parameter Input Type Description
noise_type numbers.Real Type of noise to apply.
attenuate numbers.Real Rate of distribution. Only available in ImageMagick-7. Default is 1.0.
channel basestring Optionally target a color channel to apply noise to.

Source Image:

  

Example 1: 

Python3




# Import Image from wand.image module
from wand.image import Image
 
# Read image using Image() function
with Image(filename ="koala.jpeg") as img:
 
    # Generate noise image using noise() function
    img.noise("poisson", attenuate = 0.9)
    img.save(filename ="noisekoala.jpeg")


Output:

  

Example 2: 

Python3




# Import Image from wand.image module
from wand.image import Image
 
# Read image using Image() function
with Image(filename ="koala.jpeg") as img:
 
    # Generate noise image using noise() function
    img.noise("laplacian", attenuate = 1.0)
    img.save(filename ="noisekoala2.jpeg")


Output:

 

RELATED ARTICLES

Most Popular

Dominic
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6897 POSTS0 COMMENTS
Nicole Veronica
12013 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7019 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6964 POSTS0 COMMENTS