mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-21 12:50:27 +08:00
Remove redundant dtype conversion
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user