diff --git a/skimage/morphology/convex_hull.py b/skimage/morphology/convex_hull.py index ae395eac..bb9ca734 100644 --- a/skimage/morphology/convex_hull.py +++ b/skimage/morphology/convex_hull.py @@ -20,12 +20,12 @@ def convex_hull_image(image): Parameters ---------- - image : ndarray + image : (M, N) array Binary input image. This array is cast to bool before processing. Returns ------- - hull : ndarray of bool + hull : (M, N) array of bool Binary image with pixels in convex hull set to True. References @@ -38,12 +38,9 @@ def convex_hull_image(image): raise ImportError("Could not import scipy.spatial.Delaunay, " "only available in scipy >= 0.9.") - image = image.astype(bool) - # Here we do an optimisation by choosing only pixels that are # the starting or ending pixel of a row or column. This vastly - # limits the number of coordinates to examine for the virtual - # hull. + # limits the number of coordinates to examine for the virtual hull. coords = possible_hull(image.astype(np.uint8)) N = len(coords) diff --git a/skimage/morphology/tests/test_convex_hull.py b/skimage/morphology/tests/test_convex_hull.py index 67850cf2..c0cc954e 100644 --- a/skimage/morphology/tests/test_convex_hull.py +++ b/skimage/morphology/tests/test_convex_hull.py @@ -139,5 +139,6 @@ def test_object(): assert_raises(ValueError, convex_hull_object, image, 7) + if __name__ == "__main__": np.testing.run_module_suite()