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