Friday, October 24, 2025
HomeLanguagesPython – motion_blur() in Wand

Python – motion_blur() in Wand

Another kind of blur we can perform in Wand is Motion Blur. In this kind a Gaussian blur is performed in a single linear direction and it appears like image is moving in a linear direction. It takes a new angle parameter.
 

Syntax : 
 

Python3




wand.image.motion_blur(radius= radius_value, sigma= sigma_value,
             angle= angle_value, channel = "optional_channel_value")
# radius should always be greater than sigma(standard deviation)


Parameter :
 

Parameter Input Type Description
radius numbers.Real the radius of the, in pixels, not counting the center pixel.
sigma numbers.Real the standard deviation, in pixels
angle number.Real Apply the effect along this angle.
channel basestring Optional color channel to apply blur.

Image Used : 
 

Example 1: 
 

Python3




# import display() to show final image
from wand.display import display
# import Image from wand.image module
from wand.image import Image
 
# read file using Image function
with Image(filename ="koala.jpeg") as img:
 
    # perform motion blur effect using motion_blur() function
    img.motion_blur(radius = 16, sigma = 8, angle = 90)
 
    # save final image
    img.save(filename ="mb_koala.jpeg")
 
    # display final image
    display(img)


Output : 
 

Example 2: increase radius, sigma and changed angle to 45. 
 

Python3




# import display() to show final image
from wand.display import display
# import Image from wand.image module
from wand.image import Image
 
# read file using Image function
with Image(filename ="koala.jpeg") as img:
 
    # perform motion blur effect using motion_blur() function
    img.motion_blur(radius = 22, sigma = 10, angle = 45)
 
    # save final image
    img.save(filename ="gb_koala.jpeg")
 
    # display final image
    display(img)


Output : 
 

 

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32361 POSTS0 COMMENTS
Milvus
88 POSTS0 COMMENTS
Nango Kala
6728 POSTS0 COMMENTS
Nicole Veronica
11892 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11954 POSTS0 COMMENTS
Shaida Kate Naidoo
6852 POSTS0 COMMENTS
Ted Musemwa
7113 POSTS0 COMMENTS
Thapelo Manthata
6805 POSTS0 COMMENTS
Umr Jansen
6801 POSTS0 COMMENTS