此方法與使用soften()
函數。但是這種方法通過應用更方便和有效的小波變換來消除噪聲。閾值參數的值應介於0.0和quantum_range之間,
用法:
wand.image.wave_denoise(threshold, softness)
參數:
參數 | 輸入類型 | 描述 |
---|---|---|
threshold | numbers.Reak | 值介於0.0和quantum_range之間 |
softness | numbers.Real | 使圖像柔和 |
源圖像:
範例1:
# 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")
輸出:
範例2:閾值增加
# 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")
輸出:
相關用法
- Python Wand function()用法及代碼示例
- Python Wand gaussian_blur()用法及代碼示例
- Python Wand transform()用法及代碼示例
- Python Wand crop()用法及代碼示例
- Python Wand rotational_blur()用法及代碼示例
- Python Wand Image()用法及代碼示例
- Python Wand shade()用法及代碼示例
- Python Wand sharpen()用法及代碼示例
- Python Wand adaptive_sharpen()用法及代碼示例
- Python Wand noise()用法及代碼示例
- Python Wand blue_shift()用法及代碼示例
- Python Wand color_matrix()用法及代碼示例
- Python Wand unsharp_mask()用法及代碼示例
- Python Wand colorize()用法及代碼示例
- Python Wand fx()用法及代碼示例
注:本文由純淨天空篩選整理自RahulSabharwal大神的英文原創作品 Wand wavelet_denoise() function in Python。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。