mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-14 11:18:06 +08:00
Merge pull request #498 from JDWarner/fix_canny_strel
Use specific structuring element in Canny function
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user