[GRASS-SVN] r68555 - grass/trunk/imagery/i.segment
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 1 01:41:21 PDT 2016
Author: mmetz
Date: 2016-06-01 01:41:21 -0700 (Wed, 01 Jun 2016)
New Revision: 68555
Modified:
grass/trunk/imagery/i.segment/create_isegs.c
Log:
i.segment: fix manhattan distance
Modified: grass/trunk/imagery/i.segment/create_isegs.c
===================================================================
--- grass/trunk/imagery/i.segment/create_isegs.c 2016-06-01 08:39:29 UTC (rev 68554)
+++ grass/trunk/imagery/i.segment/create_isegs.c 2016-06-01 08:41:21 UTC (rev 68555)
@@ -176,7 +176,7 @@
/* squared manhattan distance, sum the differences for each dimension */
do {
- val += Ri->mean[n] - Rk->mean[n];
+ val += fabs(Ri->mean[n] - Rk->mean[n]);
} while (n--);
/* the return value should always be in the range 0 - 1 */
More information about the grass-commit
mailing list