mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-21 12:50:27 +08:00
Blob detection supports for non-integer sigmas
This commit is contained in:
+12
-4
@@ -200,9 +200,11 @@ def blob_dog(image, min_sigma=1, max_sigma=50, sigma_ratio=1.6, threshold=2.0,
|
||||
footprint=np.ones((3, 3, 3)),
|
||||
threshold_rel=0.0,
|
||||
exclude_border=False)
|
||||
|
||||
# Convert array to float32
|
||||
lm = local_maxima.astype('float32')
|
||||
# Convert the last index to its corresponding scale value
|
||||
local_maxima[:, 2] = sigma_list[local_maxima[:, 2]]
|
||||
lm[:,2] = sigma_list[local_maxima[:,2]]
|
||||
local_maxima = lm
|
||||
return _prune_blobs(local_maxima, overlap)
|
||||
|
||||
|
||||
@@ -300,8 +302,11 @@ def blob_log(image, min_sigma=1, max_sigma=50, num_sigma=10, threshold=.2,
|
||||
threshold_rel=0.0,
|
||||
exclude_border=False)
|
||||
|
||||
# Convert array to float32
|
||||
lm = local_maxima.astype('float32')
|
||||
# Convert the last index to its corresponding scale value
|
||||
local_maxima[:, 2] = sigma_list[local_maxima[:, 2]]
|
||||
lm[:,2] = sigma_list[local_maxima[:,2]]
|
||||
local_maxima = lm
|
||||
return _prune_blobs(local_maxima, overlap)
|
||||
|
||||
|
||||
@@ -408,6 +413,9 @@ def blob_doh(image, min_sigma=1, max_sigma=30, num_sigma=10, threshold=0.01,
|
||||
threshold_rel=0.0,
|
||||
exclude_border=False)
|
||||
|
||||
# Convert array to float32
|
||||
lm = local_maxima.astype('float32')
|
||||
# Convert the last index to its corresponding scale value
|
||||
local_maxima[:, 2] = sigma_list[local_maxima[:, 2]]
|
||||
lm[:,2] = sigma_list[local_maxima[:,2]]
|
||||
local_maxima = lm
|
||||
return _prune_blobs(local_maxima, overlap)
|
||||
|
||||
Reference in New Issue
Block a user