[GRASS-SVN] r52511 - grass-addons/grass7/imagery/i.edge

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 3 01:43:42 PDT 2012


Author: annakrat
Date: 2012-08-03 01:43:41 -0700 (Fri, 03 Aug 2012)
New Revision: 52511

Modified:
   grass-addons/grass7/imagery/i.edge/canny.c
Log:
i.edge: fixed orientation in angle map

Modified: grass-addons/grass7/imagery/i.edge/canny.c
===================================================================
--- grass-addons/grass7/imagery/i.edge/canny.c	2012-08-03 01:00:19 UTC (rev 52510)
+++ grass-addons/grass7/imagery/i.edge/canny.c	2012-08-03 08:43:41 UTC (rev 52511)
@@ -268,7 +268,8 @@
 		 */
 		if (angle != NULL)
 		{
-		    angle[index] = (int) (atan2(yGrad, xGrad) * 180 / M_PI + 0.5);
+		    // angle of gradient (mathematical axes)
+		    angle[index] = (int) (-atan2(yGrad, xGrad) * 180 / M_PI + 0.5);
 		}
 	    }
 	    else {



More information about the grass-commit mailing list