[GRASS-user] sigfile structure
Markus Neteler
neteler at osgeo.org
Sat Jul 25 14:50:19 EDT 2009
On Thu, Jul 23, 2009 at 5:17 PM, Stefan Sylla<stefansylla at gmx.de> wrote:
>
> Dear all,
>
> I am working on a supervised classification for my Aster satellite images
> and created some signature files with i.cluster (image-group contains 9
> image-bands) with an output like e.g.:
>
>
> #produced by i.cluster
> #Class 1
> 7
> 0.00726695 0.00908388 0.0651311 0.036496 0.0099363 0.021101 0.0194927
> 0.00995301 0.00697795
> 4.778e-06
> 8.10261e-06 2.02925e-05
> 6.38384e-06 6.50281e-07 2.72867e-05
> 7.41077e-06 1.36557e-05 8.05998e-06 1.31207e-05
> 6.16329e-06 1.59079e-05 -9.96889e-07 9.73688e-06 1.35483e-05
> 1.24603e-05 2.73096e-05 6.19277e-06 2.09376e-05 2.15804e-05 3.91866e-05
> 3.07257e-06 7.9305e-06 -4.96976e-07 4.8541e-06 6.7542e-06 1.07584e-05
> 3.36715e-06
> 7.96907e-06 1.65057e-05 5.58552e-06 1.36388e-05 1.26518e-05 2.41827e-05
> 6.30724e-06 1.51901e-05
> 5.93452e-37 -7.8253e-37 -1.44281e-36 -7.04914e-37 8.48927e-37 -5.28268e-37
> -1.45255e-36 5.11738e-37 4.47895e-37
>
>
> For the oncoming procedure I need to create a signature file manually, but I
> do not understand the whole structure of the file yet.
>
> Clear is:
> #line 1 = header
> #line 2 = name of class
> #line 3 = number of pixels in class
> #line 4 = mean pixel values of every band (9 bands)
>
> but: what is the meaning of the values in the following lines??
>
> It would be great if anyone could give me a hint on that.
The relevant bits are these:
49 struct One_Sig
50 {
51 char desc[100];
52 int npoints;
53 double *mean; /* one mean for each band */
54 double **var; /* covariance band-band */
55 int status; /* may be used to 'delete' a signature */
56 float r, g, b; /* color */
57 int have_color;
58 };
59
60 struct Signature
61 {
62 int nbands;
63 int nsigs;
64 char title[100];
65 struct One_Sig *sig;
66 };
67
68 struct SubSig
69 {
70 double N;
71 double pi;
72 double *means;
73 double **R;
74 double **Rinv;
75 double cnst;
76 int used;
77 };
See
http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/include/imagery.h#L49
Hope this helps,
Markus
More information about the grass-user
mailing list