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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 30 07:11:42 PDT 2016


Author: mlennert
Date: 2016-04-30 07:11:41 -0700 (Sat, 30 Apr 2016)
New Revision: 68336

Added:
   grass/trunk/imagery/i.segment/README
Log:
i.segment: first draft of a README explaining the code structure


Added: grass/trunk/imagery/i.segment/README
===================================================================
--- grass/trunk/imagery/i.segment/README	                        (rev 0)
+++ grass/trunk/imagery/i.segment/README	2016-04-30 14:11:41 UTC (rev 68336)
@@ -0,0 +1,15 @@
+i.segment basically works in three steps:
+
+[Note: the word "segment" has two meanings here - data segments which are like data tiles (SEGMENT library) and image objects that are the result of the segmentation algorithm. In following, an attemps is made to systematically use 'segment' for the former and 'object' for the latter.]
+
+1) open input files and put the data in data segments: open_files(), implemented in open_files.c
+
+2) run algorithm that identifies for each pixel the id of the object this pixel is part of: create_isegs(), implemented in create_isegs.c, which currently contains only one algorithm, region-growing, implemented in region_growing() and related functions
+
+3) write output raster files: write_output() implemented in write_output.c
+
+Variables and structures used in all functions are passed around using a structure called globals, defined in iseg.h.
+
+All module parameters and flags are defined in parse_args.c 
+
+There are two generic balanced binary search tree (Red Black Tree) implementations used in the region-growing algorithm, one for keeping track of the object pixels belong to (regtree.c/h) and the other for keeping track of the neighbors (ngbrtree.c/h). There is a also a small library of routines allowing to "flag" pixels in raster maps (flag.c/h), used to flag null cells in the input maps. 



More information about the grass-commit mailing list