用法:
skimage.feature.blob_log(image, min_sigma=1, max_sigma=50, num_sigma=10, threshold=0.2, overlap=0.5, log_scale=False, *, threshold_rel=None, exclude_border=False)
在給定的灰度圖像中查找 blob。
使用高斯拉普拉斯算子 (LoG) 方法 [1] 找到 Blob。對於找到的每個 blob,該方法返回其坐標和檢測到 blob 的高斯核的標準偏差。
- image:ndarray
輸入灰度圖像,假設斑點在深色背景上是亮的(黑底白字)。
- min_sigma:標量或標量序列,可選
高斯核的最小標準偏差。保持這個低以檢測較小的斑點。每個軸的高斯濾波器的標準偏差作為一個序列或單個數字給出,在這種情況下,它對所有軸都是相等的。
- max_sigma:標量或標量序列,可選
高斯核的最大標準偏差。保持這個高以檢測更大的斑點。每個軸的高斯濾波器的標準偏差作為一個序列或單個數字給出,在這種情況下,它對所有軸都是相等的。
- num_sigma:整數,可選
min_sigma 和 max_sigma 之間要考慮的標準差中間值的數量。
- threshold:浮點數或無,可選
尺度空間最大值的絕對下限。小於閾值的局部最大值被忽略。減少它以檢測強度較低的斑點。如果還指定了threshold_rel,則將使用較大的閾值。如果沒有,則使用threshold_rel。
- overlap:浮點數,可選
一個介於 0 和 1 之間的值。如果兩個斑點的麵積重疊的部分大於閾值,則消除較小的斑點。
- log_scale:布爾型,可選
如果設置的標準偏差的中間值使用以 10 為底的對數刻度進行插值。如果沒有,則使用線性插值。
- threshold_rel:浮點數或無,可選
峰的最小強度,計算為
max(log_space) * threshold_rel
,其中log_space
指內部計算的Laplacian-of-Gaussian (LoG) 圖像堆棧。這應該有一個介於 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 圖像,其半徑約為 。
參考:
例子:
>>> from skimage import data, feature, exposure >>> img = data.coins() >>> img = exposure.equalize_hist(img) # improves detection >>> feature.blob_log(img, threshold = .3) array([[124. , 336. , 11.88888889], [198. , 155. , 11.88888889], [194. , 213. , 17.33333333], [121. , 272. , 17.33333333], [263. , 244. , 17.33333333], [194. , 276. , 17.33333333], [266. , 115. , 11.88888889], [128. , 154. , 11.88888889], [260. , 174. , 17.33333333], [198. , 103. , 11.88888889], [126. , 208. , 11.88888889], [127. , 102. , 11.88888889], [263. , 302. , 17.33333333], [197. , 44. , 11.88888889], [185. , 344. , 17.33333333], [126. , 46. , 11.88888889], [113. , 323. , 1. ]])
相關用法
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_dog用法及代碼示例
- 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_log。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。