From 390a6c664bc00f0507c3175e0249702d75435d8b Mon Sep 17 00:00:00 2001 From: Chintak Sheth Date: Sun, 26 May 2013 11:44:36 +0530 Subject: [PATCH] Whitespaces and note --- skimage/morphology/convex_hull.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/skimage/morphology/convex_hull.py b/skimage/morphology/convex_hull.py index 06a6e710..6523a669 100644 --- a/skimage/morphology/convex_hull.py +++ b/skimage/morphology/convex_hull.py @@ -84,26 +84,25 @@ def convex_hull_object(image, neighbors=8): hull : ndarray of bool Binary image with pixels in convex hull set to True. - Note + Note ---- This function uses skimage.morphology.label to define unique objects, finds the convex hull of each using convex_hull_image, and combines these regions with logical OR. Be aware the convex hulls of unconnected objects may overlap in the result. If this is suspected, consider using - convex_hull_image on those objects together. - + convex_hull_image separately on each object. + """ if neighbors != 4 and neighbors != 8: raise ValueError('Neighbors must be either 4 or 8.') - + labeled_im = label(image, neighbors, background=0) convex_obj = np.zeros(image.shape, dtype=bool) convex_img = np.zeros(image.shape, dtype=bool) - + for i in range(0, labeled_im.max()+1): convex_obj = convex_hull_image(labeled_im == i) convex_img = np.logical_or(convex_img, convex_obj) return convex_img -