mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-29 11:26:57 +08:00
FIX use specific structuring element in Canny
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