Open In App
Related Articles

Wand rotational_blur() function in Python

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

Another type of Blur that can be performed in Wand python library is rotational blur. Rotational Blur is quite similar to Motion Blur but in this the motion of blur is circular. rotational_blur() function blur an image in a radius around the center of an image. Unlike the other blur methods, there is no radius or sigma arguments.

Syntax :

Python3

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

                    

Parameter :

ParameterInput TypeDescription
anglebasestringDegrees of rotation to blur with.
channelnumbers.RealOptional channel to apply the effect against.

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 rotational blur effect using rotational_blur() function
    img.rotational_blur(angle = 10)
 
    # save final image
    img.save(filename ="rb_koala.jpeg")
 
    # display final image
    display(img)

                    

Output :

  

Example #2: Increase angle to 30. 

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 rotational blur effect using rotational_blur() function
    img.rotational_blur(angle = 30)
 
    # save final image
    img.save(filename ="gb_koala.jpeg")
 
    # display final image
    display(img)

                    

Output :

 



Last Updated : 27 Mar, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials