mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-23 13:10:18 +08:00
Harmonize all ndimage usage across the library
Only two forms remain in use: - `from scipy import ndimage as ndi` - `from scipy.ndimage import function`
This commit is contained in:
@@ -17,7 +17,7 @@ the hysteresis thresholding.
|
||||
"""
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from scipy import ndimage
|
||||
from scipy import ndimage as ndi
|
||||
|
||||
from skimage import feature
|
||||
|
||||
@@ -26,8 +26,8 @@ from skimage import feature
|
||||
im = np.zeros((128, 128))
|
||||
im[32:-32, 32:-32] = 1
|
||||
|
||||
im = ndimage.rotate(im, 15, mode='constant')
|
||||
im = ndimage.gaussian_filter(im, 4)
|
||||
im = ndi.rotate(im, 15, mode='constant')
|
||||
im = ndi.gaussian_filter(im, 4)
|
||||
im += 0.2 * np.random.random(im.shape)
|
||||
|
||||
# Compute the Canny filter for two values of sigma
|
||||
|
||||
Reference in New Issue
Block a user