mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-07 11:28:14 +08:00
Refactoring ``skimage.filters.gabor_filter` to `skimage.filters.gabor``
Refactoring ```skimage.filters.gaussian_filter``` to ```skimage.filters.gaussian```
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
from ..filters import gaussian_filter
|
||||
from ..filters import gaussian
|
||||
|
||||
|
||||
def binary_blobs(length=512, blob_size_fraction=0.1, n_dim=2,
|
||||
@@ -48,6 +48,6 @@ def binary_blobs(length=512, blob_size_fraction=0.1, n_dim=2,
|
||||
n_pts = max(int(1. / blob_size_fraction) ** n_dim, 1)
|
||||
points = (length * rs.rand(n_dim, n_pts)).astype(np.int)
|
||||
mask[[indices for indices in points]] = 1
|
||||
mask = gaussian_filter(mask, sigma=0.25 * length * blob_size_fraction)
|
||||
mask = gaussian(mask, sigma=0.25 * length * blob_size_fraction)
|
||||
threshold = np.percentile(mask, 100 * (1 - volume_fraction))
|
||||
return np.logical_not(mask < threshold)
|
||||
|
||||
Reference in New Issue
Block a user