用法:
cucim.skimage.filters.gabor_kernel(frequency, theta=0, bandwidth=1, sigma_x=None, sigma_y=None, n_stds=3, offset=0, *, float_dtype=<class 'numpy.float64'>)
返回複雜的 2D Gabor 濾波器內核。
Gabor核是由複調和函數調製的高斯核。諧波函數由虛正弦函數和實餘弦函數組成。空間頻率與諧波的波長和高斯核的標準偏差成反比。帶寬也與標準偏差成反比。
- frequency:浮點數
調和函數的空間頻率。以像素為單位指定。
- theta:浮點數,可選
以弧度表示的方向。如果為 0,則諧波在 x 方向。
- bandwidth:浮點數,可選
濾波器捕獲的帶寬。對於固定帶寬,
sigma_x
和sigma_y
將隨著頻率的增加而減小。如果用戶設置了sigma_x
和sigma_y
,則忽略此值。- sigma_x, sigma_y:浮點數,可選
x- 和 y-directions 的標準偏差。這些方向適用於內核
before
旋轉。如果theta = pi/2
,則內核旋轉 90 度,以便sigma_x
控製vertical
方向。- n_stds:標量,可選
內核的線性大小為 n_stds(默認為 3)標準差
- offset:浮點數,可選
以弧度為單位的諧波函數的相位偏移。
- g:複數列
複雜的過濾器內核。
參數:
返回:
參考:
例子:
>>> import cupy as cp >>> from cucim.skimage.filters import gabor_kernel >>> from skimage import io >>> from matplotlib import pyplot as plt
>>> gk = gabor_kernel(frequency=0.2) >>> plt.figure() >>> io.imshow(cp.asnumpy(gk.real)) >>> io.show()
>>> # more ripples (equivalent to increasing the size of the >>> # Gaussian spread) >>> gk = gabor_kernel(frequency=0.2, bandwidth=0.1) >>> plt.figure() >>> io.imshow(cp.asnumpy(gk.real)) >>> io.show()
相關用法
- Python cucim.skimage.filters.gabor用法及代碼示例
- Python cucim.skimage.filters.gaussian用法及代碼示例
- Python cucim.skimage.filters.roberts_neg_diag用法及代碼示例
- Python cucim.skimage.filters.roberts_pos_diag用法及代碼示例
- Python cucim.skimage.filters.roberts用法及代碼示例
- Python cucim.skimage.filters.sobel_v用法及代碼示例
- Python cucim.skimage.filters.sobel_h用法及代碼示例
- Python cucim.skimage.filters.sobel用法及代碼示例
- Python cucim.skimage.filters.prewitt用法及代碼示例
- Python cucim.skimage.filters.difference_of_gaussians用法及代碼示例
- Python cucim.skimage.filters.rank_order用法及代碼示例
- Python cucim.skimage.filters.threshold_mean用法及代碼示例
- Python cucim.skimage.filters.threshold_niblack用法及代碼示例
- Python cucim.skimage.filters.threshold_isodata用法及代碼示例
- Python cucim.skimage.filters.threshold_otsu用法及代碼示例
- Python cucim.skimage.filters.median用法及代碼示例
- Python cucim.skimage.filters.prewitt_v用法及代碼示例
- Python cucim.skimage.filters.prewitt_h用法及代碼示例
- Python cucim.skimage.filters.threshold_sauvola用法及代碼示例
- Python cucim.skimage.filters.threshold_yen用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cucim.skimage.filters.gabor_kernel。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。