[GRASS-SVN] r68554 - sandbox/bo/i.segment.gsoc2016/i.segment
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 1 01:39:29 PDT 2016
Author: mmetz
Date: 2016-06-01 01:39:29 -0700 (Wed, 01 Jun 2016)
New Revision: 68554
Modified:
sandbox/bo/i.segment.gsoc2016/i.segment/create_isegs.c
Log:
i.segment sandbox GSoC 2016: fix manhattan distance
Modified: sandbox/bo/i.segment.gsoc2016/i.segment/create_isegs.c
===================================================================
--- sandbox/bo/i.segment.gsoc2016/i.segment/create_isegs.c 2016-06-01 04:39:01 UTC (rev 68553)
+++ sandbox/bo/i.segment.gsoc2016/i.segment/create_isegs.c 2016-06-01 08:39:29 UTC (rev 68554)
@@ -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