用法:
skimage.filters.butterworth(image, cutoff_frequency_ratio=0.005, high_pass=True, order=2.0, channel_axis=None)
應用巴特沃斯濾波器來增強高頻或低頻特征。
該濾波器在傅立葉域中定義。
- image:(M[, N[, ..., P]][, C]) ndarray
輸入圖像。
- cutoff_frequency_ratio:浮點數,可選
確定 cut-off 相對於 FFT 形狀的位置。
- high_pass:布爾型,可選
是否執行高通濾波器。如果為 False,則執行低通濾波器。
- order:浮點數,可選
影響cut-off 附近斜率的濾波器順序。更高階意味著頻率空間中的斜率更陡。
- channel_axis:整數,可選
如果有渠道維度,請在此處提供索引。如果無(默認),則所有軸都假定為空間維度。
- result:ndarray
Butterworth-filtered 圖像。
參數:
返回:
注意:
band-pass 濾波器可以通過組合高通和低通濾波器來實現。
文獻包含巴特沃斯濾波器函數形式的多種約定。在這裏,它被實現為 n 維形式
其中
cutoff_frequency_ratio
和 是在[2]之後建模的order
是空間頻率的絕對值, 是參考:
- 1
Butterworth, Stephen. “On the theory of filter amplifiers.” Wireless Engineer 7.6 (1930): 536-541.
- 2
Russ, John C., et al. “The image processing handbook.” Computers in Physics 8.2 (1994): 177-178.
例子:
分別對灰度和彩色圖像應用高通和低通巴特沃斯濾波器:
>>> from skimage.data import camera, astronaut >>> from skimage.filters import butterworth >>> high_pass = butterworth(camera(), 0.07, True, 8) >>> low_pass = butterworth(astronaut(), 0.01, False, 4, channel_axis=-1)
相關用法
- Python skimage.filters.unsharp_mask用法及代碼示例
- Python skimage.filters.rank.noise_filter用法及代碼示例
- Python skimage.filters.gaussian用法及代碼示例
- Python skimage.filters.threshold_otsu用法及代碼示例
- Python skimage.filters.rank.sum用法及代碼示例
- Python skimage.filters.window用法及代碼示例
- Python skimage.filters.gabor用法及代碼示例
- Python skimage.filters.rank.autolevel用法及代碼示例
- Python skimage.filters.threshold_li用法及代碼示例
- Python skimage.filters.rank.pop用法及代碼示例
- Python skimage.filters.rank.mean用法及代碼示例
- Python skimage.filters.rank.pop_bilateral用法及代碼示例
- Python skimage.filters.rank.maximum用法及代碼示例
- Python skimage.filters.roberts用法及代碼示例
- Python skimage.filters.rank.equalize用法及代碼示例
- Python skimage.filters.rank.enhance_contrast用法及代碼示例
- Python skimage.filters.rank.gradient用法及代碼示例
- Python skimage.filters.LPIFilter2D.__init__用法及代碼示例
- Python skimage.filters.farid用法及代碼示例
- Python skimage.filters.rank_order用法及代碼示例
- Python skimage.filters.threshold_niblack用法及代碼示例
- Python skimage.filters.rank.entropy用法及代碼示例
- Python skimage.filters.rank.otsu用法及代碼示例
- Python skimage.filters.gabor_kernel用法及代碼示例
- Python skimage.filters.difference_of_gaussians用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.filters.butterworth。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。