mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-04 13:14:23 +08:00
Remove redundant dtype conversion
This commit is contained in:
committed by
Stefan van der Walt
parent
08889ba03f
commit
b70f279f27
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user