mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 03:37:34 +08:00
removed unnecessary cast step
This commit is contained in:
@@ -84,9 +84,7 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0,
|
||||
scipy.ndimage.median_filter(image, block_size, output=thresh_image,
|
||||
mode=mode)
|
||||
|
||||
thresh_image = image > (thresh_image - offset)
|
||||
|
||||
return thresh_image.astype('bool')
|
||||
return image > (thresh_image - offset)
|
||||
|
||||
def threshold_otsu(image, nbins=256):
|
||||
"""Return threshold value based on Otsu's method.
|
||||
|
||||
Reference in New Issue
Block a user