MIN: fix unused import

This commit is contained in:
François Boulogne
2013-06-12 21:36:28 +02:00
parent 5a041d2560
commit e258e05468
6 changed files with 7 additions and 10 deletions
-1
View File
@@ -18,7 +18,6 @@ Cubes: A High Resolution 3D Surface Construction Algorithm. Computer Graphics
import numpy as np
import matplotlib.pyplot as plt
from skimage import data
from skimage import measure
+1 -1
View File
@@ -28,7 +28,7 @@ pixels based on their spatial closeness and radiometric similarity.
import numpy as np
import matplotlib.pyplot as plt
from skimage import data, color, img_as_float
from skimage import data, img_as_float
from skimage.filter import denoise_tv_chambolle, denoise_bilateral
+2 -1
View File
@@ -24,7 +24,7 @@ but with very different mean structural similarity indices.
import numpy as np
import matplotlib.pyplot as plt
from skimage import data, color, io, exposure, img_as_float
from skimage import data, img_as_float
from skimage.measure import structural_similarity as ssim
@@ -34,6 +34,7 @@ rows, cols = img.shape
noise = np.ones_like(img) * 0.2 * (img.max() - img.min())
noise[np.random.random(size=noise.shape) > 0.5] *= -1
def mse(x, y):
return np.linalg.norm(x - y)
-1
View File
@@ -1,6 +1,5 @@
__all__ = ['imread', 'imsave']
import numpy as np
from skimage.utils.dtype import convert
try:
+1 -2
View File
@@ -34,7 +34,6 @@ def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False):
Examples
--------
>>> from skimage import morphology
>>> from scipy import ndimage as nd
>>> a = np.array([[0, 0, 0, 1, 0],
... [1, 1, 1, 0, 0],
... [1, 1, 1, 0, 1]], bool)
@@ -55,7 +54,7 @@ def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False):
# Should use `issubdtype` for bool below, but there's a bug in numpy 1.7
if not (ar.dtype == bool or np.issubdtype(ar.dtype, int)):
raise TypeError("Only bool or integer image types are supported. "
"Got %s." % ar.dtype)
"Got %s." % ar.dtype)
if in_place:
out = ar
+3 -4
View File
@@ -1,7 +1,6 @@
import numpy as np
from scipy import ndimage
from ._geometric import (warp, SimilarityTransform, AffineTransform,
ProjectiveTransform)
from ._geometric import (warp, SimilarityTransform, AffineTransform)
def resize(image, output_shape, order=1, mode='constant', cval=0.):
@@ -67,7 +66,7 @@ def resize(image, output_shape, order=1, mode='constant', cval=0.):
out = ndimage.map_coordinates(image, coord_map, order=order, mode=mode,
cval=cval)
else: # 2-dimensional interpolation
else: # 2-dimensional interpolation
# 3 control points necessary to estimate exact AffineTransform
src_corners = np.array([[1, 1], [1, rows], [cols, rows]]) - 1
@@ -116,7 +115,7 @@ def rescale(image, scale, order=1, mode='constant', cval=0.):
Examples
--------
>>> from skimage import data
>>> from skimage.transform import resize
>>> from skimage.transform import rescale
>>> image = data.camera()
>>> rescale(image, 0.1).shape
(51, 51)