Fix bug in binary dilation and test case

This commit is contained in:
Johannes Schönberger
2012-09-11 20:11:55 +02:00
parent b1d99be735
commit f478b6a397
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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():