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.wavelet_denoise(threshold, softness)Parameters :
Parameter Input Type Description threshold numbers.Real value between 0.0 & quantum_range softness numbers.Real apply 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 wavelet_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:
# denoise image using wavelet_denoise() function
img.wavelet_denoise(threshold = 0.065 * img.quantum_range,
softness = 0.00 )
img.save(filename = "vkoala2.jpeg" )
|
Output:
Article Tags :