Merge pull request #498 from JDWarner/fix_canny_strel

Use specific structuring element in Canny function
This commit is contained in:
Tony S Yu
2013-04-09 21:24:17 -07:00
+2 -1
View File
@@ -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