mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-24 13:20:43 +08:00
Update bitdepth warning
This commit is contained in:
@@ -22,8 +22,6 @@ References
|
||||
|
||||
import numpy as np
|
||||
from skimage import img_as_ubyte
|
||||
from ... import get_log
|
||||
log = get_log()
|
||||
|
||||
from . import bilateral_cy
|
||||
from .generic import _handle_input
|
||||
|
||||
@@ -55,6 +55,11 @@ def _handle_input(image, selem, out, mask):
|
||||
else:
|
||||
max_bin = max(4, image.max())
|
||||
|
||||
bitdepth = int(np.log2(max_bin))
|
||||
if bitdepth > 10:
|
||||
log.warn("Bitdepth of %d may result in bad rank filter "
|
||||
"performance due to large number of bins." % bitdepth)
|
||||
|
||||
return image, selem, out, mask, max_bin
|
||||
|
||||
|
||||
|
||||
@@ -22,9 +22,6 @@ References
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
from skimage import img_as_ubyte
|
||||
from ... import get_log
|
||||
log = get_log()
|
||||
|
||||
from . import percentile_cy
|
||||
from .generic import _handle_input
|
||||
|
||||
Reference in New Issue
Block a user