Related Articles

Related Articles

Wand rotational_blur() function in Python
  • Last Updated : 22 Apr, 2020

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 :

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Parameter :

Parameter Input Type Description
angle basestring Degrees of rotation to blur with.
channel numbers.Real Optional channel to apply the effect against.

Image Used :

Example #1:



filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output :

Example #2: Increase angle to 30.

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output :

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :