用法:
skimage.filters.gabor(image, frequency, theta=0, bandwidth=1, sigma_x=None, sigma_y=None, n_stds=3, offset=0, mode='reflect', cval=0)
將實數和虛數響應返回給 Gabor 濾波器。
Gabor 濾波器內核的實部和虛部應用於圖像,響應以一對數組的形式返回。
Gabor濾波器是一種具有高斯核的線性濾波器,由正弦平麵波調製。 Gabor 濾波器的頻率和方向表示類似於人類視覺係統的表示。 Gabor 濾波器組通常用於計算機視覺和圖像處理。它們特別適用於邊檢測和紋理分類。
- image:二維陣列
輸入圖像。
- frequency:浮點數
調和函數的空間頻率。以像素為單位指定。
- theta:浮點數,可選
以弧度表示的方向。如果為 0,則諧波在 x 方向。
- bandwidth:浮點數,可選
濾波器捕獲的帶寬。對於固定帶寬,
sigma_x
和sigma_y
將隨著頻率的增加而減小。如果用戶設置了sigma_x
和sigma_y
,則忽略此值。- sigma_x, sigma_y:浮點數,可選
x- 和 y-directions 的標準偏差。這些方向適用於內核前回轉。如果theta = pi/2,然後內核旋轉 90 度,使得
sigma_x
控製垂直的方向。- n_stds:標量,可選
內核的線性大小是 n_stds(默認為 3)標準差。
- offset:浮點數,可選
以弧度為單位的諧波函數的相位偏移。
- mode:{‘constant’, ‘nearest’, ‘reflect’, ‘mirror’, ‘wrap’},可選
用於將圖像與內核卷積的模式,傳遞給ndi.convolve
- cval:標量,可選
填充過去輸入邊的值,如果
mode
卷積是‘constant’。參數傳遞給ndi.convolve.
- real, imag:數組
使用 Gabor 濾波器內核的實部和虛部過濾圖像。圖像的尺寸與輸入的尺寸相同。
參數:
返回:
參考:
例子:
>>> from skimage.filters import gabor >>> from skimage import data, io >>> from matplotlib import pyplot as plt
>>> image = data.coins() >>> # detecting edges in a coin image >>> filt_real, filt_imag = gabor(image, frequency=0.6) >>> plt.figure() >>> io.imshow(filt_real) >>> io.show()
>>> # less sensitivity to finer details with the lower frequency kernel >>> filt_real, filt_imag = gabor(image, frequency=0.1) >>> plt.figure() >>> io.imshow(filt_real) >>> io.show()
相關用法
- Python skimage.filters.gabor_kernel用法及代碼示例
- Python skimage.filters.gaussian用法及代碼示例
- Python skimage.filters.unsharp_mask用法及代碼示例
- Python skimage.filters.rank.noise_filter用法及代碼示例
- Python skimage.filters.threshold_otsu用法及代碼示例
- Python skimage.filters.rank.sum用法及代碼示例
- Python skimage.filters.window用法及代碼示例
- 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用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.filters.gabor。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。