[GRASS-SVN] r54203 - in grass-addons/grass6/imagery/i.spec.unmix: . sample

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 5 06:14:41 PST 2012


Author: neteler
Date: 2012-12-05 06:14:40 -0800 (Wed, 05 Dec 2012)
New Revision: 54203

Added:
   grass-addons/grass6/imagery/i.spec.unmix/README.txt
   grass-addons/grass6/imagery/i.spec.unmix/mixed_pixels_spectrum.fig
   grass-addons/grass6/imagery/i.spec.unmix/mixed_pixels_spectrum.png
   grass-addons/grass6/imagery/i.spec.unmix/sample/xgobi_3d.png
   grass-addons/grass6/imagery/i.spec.unmix/sample/xgobi_supersession.png
Removed:
   grass-addons/grass6/imagery/i.spec.unmix/README
   grass-addons/grass6/imagery/i.spec.unmix/sample/color.sh
Modified:
   grass-addons/grass6/imagery/i.spec.unmix/Makefile
   grass-addons/grass6/imagery/i.spec.unmix/description.html
   grass-addons/grass6/imagery/i.spec.unmix/la_extra.c
   grass-addons/grass6/imagery/i.spec.unmix/la_extra.h
   grass-addons/grass6/imagery/i.spec.unmix/main.c
   grass-addons/grass6/imagery/i.spec.unmix/open.c
   grass-addons/grass6/imagery/i.spec.unmix/open.h
   grass-addons/grass6/imagery/i.spec.unmix/sample/diplom96.dat
   grass-addons/grass6/imagery/i.spec.unmix/sample/diplom97.dat
   grass-addons/grass6/imagery/i.spec.unmix/sample/noshadow.sh
   grass-addons/grass6/imagery/i.spec.unmix/sample/run.sh
   grass-addons/grass6/imagery/i.spec.unmix/sample/spectrum.dat
   grass-addons/grass6/imagery/i.spec.unmix/spec_angle.c
Log:
minor cleanup; +screenshots


Property changes on: grass-addons/grass6/imagery/i.spec.unmix/Makefile
___________________________________________________________________
Added: svn:mime-type
   + text/x-makefile

Deleted: grass-addons/grass6/imagery/i.spec.unmix/README
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/README	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/README	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,6 +0,0 @@
-horizontal vector x vertical vector = a number
-vertical vector x  horizontal vector = matrix
-matrix x vertical vector = vertical vector
-horizontal vector x matrix = horizontal vector
-matrix A x matrix B = matrix C
-matrix B x matrix A = matrix D

Copied: grass-addons/grass6/imagery/i.spec.unmix/README.txt (from rev 54194, grass-addons/grass6/imagery/i.spec.unmix/README)
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/README.txt	                        (rev 0)
+++ grass-addons/grass6/imagery/i.spec.unmix/README.txt	2012-12-05 14:14:40 UTC (rev 54203)
@@ -0,0 +1,8 @@
+Hints for matrix algebra:
+
+- horizontal vector x vertical vector = a number
+- vertical vector x  horizontal vector = matrix
+- matrix x vertical vector = vertical vector
+- horizontal vector x matrix = horizontal vector
+- matrix A x matrix B = matrix C
+- matrix B x matrix A = matrix D


Property changes on: grass-addons/grass6/imagery/i.spec.unmix/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Modified: grass-addons/grass6/imagery/i.spec.unmix/description.html
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/description.html	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/description.html	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,26 +1,71 @@
 <h2>DESCRIPTION</h2>
 
-<p><em>i.spec.unmix</em> is used to Spectral Unmixing.
+<em>i.spec.unmix</em> is used to perform Spectral Unmixing.
 
+<!-- TODO: migrate text from Neteler et al 2005 to this manual -->
+
+<p>
+<center>
+<img src="mixed_pixels_spectrum.png" alt="Mixed pixels">Concept of mixed pixels (Landsat example)
+</center>
+
 <h2>EXAMPLES</h2>
 
+<!-- see sample/run.sh, update to NC sample data set -->
+
 <div class="code"><pre>
-TODO
+g.region rast=lsat7_2002_10 -p
+
+# Find pure endmembers, they are supposed to be in the corners of
+# the PCA feature space (or use spectral measurement data)
+
+i.pca -n input="lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70" out=pca_lsat7_2002
+d.correlate layer1=pca_lsat7_2002.1 layer2=pca_lsat7_2002.2
+
+# TODO: problem: how to obtain the unprojected coordinates for the corner pixels?
+# (in 1998 the xgobi software did this nicely, check today's ggobi)
+
+
+i.group group=lsat7_2002 subgroup=lsat7_2002 \
+  input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70
+
+i.spec.unmix group=lsat7_2002 matrix=sample/spectrum.dat result=lsat7_2002_unmix \
+  error=lsat7_2002_unmix_err iter=lsat7_2002_unmix_iterations
+
+# todo: reclass to 0..100%
 </pre></div>
 
 <h2>REFERENCES</h2>
 
-Neteler, M. (1999): Spectral Mixture Analysis von Satellitendaten zur Bestimmung von Bodenbedeckungsgraden im Hinblick auf die Erosionsmodellierung. M.Sc. thesis, University of Hannover.
+<ul>
+<li> Neteler, M. (1999): Spectral Mixture Analysis von Satellitendaten zur 
+Bestimmung von Bodenbedeckungsgraden im Hinblick auf die 
+Erosionsmodellierung. M.Sc. thesis, University of Hannover.</li>
+<li> Neteler, M., D. Grasso, I. Michelazzi, L. Miori, S. Merler, and 
+C. Furlanello. New image processing tools for GRASS. In Proc. 
+Free/Libre and Open Source Software for Geoinformatics: 
+GIS-GRASS Users Conference 2004, Sept. 12-14, Bangkok, Thailand, 
+2004. http://gisws.media.osaka-cu.ac.jp/grass04/viewabstract.php?id=37 (PDF)</li>
+<li> Neteler, M., D. Grasso, I. Michelazzi, L. Miori, S. Merler, 
+and C. Furlanello, 2005. An integrated toolbox for image registration,
+fusion and classification. International Journal of Geoinformatics. 
+Special Issue on FOSS/GRASS 2004 and GIS-IDEAS 2004, 1(1), pp. 51-61, 
+March 2005.</li>
 
-Neteler, M., D. Grasso, I. Michelazzi, L. Miori, S. Merler, and C. Furlanello. New image processing tools for GRASS. In Proc. Free/Libre and Open Source Software for Geoinformatics: GIS-GRASS Users Conference 2004, Sept. 12-14, Bangkok, Thailand, 2004. http://gisws.media.osaka-cu.ac.jp/grass04/viewabstract.php?id=37 (PDF)
+<h2>SEE ALSO</h2>
 
-Neteler, M., D. Grasso, I. Michelazzi, L. Miori, S. Merler, and C. Furlanello, 2005. An integrated toolbox for image registration, fusion and classification. International Journal of Geoinformatics. Special Issue on FOSS/GRASS 2004 and GIS-IDEAS 2004, 1(1), pp. 51-61, March 2005.
+i.spec.sam
 
-<h2>SEE ALSO</h2>
+http://www.research.att.com/~andreas/xgobi/
 
+http://www.public.iastate.edu/~dicook/xgobi-book/xgobi.html
+
+http://lib.stat.cmu.edu/general/XGobi/
 <h2>AUTHOR</h2>
 
-Markus Neteler, University of Hannover.
+Markus Neteler, University of Hannover, 1999
+<p>
+Mohammed Rashad (rashadkm gmail.com) (update to GRASS 6)
 
 <p>
 <i>Last changed: $Date$</i>

Modified: grass-addons/grass6/imagery/i.spec.unmix/la_extra.c
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/la_extra.c	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/la_extra.c	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,14 +1,10 @@
+/* TODO: move to GMATHLIB? */
 
-
 #include <stdio.h>		/* needed here for ifdef/else */
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
 
-
-/********
- ******** only compile this LAPACK/BLAS wrapper file if g2c.h is present!
- ********/
 #include <grass/config.h>
 
 #include <grass/gis.h>
@@ -17,8 +13,6 @@
 #include "la_extra.h"
 
 
-
-
 vec_struct *G_matvect_get_column2(mat_struct * mt, int col)
 {
     int i;			/* loop */
@@ -256,12 +250,10 @@
 
     if (!out) {
 	G_fatal_error("mv_mltsss3(error)");
-	exit(1);
 	out = G_vec_get2(A->rows, out);
     }
     if (out->dim != A->rows) {
 	G_fatal_error("mv_mlt3(error)");
-	exit(1);
 	out = G_vec_resize(out, A->rows);
     }
 
@@ -295,8 +287,6 @@
 }
 
 
-
-
 VEC *G_vec_resize(VEC * in, int size)
 {
 

Modified: grass-addons/grass6/imagery/i.spec.unmix/la_extra.h
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/la_extra.h	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/la_extra.h	2012-12-05 14:14:40 UTC (rev 54203)
@@ -13,8 +13,6 @@
 vec_struct *G_matvect_get_column2(mat_struct * mt, int col);
 vec_struct *G_vector_product(vec_struct *, vec_struct *);
 
-
-
 VEC *G_vec_get(int size);
 VEC *G_vec_get2(int size, VEC * vector);
 void G_vec_print(VEC * vector, const char *name);

Modified: grass-addons/grass6/imagery/i.spec.unmix/main.c
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/main.c	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/main.c	2012-12-05 14:14:40 UTC (rev 54203)
@@ -3,17 +3,24 @@
  *
  * MODULE:       i.spec.unmix
  *
- * AUTHOR(S):    Markus Neteler  <neteler itc.it>
- *               Mohammed Rashad <rashadkm gmail.com>(updates)
+ * AUTHOR(S):    Markus Neteler  <neteler osgeo.org>: Original GRASS 5 version
+ *               Mohammed Rashad <rashadkm gmail.com> (update to GRASS 6)
  *
  * PURPOSE:      Spectral mixture analysis of satellite/aerial images
+ * 
+ * Notes:        The original version was implemented with MESCHACH, the actual
+ *               version is instead using BLAS/LAPACK via GMATHLIB.
+ *               An error minimization approach is used instead of Single Value
+ *               Decomposition (SVD) which is numerically unstable. See the
+ *               related journal publication from 2005 for details.
  *
- * COPYRIGHT:    (C) 2006-2012 by the GRASS Development Team
+ * COPYRIGHT:    (C) 1999-2012 by the GRASS Development Team
  *
  *               This program is free software under the GNU General
  *               Public License (>=v2). Read the file COPYING that
  *               comes with GRASS for details.
  *
+ * TODO:         test with synthetic mixed pixels; speed up code
  *****************************************************************************/
 
 #define GLOBAL
@@ -38,8 +45,8 @@
 #include <grass/glocale.h>
 #include "global.h"
 
-#include "la_extra.h"
 #include "open.h"
+#include "la_extra.h"
 
 
 #define GAMMA 10		/* last row value in Matrix and last b vector element
@@ -77,7 +84,6 @@
 
     /* initialize GIS engine */
     G_gisinit(argv[0]);
-
     module = G_define_module();
 
     module->keywords = _("imagery, spectral unmixing");
@@ -86,19 +92,14 @@
 
     parm.group = G_define_standard_option(G_OPT_I_GROUP);
 
-    parm.matrixfile = G_define_option();
+    parm.matrixfile = G_define_standard_option(G_OPT_F_INPUT);
     parm.matrixfile->key = "matrix";
     parm.matrixfile->type = TYPE_STRING;
     parm.matrixfile->required = YES;
-    parm.matrixfile->gisprompt = "old_file,file";
     parm.matrixfile->label = _("Open Matrix file");
     parm.matrixfile->description =
 	_("Matrix file containing spectral signatures");
 
-
-
-
-
     parm.result = G_define_option();
     parm.result->key = "result";
     parm.result->description =
@@ -111,7 +112,7 @@
 
     parm.iter = G_define_standard_option(G_OPT_R_OUTPUT);
     parm.iter->key = "iter";
-    parm.iter->description = _("Raster map to hold number of iterations");
+    parm.iter->description = _("Name of raster map to hold number of iterations");
 
     if (G_parser(argc, argv))
 
@@ -171,14 +172,9 @@
 		/*  get the max. element of this vector */
 		max2 = G_vector_norm_maxval(Avector2, 1);
 
-
-
-
-
 		if (max2 > max1)
 		    temp = max2;
 
-
 		/* find max of matrix A */
 
 		if (temp > max_total)
@@ -224,22 +220,16 @@
    */
 
 
-
-
     /* memory allocation */
     A_tilde = G_matrix_init(A->rows + 1, A->cols, A->rows + 1);
     if (A_tilde == NULL)
 	G_fatal_error(_("Unable to allocate memory for matrix"));
 
-
-
     for (i = 0; i < A->rows; i++)
 	for (j = 0; j < A->cols; j++)
 	    G_matrix_set_element(A_tilde, i, j,
 				 G_matrix_get_element(A, i, j));
 
-
-
     /* fill last row with 1 elements  */
 
     for (j = 0; j < A_tilde->cols; j++) {
@@ -265,11 +255,8 @@
 
     /* calculate the transpose of A_tilde */
 
-
     A_tilde_trans = G_matrix_transpose(A_tilde);
 
-
-
     /* initialize some values
 
     *  step size must be small enough for covergence  of iteration:
@@ -277,10 +264,11 @@
     *  mu = 0.000000001;   step size for spectra in range of mW/m^2/um
     *  mu = 0.000001;      step size for spectra in range of reflectance   
     *  check  max_total for number of digits to configure mu size
-    *  mu = 0.0001 * pow(10, -1 * ceil(log10(max_total)));
     */
+    mu = 0.0001 * pow(10, -1 * ceil(log10(max_total)));
+    G_message("mu = %lf", mu);
 
-
+    // Missing? startvector = G_vector_init (0, 0, RVEC);
     startvector = G_vec_get2(A->cols, startvector);
 
 
@@ -289,15 +277,14 @@
 	G_fatal_error(_("Unable to allocate memory for vector"));
 
 
-
+    // Missing? A_times_startvector = G_vector_init (0, 0, RVEC);
     A_times_startvector = G_vec_get2(A_tilde->rows, A_times_startvector);	/* length: no. of bands   */
+    // Missing? errorvector = G_vector_init (0, 0, RVEC);
     errorvector = G_vec_get2(A_tilde->rows, errorvector);	/* length: no. of bands   */
+    // Missing? temp = G_vector_init (0, 0, RVEC);
     temp = G_vec_get2(A_tilde->cols, temp);	/* length: no. of spectra */
     /*  A_tilde_trans_mu = m_get(A_tilde->m,A_tilde->n); */
 
-
-
-
     /* length: no. of bands   */
 
     if (A_times_startvector == NULL)
@@ -325,7 +312,6 @@
     G_message(_("Calculating for %i x %i pixels (%i bands) = %i pixelvectors."),
 	      nrows, ncols, Ref.nfiles, (ncols * ncols));
 
-
     for (row = 0; row < nrows; row++) {
 	int col, band;
 
@@ -343,13 +329,10 @@
 	*/
 	for (col = 0; col < ncols; col++) {
 
-
-
 	    double change = 1000;
 	    double deviation = 1000;
 	    int iterations = 0;
 
-
 	    /* get pixel values of each band and store in b vector: */
 	    /* length: no. of bands + 1 (GAMMA) */
 
@@ -359,15 +342,13 @@
 	    if (b_gamma == NULL)
 		G_fatal_error(_("Unable to allocate memory for matrix"));
 
-
-
+	    /* G_message("%d", A_tilde->rows);   */
 	    for (band = 0; band < Ref.nfiles; band++) {
 		b_gamma->ve[band] = cell[band][col];
 
 		/*G_matrix_set_element (b_gamma, 0, band, cell[band][col]); */
 	    }
 
-
 	    /* add GAMMA for 1. constraint as last element */
 	    b_gamma->ve[Ref.nfiles] = GAMMA;
 	    /* G_matrix_set_element (b_gamma, 0, Ref.nfiles, GAMMA); */
@@ -392,7 +373,7 @@
 
 
 
-		A_times_startvector =   mv_mlt(A_tilde, startvector, A_times_startvector);
+		A_times_startvector = mv_mlt(A_tilde, startvector, A_times_startvector);
 
 
 		errorvector = v_sub(A_times_startvector, b_gamma, errorvector);
@@ -440,15 +421,14 @@
 	    for (i = 0; i < A->cols; i++)	/* no. of spectra */
 		result_cell[i][col] = (CELL) (100 * fraction->ve[i]);
 
-
-
 	    /* save error and iterations */
 	    error_cell[col] = (CELL) (100 * error);
 	    iter_cell[col] = iterations;
 
-	    /****V_FREE(fraction);
-	    V_FREE(b);
-	    *****/    
+	    /*
+	     V_FREE(fraction);
+	     V_FREE(b);
+	    **/    
 
 	} /* end cols loop */
 
@@ -493,9 +473,11 @@
 	char command[80];
 
 	G_close_cell(error_fd);
+    /* TODO
 	sprintf(command, "r.colors map=%s color=gyr >/dev/null",
 		parm.error->answer);
-	/* G_system (command); */
+	G_system (command);
+    */
     }
 
     if (iter_fd > 0)

Added: grass-addons/grass6/imagery/i.spec.unmix/mixed_pixels_spectrum.fig
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/mixed_pixels_spectrum.fig	                        (rev 0)
+++ grass-addons/grass6/imagery/i.spec.unmix/mixed_pixels_spectrum.fig	2012-12-05 14:14:40 UTC (rev 54203)
@@ -0,0 +1,225 @@
+#FIG 3.2  Produced by xfig version 3.2.5b
+Landscape
+Center
+Metric
+A4      
+100.00
+Single
+-2
+1200 2
+6 1453 3340 1911 3737
+6 1453 3340 1911 3737
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 1453 3737 1453 3340
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 1453 3737 1911 3737
+-6
+3 2 0 1 0 7 0 0 -1 0.000 0 0 0 4
+	 1458 3620 1529 3574 1702 3523 1891 3503
+	 0.000 -1.000 -1.000 0.000
+-6
+6 1956 2774 2394 3152
+6 1956 2774 2394 3152
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 1956 3152 1956 2774
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 1956 3152 2394 3152
+-6
+3 2 0 1 0 7 0 0 -1 0.000 0 0 0 6
+	 1956 3108 2029 3070 2063 3099 2136 2856 2292 2861 2369 2963
+	 0.000 -1.000 -1.000 -1.000 -1.000 0.000
+-6
+6 2645 2248 3061 2607
+6 2645 2248 3061 2607
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2645 2607 2645 2248
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2645 2607 3061 2607
+-6
+3 2 0 1 0 7 0 0 -1 0.000 0 0 0 4
+	 2650 2436 2797 2543 2881 2589 3024 2607
+	 0.000 -1.000 -1.000 0.000
+-6
+6 4507 2247 4903 2591
+6 4507 2247 4903 2591
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 4507 2591 4507 2247
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 4507 2591 4903 2591
+-6
+3 2 0 1 0 7 0 0 -1 0.000 0 0 0 6
+	 4507 2533 4542 2515 4573 2538 4683 2331 4744 2353 4876 2485
+	 0.000 -1.000 -1.000 -1.000 -1.000 0.000
+-6
+6 2835 1395 4545 1845
+2 3 0 1 0 30 50 0 20 0.000 0 0 -1 0 0 5
+	 3685 1630 4281 1629 4010 1845 3430 1845 3685 1630
+2 3 0 1 0 30 50 0 20 0.000 0 0 -1 0 0 5
+	 3384 1434 3925 1435 3693 1623 3126 1623 3384 1434
+2 3 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
+	 3930 1435 4524 1434 4290 1626 3699 1626 3930 1435
+2 3 0 1 0 5 50 0 20 0.000 0 0 -1 0 0 5
+	 3130 1625 3695 1625 3435 1845 2835 1845 3130 1625
+-6
+6 2835 1260 4545 1710
+2 3 0 1 0 4 50 0 20 0.000 0 0 -1 0 0 5
+	 3685 1456 4281 1455 4010 1671 3430 1671 3685 1456
+2 3 0 1 0 28 50 0 20 0.000 0 0 -1 0 0 5
+	 3384 1260 3925 1261 3693 1449 3126 1449 3384 1260
+2 3 0 1 0 31 50 0 20 0.000 0 0 -1 0 0 5
+	 3930 1261 4524 1260 4290 1452 3699 1452 3930 1261
+2 3 0 1 0 1 50 0 20 0.000 0 0 -1 0 0 5
+	 3130 1451 3695 1451 3435 1671 2835 1671 3130 1451
+-6
+6 2835 1080 4545 1530
+2 3 0 1 0 4 50 0 20 0.000 0 0 -1 0 0 5
+	 3685 1276 4281 1275 4010 1491 3430 1491 3685 1276
+2 3 0 1 0 2 50 0 20 0.000 0 0 -1 0 0 5
+	 3384 1080 3925 1081 3693 1269 3126 1269 3384 1080
+2 3 0 1 0 4 50 0 20 0.000 0 0 -1 0 0 5
+	 3930 1081 4524 1080 4290 1272 3699 1272 3930 1081
+2 3 0 1 0 25 50 0 20 0.000 0 0 -1 0 0 5
+	 3130 1271 3695 1271 3435 1491 2835 1491 3130 1271
+-6
+6 2835 900 4545 1350
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 3240 1215 3240 1125
+2 3 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
+	 3685 1096 4281 1095 4010 1311 3430 1311 3685 1096
+2 3 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
+	 3130 1091 3695 1091 3435 1311 2835 1311 3130 1091
+2 3 0 1 0 17 50 0 20 0.000 0 0 -1 0 0 5
+	 3384 900 3925 901 3693 1089 3126 1089 3384 900
+2 3 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
+	 3930 901 4524 900 4290 1092 3699 1092 3930 901
+-6
+6 2745 720 4545 1170
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 3240 1035 3240 945
+2 3 0 1 0 4 50 0 20 0.000 0 0 -1 0 0 5
+	 3662 916 4258 915 3987 1131 3407 1131 3662 916
+2 3 0 1 0 2 50 0 20 0.000 0 0 -1 0 0 5
+	 3361 720 3902 721 3670 909 3103 909 3361 720
+2 3 0 1 0 2 50 0 20 0.000 0 0 -1 0 0 5
+	 3907 721 4501 720 4267 912 3676 912 3907 721
+2 3 0 1 0 3 50 0 20 0.000 0 0 -1 0 0 5
+	 3107 911 3672 911 3412 1131 2812 1131 3107 911
+4 0 0 0 0 4 6 0.0000 0 75 60 2745 990 1\001
+4 0 0 0 0 4 6 0.0000 0 75 60 2745 1170 2\001
+-6
+6 2835 540 4545 990
+2 3 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
+	 3130 731 3695 731 3435 951 2835 951 3130 731
+2 3 0 1 0 17 50 0 20 0.000 0 0 -1 0 0 5
+	 3384 540 3925 541 3693 729 3126 729 3384 540
+2 3 0 1 0 9 50 0 20 0.000 0 0 -1 0 0 5
+	 3685 736 4281 735 4010 951 3430 951 3685 736
+2 3 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
+	 3930 541 4524 540 4290 732 3699 732 3930 541
+-6
+6 5040 900 5670 1215
+4 0 0 0 0 4 9 0.0000 0 105 555 5040 1035 Satellite\001
+4 0 0 0 0 4 9 0.0000 0 105 630 5040 1215 channels\001
+-6
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2949 4004 4254 2699
+2 3 0 1 0 2 50 0 20 0.000 0 0 -1 0 0 5
+	 2844 3434 4097 2931 4487 3164 3227 3726 2844 3434
+2 3 0 1 0 1 50 0 30 0.000 0 0 -1 0 0 10
+	 4493 3171 4748 3194 4883 3201 4088 3996 3863 3996 3525 3891
+	 4380 3486 4110 3329 4485 3164 4493 3171
+2 3 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 9
+	 2423 3419 2491 3426 2671 3441 2843 3434 3241 3719 2956 4004
+	 1823 4004 2408 3419 2423 3419
+2 3 0 1 0 5 50 0 30 0.000 0 0 -1 0 0 5
+	 3533 3899 3870 4004 2543 3996 3233 3711 3533 3899
+2 3 0 1 0 4 50 0 24 0.000 0 0 -1 0 0 5
+	 4125 3336 4373 3486 3525 3884 3233 3719 4125 3336
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2
+	3 0 1.00 60.00 120.00
+	 2430 2947 3202 3450
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2
+	3 0 1.00 60.00 120.00
+	 3075 2437 3375 2977
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2
+	3 0 1.00 60.00 120.00
+	 1945 3544 2380 3709
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 3240 1755 3240 1665
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 3240 1575 3240 1485
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 3240 1395 3240 1305
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+	 4476 2212 4942 2212 4942 2617 4476 2617 4476 2212
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+	 1402 3315 1935 3315 1935 3780 1402 3780 1402 3315
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+	 1905 2745 2430 2745 2430 3187 1905 3187 1905 2745
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+	 2587 2220 3075 2220 3075 2647 2587 2647 2587 2220
+2 3 0 1 0 0 0 0 20 0.000 0 0 -1 0 0 8
+	 3550 2262 3799 2138 4048 2262 3923 2262 3923 2386 3675 2386
+	 3675 2262 3550 2262
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2
+	3 0 1.00 60.00 120.00
+	 4710 2625 4657 2925
+2 3 0 1 0 29 100 0 20 0.000 0 0 -1 0 0 5
+	 1824 4004 3129 2699 5379 2699 4074 4004 1824 4004
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2655 585 3240 855
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 1 2
+	3 1 1.00 60.00 120.00
+	3 1 1.00 60.00 120.00
+	 2942 4068 4082 4068
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 1 2
+	3 1 1.00 60.00 120.00
+	3 1 1.00 60.00 120.00
+	 4872 3288 4177 4003
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2148 689 2586 689
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+	 2099 270 2648 270 2648 855 2099 855 2099 270
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2274 687 2274 732
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2491 687 2491 732
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2555 687 2555 732
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2424 687 2424 732
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2356 687 2356 732
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2202 687 2202 732
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2150 689 2150 311
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 6
+	 2155 505 2235 425 2345 505 2415 475 2480 595 2561 648
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+	 2500 3322 4755 3322
+3 3 0 1 0 13 50 0 20 0.000 0 0 0 9
+	 3069 2887 3069 2842 3159 2797 3339 2797 3519 2842 3609 2932
+	 3474 3067 3294 3022 3069 2977
+	 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000
+	 -1.000
+4 0 0 0 0 4 8 5.9341 0 75 75 2439 3770 a\001
+4 0 0 0 0 4 8 5.9341 0 75 75 3959 3191 c\001
+4 0 0 0 0 4 8 5.9341 0 105 45 3195 3905 f\001
+4 0 0 0 0 4 8 5.9341 0 105 75 3784 3642 d\001
+4 0 0 0 0 4 8 5.9341 0 105 75 4391 2884 g\001
+4 0 0 0 0 4 8 5.9341 0 105 75 3164 2936 b\001
+4 0 0 0 0 4 8 5.9341 0 75 75 4270 3654 e\001
+4 0 0 0 0 4 6 0.0000 0 75 60 2745 1350 3\001
+4 0 0 0 0 4 6 0.0000 0 75 60 2745 1530 4\001
+4 0 0 0 0 4 6 0.0000 0 75 60 2745 1710 5\001
+4 0 0 0 0 4 6 0.0000 0 75 60 2745 1890 6\001
+4 0 0 0 0 4 9 0.0000 0 105 765 945 2880 continuous\001
+4 0 0 0 0 4 9 0.0000 0 135 630 5040 3240 complete\001
+4 0 0 0 0 4 9 0.0000 0 135 945 5040 3420 ground signal\001
+4 0 0 0 0 4 8 0.0000 0 90 270 3427 4208 30m\001
+4 0 0 0 0 4 8 0.8378 0 90 270 4534 3839 30m\001
+4 0 0 0 0 4 6 0.0000 0 75 540 2150 818  1 2 3 4 5 6\001
+4 0 0 0 0 4 9 0.0000 0 135 1005 945 3060 Object spectra\001
+4 0 0 0 0 4 9 0.0000 0 135 1080 945 675 mixed spectrum\001
+4 0 0 0 0 4 9 0.0000 0 105 540 945 495 discrete\001

Added: grass-addons/grass6/imagery/i.spec.unmix/mixed_pixels_spectrum.png
===================================================================
(Binary files differ)


Property changes on: grass-addons/grass6/imagery/i.spec.unmix/mixed_pixels_spectrum.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Modified: grass-addons/grass6/imagery/i.spec.unmix/open.c
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/open.c	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/open.c	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,4 +1,4 @@
-/* Spextral unmixing with Singular Value Decomposition */
+/* Spextral unmixing */
 /* (c) 15. Jan. 1999 Markus Neteler, Hannover */
 
 /* Cited references are from
@@ -138,12 +138,6 @@
 }
 
 
-
-
-
-
-
-
 mat_struct *open_files2(char *matrixfile,
 			char *img_grp,
 			char *result_prefix,
@@ -240,7 +234,6 @@
     }
 
 
-
     /* open files for results */
     result_cell = (CELL **) G_malloc(Ref.nfiles * sizeof(CELL *));
     resultfd = (int *)G_malloc(Ref.nfiles * sizeof(int));
@@ -279,8 +272,6 @@
 	    iter_cell = G_allocate_cell_buf();
     }
 
-
-
     /* give back number of output files (= Ref.nfiles) */
     return A;
 }


Property changes on: grass-addons/grass6/imagery/i.spec.unmix/open.h
___________________________________________________________________
Added: svn:mime-type
   + text/x-chdr
Added: svn:eol-style
   + native

Deleted: grass-addons/grass6/imagery/i.spec.unmix/sample/color.sh
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/sample/color.sh	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/sample/color.sh	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,5 +0,0 @@
-r.colors map=$1 col=rules 2>&1 > /dev/null << EOF
-0 0 0 0
-100 0 255 0
-end
-EOF

Modified: grass-addons/grass6/imagery/i.spec.unmix/sample/diplom96.dat
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/sample/diplom96.dat	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/sample/diplom96.dat	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,11 +1,11 @@
-# Kanäle: r g b i1 i2 i3
-# Spektren zeilenweise eingeben!
+# Channels: r g b i1 i2 i3
+# Enter spectra linewise!
 #
 # 0: Vegetation
-# 1: unbedeckter Boden
-# 2: ? im (Norden) Wald bei Bodenburg
+# 1: Bare soil
+# 2: unidentified spectrum
 #
-# Zeilen, Spalten
+# Rows, Columns
 Matrix: 3 by 6
 row0: 0 4 0 83 20 0 
 row1: 13 24 26 51 53 48 

Modified: grass-addons/grass6/imagery/i.spec.unmix/sample/diplom97.dat
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/sample/diplom97.dat	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/sample/diplom97.dat	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,5 +1,5 @@
-# Kanäle: r g b i1 i2 i3
-# Spektren zeilenweise eingeben!
+# Channels: r g b i1 i2 i3
+# Enter spectra linewise!
 #
 #3570637.5 5766432.58928571
 #3571837.5 5764210.76785714
@@ -7,13 +7,13 @@
 #3573662.5 5763287.08928571
 #3573112.5 5766058.125
 #
-# 0: Wasser ?
-# 1: Vegetation volles Wachstum
-# 2: Vegetation auflaufend
-# 3: unbedeckter Boden
-# 4: Boden/Vegetation?
+# 0: Water ?
+# 1: Vegetation fully emerged
+# 2: Vegetation growing (young)
+# 3: Bare soil
+# 4: Soil/Vegetation?
 # 
-# Zeilen, Spalten
+# Rows, Columns
 Matrix: 5 by 6
 row0: 0 0 0 14 7 0 
 row1: 1 4 2 81 21 7 

Modified: grass-addons/grass6/imagery/i.spec.unmix/sample/noshadow.sh
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/sample/noshadow.sh	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/sample/noshadow.sh	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,8 +1,9 @@
- r.mapcalc unmix1_noshade = "(unmix.1/(unmix.1-unmix.3)) + unmix.1"
- r.mapcalc unmix2_noshade = "(unmix.2/(unmix.2-unmix.3)) + unmix.2"
+r.mapcalc unmix1_noshade = "(unmix.1/(unmix.1-unmix.3)) + unmix.1"
+r.mapcalc unmix2_noshade = "(unmix.2/(unmix.2-unmix.3)) + unmix.2"
 cat unmix_reclass25.dat |r.reclass i=unmix1_noshade o=unmix1_noshade.recl
 cat unmix_reclass25.dat |r.reclass i=unmix2_noshade o=unmix2_noshade.recl
-cat unmix_reclass25.dat |r.reclass i=bodenbedeckungsgrad95 o=bdgrad95.recl
+cat unmix_reclass25.dat |r.reclass i=degree_soilcover95 o=bdgrad95.recl
 r.kappa -mwz classification=unmix1_noshade.recl reference=bdgrad95.recl output=kappa.1
 r.kappa -mwz classification=unmix2_noshade.recl reference=bdgrad95.recl output=kappa.2
-textedit kappa.1&textedit kappa.2&
+textedit kappa.1 &
+textedit kappa.2 &

Modified: grass-addons/grass6/imagery/i.spec.unmix/sample/run.sh
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/sample/run.sh	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/sample/run.sh	2012-12-05 14:14:40 UTC (rev 54203)
@@ -10,8 +10,9 @@
 
 r.kappa -mwz classification=unmix971.recl reference=bdg_wrede.recl output=kappa.1
 r.kappa -mwz classification=unmix972.recl reference=bdg_wrede.recl output=kappa.2
-#r.kappa -mwz classification=unmix3.recl reference=bodenbedeckungsgrad95 output=kappa.3
-#r.kappa -mwz classification=unmix4.recl reference=bodenbedeckungsgrad95 output=kappa.4
-#r.kappa -mwz classification=unmix5.recl reference=bodenbedeckungsgrad95 output=kappa.5
-#r.kappa -mwz classification=unmix6.recl reference=bodenbedeckungsgrad95 output=kappa.6
-textedit kappa.1&textedit kappa.2&
+#r.kappa -mwz classification=unmix3.recl reference=degree_soilcover95 output=kappa.3
+#r.kappa -mwz classification=unmix4.recl reference=degree_soilcover95 output=kappa.4
+#r.kappa -mwz classification=unmix5.recl reference=degree_soilcover95 output=kappa.5
+#r.kappa -mwz classification=unmix6.recl reference=degree_soilcover95 output=kappa.6
+textedit kappa.1 &
+textedit kappa.2 &

Modified: grass-addons/grass6/imagery/i.spec.unmix/sample/spectrum.dat
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/sample/spectrum.dat	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/sample/spectrum.dat	2012-12-05 14:14:40 UTC (rev 54203)
@@ -1,9 +1,9 @@
-# Kanäle: r g b i1 i2 i3
-# Spektren zeilenweise eingeben!
+# Channels: r g b i1 i2 i3
+# Enter spectra linewise!
 # 1. Sagebrush 
 # 2. Saltbush
-# 3. Boden
-# 4. Trockengras
+# 3. Soil
+# 4. Dry grass
 #
 Matrix: 4 by 6
 row0:  8.87  13.14  11.71  35.85  28.26 10.54

Added: grass-addons/grass6/imagery/i.spec.unmix/sample/xgobi_3d.png
===================================================================
(Binary files differ)


Property changes on: grass-addons/grass6/imagery/i.spec.unmix/sample/xgobi_3d.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Added: grass-addons/grass6/imagery/i.spec.unmix/sample/xgobi_supersession.png
===================================================================
(Binary files differ)


Property changes on: grass-addons/grass6/imagery/i.spec.unmix/sample/xgobi_supersession.png
___________________________________________________________________
Added: svn:mime-type
   + image/gif

Modified: grass-addons/grass6/imagery/i.spec.unmix/spec_angle.c
===================================================================
--- grass-addons/grass6/imagery/i.spec.unmix/spec_angle.c	2012-12-05 13:48:48 UTC (rev 54202)
+++ grass-addons/grass6/imagery/i.spec.unmix/spec_angle.c	2012-12-05 14:14:40 UTC (rev 54203)
@@ -11,7 +11,6 @@
 #include "global.h"
 #include "la_extra.h"
 
-
 /* input mat_struct A, vec_struct Avector1, Avector2
  * output cur_angle
  *



More information about the grass-commit mailing list