From cf264353c13112a2cc9e789396b7a8e1f96ef218 Mon Sep 17 00:00:00 2001 From: "Josh Warner (Mac)" Date: Tue, 9 Apr 2013 19:37:09 -0500 Subject: [PATCH] FIX use specific structuring element in Canny --- skimage/filter/_canny.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skimage/filter/_canny.py b/skimage/filter/_canny.py index 8be77894..904919be 100644 --- a/skimage/filter/_canny.py +++ b/skimage/filter/_canny.py @@ -254,7 +254,8 @@ def canny(image, sigma=1., low_threshold=.1, high_threshold=.2, mask=None): # Segment the low-mask, then only keep low-segments that have # some high_mask component in them # - labels, count = label(low_mask, np.ndarray((3, 3), bool)) + strel = np.ones((3, 3), bool) + labels, count = label(low_mask, strel) if count == 0: return low_mask