Convert selem to uint8

This commit is contained in:
Johannes Schönberger
2012-09-02 09:58:02 +02:00
parent a5fe574bd9
commit 224fcb5d01
+2
View File
@@ -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)