[GRASS-dev] [GRASS GIS] #3545: i.superpixels.slic: behaviour of step parameter confusing
GRASS GIS
trac at osgeo.org
Wed Apr 18 01:31:52 PDT 2018
#3545: i.superpixels.slic: behaviour of step parameter confusing
-------------------------------------+-------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: Addons | Version: unspecified
Keywords: i.superpixels.slic step | CPU: Unspecified
Platform: Unspecified |
-------------------------------------+-------------------------
The behavior of the step parameter in i.superpixels.slic is a bit
confusing:
{{{
GRASS 7.5.svn (Belgique31370):/data/home/mlennert > i.superpixels.slic
orthos2016_p46_internal step=200 out=test200 perturb=10 compact=1 --o
WARNING: Initialized 9 of 24 seeds
GRASS 7.5.svn (Belgique31370):/data/home/mlennert > i.superpixels.slic
orthos2016_p46_internal step=20 out=test20 perturb=10 compact=1 --o
WARNING: Initialized 1169 of 2925 seeds
GRASS 7.5.svn (Belgique31370):/data/home/mlennert > i.superpixels.slic
orthos2016_p46_internal step=2 out=test2 perturb=10 compact=1 --o
WARNING: Initialized 76 of 187 seeds
}}}
Normally, one would expect a larger number of seeds with step=2 than
step=20. This behavior comes from lines 277ff of main.c, which read:
{{{
superpixelsize = step * step;
if (step < 5) {
superpixelsize = 0.5 + (double)nrows * ncols / n_super_pixels;
step = sqrt((double)superpixelsize) + 0.5;
}
Why this limit at 5 ? If it is really necessary, it should at least be
documented in the man page to avoid confusion.
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3545>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list