當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python Wand enhance()用法及代碼示例

類似於despeckle()函數,此函數還可以減少圖像的噪點。 enhance()函數通過應用auto-filter返回圖像噪聲降低的圖像。

用法: wand.image.enhance()

參數:enhance()函數中沒有參數

源圖像:

範例1:



# Import Image from wand.image module 
from wand.image import Image 
  
# Read image using Image function 
with Image(filename ="koala.jpeg") as img:
    # reduce noise image using enhance() function 
    img.enhance() 
    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 ="road.jpeg") as img:
    # vignette image using vignette() function 
    img.enhance() 
    img.save(filename ="vkoala2.jpeg")

輸出:

相關用法


注:本文由純淨天空篩選整理自RahulSabharwal大神的英文原創作品 Wand enhance() function in Python。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。