diff --git a/skimage/color/colorconv.py b/skimage/color/colorconv.py index 96ef5f86..0ff4c722 100644 --- a/skimage/color/colorconv.py +++ b/skimage/color/colorconv.py @@ -55,6 +55,7 @@ import numpy as np from scipy import linalg from ..util import dtype + def is_rgb(image): """Test whether the image is RGB or RGBA. @@ -769,7 +770,7 @@ def rgb2hed(rgb): >>> ihc_hed = rgb2hed(ihc) """ rgb = rgb.astype(float) + 1 - hed = np.dot(np.reshape(-np.log(rgb), (-1,3)), hed_from_rgb) + hed = np.dot(np.reshape(-np.log(rgb), (-1, 3)), hed_from_rgb) return np.reshape(hed, rgb.shape) @@ -806,6 +807,6 @@ def hed2rgb(hed): >>> ihc_hed = rgb2hed(ihc) >>> ihc_rgb = hed2rgb(ihc_hed) """ - logrgb1 = np.dot(-np.reshape(hed, (-1,3)) , rgb_from_hed) + logrgb1 = np.dot(-np.reshape(hed, (-1, 3)), rgb_from_hed) rgb1 = np.exp(logrgb1) return np.reshape(rgb1 - 1, hed.shape) diff --git a/skimage/data/ihc.jpg b/skimage/data/ihc.jpg index 24d68bd8..e64d2a0d 100644 Binary files a/skimage/data/ihc.jpg and b/skimage/data/ihc.jpg differ