From 944e7204b7c4bfeeb16f74fd372f6df1e81d7b4a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 15 Jun 2015 21:40:23 -0500 Subject: [PATCH] wip wip Update tests Docstring and TODO Update docstring Style fixes Update equalize_adapthist to use new view_as_windows Update equalize_adapthist to use new view_as_windows Try rbase again Update equalize_adapthist to use new view_as_windows Fix relative imports Style fixes Add a deprecation warning and add to api_changes.txt Update TODO and switch to 0.13 deprecation Preserve the current API as much as possible and defer to 0.14 Move the new kwarg to the very end Clarify deprecation warning Update to use row/col in clahe Update docstring Use optimal_step to set up view_as_windows Update equalize_adapthist to use new view_as_windows Try rbase again Update equalize_adapthist to use new view_as_windows Fix relative imports Style fixes Add a deprecation warning and add to api_changes.txt Update TODO and switch to 0.13 deprecation Preserve the current API as much as possible and defer to 0.14 Move the new kwarg to the very end Clarify deprecation warning Update docstring --- skimage/exposure/_adapthist.py | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/skimage/exposure/_adapthist.py b/skimage/exposure/_adapthist.py index b0ed63d7..fc13072b 100644 --- a/skimage/exposure/_adapthist.py +++ b/skimage/exposure/_adapthist.py @@ -20,39 +20,14 @@ from .. import img_as_float, img_as_uint from ..color.adapt_rgb import adapt_rgb, hsv_value from ..exposure import rescale_intensity from ..util import view_as_windows -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD from .._shared.utils import skimage_deprecation, warnings -======= ->>>>>>> 3bcbbc0... Update equalize_adapthist to use new view_as_windows -======= -from .._shared.utils import skimage_deprecation ->>>>>>> 446f383... Add a deprecation warning and add to api_changes.txt -======= -from .._shared.utils import skimage_deprecation, warnings ->>>>>>> 204208a... Preserve the current API as much as possible and defer to 0.14 - NR_OF_GREY = 2 ** 14 # number of grayscale levels to use in CLAHE algorithm @adapt_rgb(hsv_value) -<<<<<<< HEAD -<<<<<<< HEAD def equalize_adapthist(image, ntiles_x=8, ntiles_y=8, clip_limit=0.01, nbins=256, kernel_size=None): -======= -def equalize_adapthist(image, kernel_size=64, ntiles_x=None, ntiles_y=None, -<<<<<<< HEAD - clip_limit=0.01, nbins=256): ->>>>>>> 3bcbbc0... Update equalize_adapthist to use new view_as_windows -======= -======= -def equalize_adapthist(image, ntiles_x=8, ntiles_y=8, kernel_size=None, ->>>>>>> 204208a... Preserve the current API as much as possible and defer to 0.14 - clip_limit=0.01, nbins=256): ->>>>>>> 172fb0d... Style fixes """Contrast Limited Adaptive Histogram Equalization (CLAHE). An algorithm for local contrast enhancement, that uses histograms computed @@ -109,7 +84,7 @@ def equalize_adapthist(image, ntiles_x=8, ntiles_y=8, kernel_size=None, ntiles_x = ntiles_x or 8 ntiles_y = ntiles_y or 8 kernel_size = (np.round(image.shape[0] / ntiles_y), - np.round(image.shape[1] / ntiles_x))0.14 + np.round(image.shape[1] / ntiles_x)) if isinstance(kernel_size, numbers.Number): kernel_size = (kernel_size, kernel_size)