mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-08 01:38:52 +08:00
Merge branch 'adapthist' of github.com:blink1073/scikits-image into adapthist
* 'adapthist' of github.com:blink1073/scikits-image: Cleaned up adapthist func to use LAB for all RGB->required rest result change Removed sys.path hack in test, fixed spelling of import in __init__.py Translated clahe C code to python, added to list of contributors. Passed all tests with full coverage, PEP8 and Pylint performed. Improved support for color images using lab transform. Replaced generic ACM license with the Graphics Gems IV license. Pep8 fixes. Added Notes to the docstring. Tests pass and example works on build. Initial commit of adapthist modifications. Conflicts: CONTRIBUTORS.txt doc/examples/plot_equalize.py skimage/exposure/_adapthist.py skimage/exposure/tests/test_exposure.py skimage/setup.py
This commit is contained in:
@@ -59,6 +59,11 @@ def adapthist(image, ntiles_x=8, ntiles_y=8, clip_limit=0.01, nbins=256):
|
||||
* The algorithm relies on an image whose rows and columns are even
|
||||
multiples of the number of tiles, so the extra rows and columns are left
|
||||
at their original values, thus preserving the input image shape.
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
* For grayscale images, CLAHE is performed on one channel,
|
||||
and a grayscale is returned
|
||||
>>>>>>> 2e1729a9fbbc21fc0b04df8e68efbab9cfd6dada
|
||||
* For color images, the following steps are performed:
|
||||
- The image is converted to LAB color space
|
||||
- The CLAHE algorithm is run on the L channel
|
||||
@@ -319,3 +324,4 @@ def interpolate(image, xslice, yslice,
|
||||
/ norm)
|
||||
view[:, :] = new
|
||||
return image
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ def test_adapthist_scalar():
|
||||
'''
|
||||
img = skimage.img_as_ubyte(data.moon())
|
||||
adapted = exposure.adapthist(img, clip_limit=0.02)
|
||||
assert adapted.min() == 0
|
||||
assert adapted.min() == 0=
|
||||
assert adapted.max() == (1 << 16) - 1
|
||||
assert img.shape == adapted.shape
|
||||
full_scale = skimage.exposure.rescale_intensity(skimage.img_as_uint(img))
|
||||
|
||||
Reference in New Issue
Block a user