[GRASS-SVN] r72634 - grass-addons/grass7/imagery/i.superpixels.slic

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 18 05:26:28 PDT 2018


Author: mmetz
Date: 2018-04-18 05:26:28 -0700 (Wed, 18 Apr 2018)
New Revision: 72634

Modified:
   grass-addons/grass7/imagery/i.superpixels.slic/main.c
Log:
i.superpixels.slic: allow step > 1 (see #3545)

Modified: grass-addons/grass7/imagery/i.superpixels.slic/main.c
===================================================================
--- grass-addons/grass7/imagery/i.superpixels.slic/main.c	2018-04-18 07:47:01 UTC (rev 72633)
+++ grass-addons/grass7/imagery/i.superpixels.slic/main.c	2018-04-18 12:26:28 UTC (rev 72634)
@@ -133,7 +133,7 @@
     opt_step->type = TYPE_INTEGER;
     opt_step->required = NO;
     opt_step->label = _("Distance (number of cells) between initial super pixel centers");
-    opt_step->description = _("A step size > 0 overrides the number of super pixels");
+    opt_step->description = _("A step size > 1 overrides the number of super pixels");
     opt_step->answer = "0";
 
     opt_perturb = G_define_option();
@@ -274,7 +274,7 @@
 
     /* determine seed grid */
     superpixelsize = step * step;
-    if (step < 5) {
+    if (step < 2) {
 	superpixelsize = 0.5 + (double)nrows * ncols / n_super_pixels;
 
 	step = sqrt((double)superpixelsize) + 0.5;



More information about the grass-commit mailing list