Remove redundant dtype conversion

This commit is contained in:
Johannes Schönberger
2012-10-13 23:28:29 -07:00
committed by Stefan van der Walt
parent 08889ba03f
commit b70f279f27
-2
View File
@@ -259,7 +259,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
@@ -310,7 +309,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