Remove redundant dtype conversion

This commit is contained in:
Johannes Schönberger
2012-10-06 21:54:12 +02:00
parent 48572fd0a3
commit 0ab93bbf36
-2
View File
@@ -254,7 +254,6 @@ def white_tophat(image, selem, out=None):
"""
if image is out:
raise NotImplementedError("Cannot perform white top hat in place.")
image = img_as_ubyte(image)
out = opening(image, selem, out=out)
out = image - out
@@ -304,7 +303,6 @@ def black_tophat(image, selem, out=None):
if image is out:
raise NotImplementedError("Cannot perform white top hat in place.")
image = img_as_ubyte(image)
out = closing(image, selem, out=out)
out = out - image