From 224fcb5d01ffd12a1048da361e4c3a1951364320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Sun, 2 Sep 2012 09:58:02 +0200 Subject: [PATCH] Convert selem to uint8 --- skimage/morphology/grey.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skimage/morphology/grey.py b/skimage/morphology/grey.py index 7ce25475..00db0fae 100644 --- a/skimage/morphology/grey.py +++ b/skimage/morphology/grey.py @@ -66,6 +66,7 @@ def erosion(image, selem, out=None, shift_x=False, shift_y=False): if image is out: raise NotImplementedError("In-place erosion not supported!") image = skimage.img_as_ubyte(image) + selem = skimage.img_as_ubyte(selem) return cmorph.erode(image, selem, out=out, shift_x=shift_x, shift_y=shift_y) @@ -119,6 +120,7 @@ def dilation(image, selem, out=None, shift_x=False, shift_y=False): if image is out: raise NotImplementedError("In-place dilation not supported!") image = skimage.img_as_ubyte(image) + selem = skimage.img_as_ubyte(selem) return cmorph.dilate(image, selem, out=out, shift_x=shift_x, shift_y=shift_y)