[GRASS-SVN] r70688 - grass/trunk/imagery/i.zc

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 27 04:01:45 PST 2017


Author: mlennert
Date: 2017-02-27 04:01:45 -0800 (Mon, 27 Feb 2017)
New Revision: 70688

Modified:
   grass/trunk/imagery/i.zc/main.c
Log:
i.zc: set default threshold value to 1, but divide by 100 in the code


Modified: grass/trunk/imagery/i.zc/main.c
===================================================================
--- grass/trunk/imagery/i.zc/main.c	2017-02-26 22:15:49 UTC (rev 70687)
+++ grass/trunk/imagery/i.zc/main.c	2017-02-27 12:01:45 UTC (rev 70688)
@@ -86,7 +86,7 @@
     threshold->required = NO;
     threshold->multiple = NO;
     threshold->description = _("Sensitivity of Gaussian filter");
-    threshold->answer = "0.01";
+    threshold->answer = "1.0";
 
     orientations = G_define_option();
     orientations->key = "orientations";
@@ -106,7 +106,12 @@
     Thresh = atof(threshold->answer);
     if (Thresh <= 0.0)
 	G_fatal_error(_("Threshold less than or equal to zero not allowed"));
+    /* A threshold value of 0.01 seems to give fairly good results on average.  */
+    /* So we divide the threshold by 100 to get a value of 0.01 for the default */ 
+    /* parameter value = 1. */
 
+    Thresh = Thresh / 100.0;
+
     sscanf(width->answer, "%f", &Width);
 
     if (Width <= 0.0)



More information about the grass-commit mailing list