[GRASS-SVN] r68589 - grass/branches/releasebranch_7_2/imagery/i.segment
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jun 3 06:17:08 PDT 2016
Author: neteler
Date: 2016-06-03 06:17:08 -0700 (Fri, 03 Jun 2016)
New Revision: 68589
Modified:
grass/branches/releasebranch_7_2/imagery/i.segment/create_isegs.c
Log:
i.segment: fix manhattan distance (r68555)
Modified: grass/branches/releasebranch_7_2/imagery/i.segment/create_isegs.c
===================================================================
--- grass/branches/releasebranch_7_2/imagery/i.segment/create_isegs.c 2016-06-03 10:51:55 UTC (rev 68588)
+++ grass/branches/releasebranch_7_2/imagery/i.segment/create_isegs.c 2016-06-03 13:17:08 UTC (rev 68589)
@@ -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