Refactoring ``skimage.filters.gabor_filter` to `skimage.filters.gabor``

Refactoring ```skimage.filters.gaussian_filter``` to ```skimage.filters.gaussian```
This commit is contained in:
sumitbinnani
2015-10-04 00:15:53 +05:30
parent 953fbfc539
commit 811b6895cf
9 changed files with 43 additions and 43 deletions
+2 -2
View File
@@ -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)