用法:
skimage.feature.blob_doh(image, min_sigma=1, max_sigma=30, num_sigma=10, threshold=0.01, overlap=0.5, log_scale=False, *, threshold_rel=None)
在給定的灰度圖像中查找 blob。
使用 Hessian 行列式方法 [1] 找到 Blob。對於找到的每個 blob,該方法返回其坐標和用於行列式檢測到 blob 的 Hessian 矩陣的高斯核的標準偏差。 Hessians 的行列式使用 [2] 來近似。
- image:二維數組
輸入灰度圖像。Blob 可以在黑暗中變亮,反之亦然。
- min_sigma:浮點數,可選
用於計算 Hessian 矩陣的高斯核的最小標準偏差。保持這個低以檢測較小的斑點。
- max_sigma:浮點數,可選
用於計算 Hessian 矩陣的高斯核的最大標準偏差。保持這個高以檢測更大的斑點。
- num_sigma:int 可選
min_sigma 和 max_sigma 之間要考慮的標準差中間值的數量。
- threshold:浮點數或無,可選
尺度空間最大值的絕對下限。小於閾值的局部最大值被忽略。減少它以檢測強度較低的斑點。如果還指定了threshold_rel,則將使用較大的閾值。如果沒有,則使用threshold_rel。
- overlap:浮點數,可選
一個介於 0 和 1 之間的值。如果兩個斑點的麵積重疊的部分大於閾值,則消除較小的斑點。
- log_scale:布爾型,可選
如果設置的標準偏差的中間值使用以 10 為底的對數刻度進行插值。如果沒有,則使用線性插值。
- threshold_rel:浮點數或無,可選
峰的最小強度,計算為
max(doh_space) * threshold_rel
,其中doh_space
指內部計算的Determinant-of-Hessian (DoH) 圖像堆棧。這應該有一個介於 0 和 1 之間的值。如果沒有,臨界點改為使用。
- A:(n, 3) 數組
一個二維數組,每行代表 3 個值,
(y,x,sigma)
其中(y,x)
是 blob 的坐標,sigma
是行列式檢測到 blob 的 Hessian 矩陣的高斯核的標準偏差。
參數:
返回:
注意:
每個斑點的半徑約為西格瑪. Hessians 行列式的計算與標準偏差無關。因此檢測較大的斑點不會花費更多時間。在方法行skimage.feature.blob_dog和skimage.feature.blob_log更大的高斯計算西格瑪需要更多時間。缺點是這種方法不能用於檢測半徑小於3像素由於在 Hessian 行列式的近似中使用了箱形濾波器。
參考:
- 1
https://en.wikipedia.org/wiki/Blob_detection#The_determinant_of_the_Hessian
- 2
Herbert Bay, Andreas Ess, Tinne Tuytelaars, Luc Van Gool, “SURF: Speeded Up Robust Features” ftp://ftp.vision.ee.ethz.ch/publications/articles/eth_biwi_00517.pdf
例子:
>>> from skimage import data, feature >>> img = data.coins() >>> feature.blob_doh(img) array([[197. , 153. , 20.33333333], [124. , 336. , 20.33333333], [126. , 153. , 20.33333333], [195. , 100. , 23.55555556], [192. , 212. , 23.55555556], [121. , 271. , 30. ], [126. , 101. , 20.33333333], [193. , 275. , 23.55555556], [123. , 205. , 20.33333333], [270. , 363. , 30. ], [265. , 113. , 23.55555556], [262. , 243. , 23.55555556], [185. , 348. , 30. ], [156. , 302. , 30. ], [123. , 44. , 23.55555556], [260. , 173. , 30. ], [197. , 44. , 20.33333333]])
相關用法
- Python skimage.feature.blob_dog用法及代碼示例
- 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用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.feature.blob_doh。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。