用法:
skimage.feature.blob_dog(image, min_sigma=1, max_sigma=50, sigma_ratio=1.6, threshold=0.5, overlap=0.5, *, threshold_rel=None, exclude_border=False)
在給定的灰度圖像中查找 blob。
使用高斯差分 (DoG) 方法 [1] 、 [2] 找到 Blob。對於找到的每個 blob,該方法返回其坐標和檢測到 blob 的高斯核的標準偏差。
- image:ndarray
輸入灰度圖像,假設斑點在深色背景上是亮的(黑底白字)。
- min_sigma:標量或標量序列,可選
高斯核的最小標準差。保持這個低以檢測較小的斑點。每個軸的高斯濾波器的標準偏差作為一個序列或單個數字給出,在這種情況下,它對所有軸都是相等的。
- max_sigma:標量或標量序列,可選
高斯核的最大標準偏差。保持這個高以檢測更大的斑點。每個軸的高斯濾波器的標準偏差作為一個序列或單個數字給出,在這種情況下,它對所有軸都是相等的。
- sigma_ratio:浮點數,可選
用於計算高斯差的高斯核的標準差之間的比率
- threshold:浮點數或無,可選
尺度空間最大值的絕對下限。小於閾值的局部最大值被忽略。減少它以檢測強度較低的斑點。如果還指定了threshold_rel,則將使用較大的閾值。如果沒有,則使用threshold_rel。
- overlap:浮點數,可選
一個介於 0 和 1 之間的值。如果兩個斑點的麵積重疊的部分大於閾值,則消除較小的斑點。
- threshold_rel:浮點數或無,可選
峰的最小強度,計算為
max(dog_space) * threshold_rel
,其中dog_space
指內部計算的Difference-of-Gaussian (DoG) 圖像堆棧。這應該有一個介於 0 和 1 之間的值。如果沒有,臨界點改為使用。- exclude_border:ints、int 或 False 的元組,可選
如果是整數元組,則元組的長度必須與輸入數組的維度匹配。元組的每個元素將排除沿著該維度的圖像邊界的 exclude_border 像素內的峰值。如果整數非零,則 exclude_border 排除圖像邊界的 exclude_border 像素內的峰值。如果為零或假,則無論峰與邊界的距離如何,都會識別峰。
- A:(n, image.ndim + sigma) ndarray
一個 2d 數組,每行表示 2D 圖像的 2 個坐標值,或 3D 圖像的 3 個坐標值,加上使用的 sigma。當通過單個 sigma 時,輸出為:
(r, c, sigma)
或(p, r, c, sigma)
其中(r, c)
或(p, r, c)
是 blob 的坐標,sigma
是檢測到 blob 的高斯內核的標準偏差。當使用各向異性高斯函數(每個維度的 sigma)時,會為每個維度返回檢測到的 sigma。
參數:
返回:
注意:
對於 2-D 圖像,每個 blob 的半徑約為 ,對於 3-D 圖像,其半徑約為 。
參考:
- 1
https://en.wikipedia.org/wiki/Blob_detection#The_difference_of_Gaussians_approach
- 2
Lowe, D. G. “Distinctive Image Features from Scale-Invariant Keypoints.” International Journal of Computer Vision 60, 91-110 (2004). https://www.cs.ubc.ca/~lowe/papers/ijcv04.pdf DOI:10.1023/B:VISI.0000029664.99615.94
例子:
>>> from skimage import data, feature >>> coins = data.coins() >>> feature.blob_dog(coins, threshold=.05, min_sigma=10, max_sigma=40) array([[128., 155., 10.], [198., 155., 10.], [124., 338., 10.], [127., 102., 10.], [193., 281., 10.], [126., 208., 10.], [267., 115., 10.], [197., 102., 10.], [198., 215., 10.], [123., 279., 10.], [126., 46., 10.], [259., 247., 10.], [196., 43., 10.], [ 54., 276., 10.], [267., 358., 10.], [ 58., 100., 10.], [259., 305., 10.], [185., 347., 16.], [261., 174., 16.], [ 46., 336., 16.], [ 54., 217., 10.], [ 55., 157., 10.], [ 57., 41., 10.], [260., 47., 16.]])
相關用法
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_log用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.feature.graycoprops用法及代碼示例
- Python skimage.feature.corner_orientations用法及代碼示例
- Python skimage.feature.structure_tensor用法及代碼示例
- Python skimage.feature.hessian_matrix用法及代碼示例
- Python skimage.feature.ORB用法及代碼示例
- Python skimage.feature.corner_subpix用法及代碼示例
- Python skimage.feature.canny用法及代碼示例
- Python skimage.feature.peak_local_max用法及代碼示例
- Python skimage.feature.CENSURE用法及代碼示例
- Python skimage.feature.hessian_matrix_eigvals用法及代碼示例
- Python skimage.feature.corner_foerstner用法及代碼示例
- Python skimage.feature.haar_like_feature_coord用法及代碼示例
- Python skimage.feature.corner_harris用法及代碼示例
- Python skimage.feature.corner_fast用法及代碼示例
- Python skimage.feature.BRIEF用法及代碼示例
- Python skimage.feature.haar_like_feature用法及代碼示例
- Python skimage.feature.SIFT用法及代碼示例
- Python skimage.feature.structure_tensor_eigvals用法及代碼示例
- Python skimage.feature.shape_index用法及代碼示例
- Python skimage.feature.corner_peaks用法及代碼示例
- Python skimage.feature.corner_moravec用法及代碼示例
- Python skimage.feature.structure_tensor_eigenvalues用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.feature.blob_dog。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。