Skip to content
Related Articles

Related Articles

Improve Article

Wand wavelet_denoise() function in Python

  • Last Updated : 22 Jun, 2021

This method is same as removing noise from image using soften() function. But this method removes noise by applying a wavelet transform which is more convenient and effective. The threshold argument should be a value between 0.0 & quantum_range,
 

Syntax : 
 

wand.image.wave_denoise(threshold, softness)

Parameters : 

 

ParameterInput TypeDescription
thresholdnumbers.Reakvalue between 0.0 & quantum_range
softnessnumbers.Realapply softness to image

 



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:
 
    # denoise image using wave_denoise() function
    img.wavelet_denoise(threshold = 0.05 * img.quantum_range,
                        softness = 0.0)
    img.save(filename ="vkoala.jpeg")

Output: 
 

Example 2: Increasing threshold value 
 

Python3




# Import Image from wand.image module
from wand.image import Image
 
# Read image using Image function
with Image(filename ="koala.jpeg") as img:
 
    # vignette image using vignette() function
    img.wavelet_denoise(threshold = 0.065 * img.quantum_range,
                        softness = 0.00)
    img.save(filename ="vkoala2.jpeg")

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. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course




My Personal Notes arrow_drop_up
Recommended Articles
Page :