From cd6384d1c06449d63aa59e8a981d25701d12e0e9 Mon Sep 17 00:00:00 2001 From: aknecht2 <aknecht2@unl.edu> Date: Thu, 21 Apr 2016 16:33:28 -0500 Subject: [PATCH] Fixed colorDAta function. --- ih/imgproc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ih/imgproc.py b/ih/imgproc.py index 3142331..14fdb02 100644 --- a/ih/imgproc.py +++ b/ih/imgproc.py @@ -1375,7 +1375,7 @@ class Image(object): def extractColorData(self, nonzero = True, returnhist = False): """ - :param nonzero: Whether or not to look at only nonzero pixels. Default true. + :param nonzero: Whether or not to look at only nonzero pixelsself. Default true. :type nonzero: bool :return: Mean & median for each channel. :rtype: list @@ -1394,8 +1394,8 @@ class Image(object): if returnhist: return hist colors = [ [np.mean(hist[0][np.nonzero(hist[0])] if nonzero else hist[0]), np.median(hist[0][np.nonzero(hist[0])] if nonzero else hist[0])], - [np.mean(hist[0][np.nonzero(hist[1])] if nonzero else hist[1]), np.median(hist[0][np.nonzero(hist[1])] if nonzero else hist[1])], - [np.mean(hist[0][np.nonzero(hist[2])] if nonzero else hist[2]), np.median(hist[0][np.nonzero(hist[2])] if nonzero else hist[2])] + [np.mean(hist[1][np.nonzero(hist[1])] if nonzero else hist[1]), np.median(hist[1][np.nonzero(hist[1])] if nonzero else hist[1])], + [np.mean(hist[2][np.nonzero(hist[2])] if nonzero else hist[2]), np.median(hist[2][np.nonzero(hist[2])] if nonzero else hist[2])] ] if self.conn: self._addColumn("rmean") -- GitLab