From 360d384633dc4b2228b990613b14669c69b9c3a6 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 11 Jun 2015 08:38:18 +0200 Subject: [PATCH] used gray2rgb function. Code is more readable now. --- skimage/feature/texture.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skimage/feature/texture.py b/skimage/feature/texture.py index c17c1a5b..b311342d 100644 --- a/skimage/feature/texture.py +++ b/skimage/feature/texture.py @@ -5,6 +5,7 @@ Methods to characterize image textures. import numpy as np from .._shared.utils import assert_nD from ..util import img_as_float +from ..color import gray2rgb from ._texture import (_glcm_loop, _local_binary_pattern, _multiblock_local_binary_pattern) @@ -414,7 +415,7 @@ def draw_multiblock_lbp(img, # As the visualization uses RGB color we need 3 bands. if len(img.shape) < 3: - output = np.dstack((img,) * 3) + output = gray2rgb(img) # Colors are specified in floats. output = img_as_float(output)