[GRASS-dev] [GRASS-SVN] r68555 - grass/trunk/imagery/i.segment

Markus Neteler neteler at osgeo.org
Wed Jun 1 10:31:21 PDT 2016


On Wed, Jun 1, 2016 at 10:41 AM,  <svn_grass at osgeo.org> wrote:
> 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 */


I see this bug also in the other branches, shall I backport it?

markusN


More information about the grass-dev mailing list