mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-28 11:25:42 +08:00
Fix bug in binary dilation and test case
This commit is contained in:
@@ -65,7 +65,7 @@ def binary_dilation(image, selem, out=None):
|
||||
"""
|
||||
|
||||
conv = ndimage.convolve(image > 0, selem, output=out,
|
||||
mode='constant', cval=1)
|
||||
mode='constant', cval=0)
|
||||
if conv is not None:
|
||||
out = conv
|
||||
return np.not_equal(out, 0, out=out)
|
||||
|
||||
@@ -10,7 +10,7 @@ from skimage.morphology import binary, grey, selem
|
||||
|
||||
|
||||
lena = np.load(os.path.join(data_dir, 'lena_GRAY_U8.npy'))
|
||||
bw_lena = lena > 0.4
|
||||
bw_lena = lena > 100
|
||||
|
||||
|
||||
class TestMorphology():
|
||||
|
||||
Reference in New Issue
Block a user