Update bitdepth warning

This commit is contained in:
Johannes Schönberger
2013-07-12 23:16:50 +02:00
parent d6fb12a493
commit 43feb4bf78
3 changed files with 5 additions and 5 deletions
-2
View File
@@ -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
+5
View File
@@ -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
-3
View File
@@ -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