📄 clust_defs.h
字号:
#ifndef CLUST_DEFS_H#define CLUST_DEFS_H/*****************************************************//* This constant determines the ratio of the average *//* covariance to the minimum allowed covariance. *//* It is used to insure that the measured covariance *//* is not singular. It may need to be adjusted for *//* different applications. *//*****************************************************/#define COVAR_DYNAMIC_RANGE 1E5#define CLUSTER_FULL 1 /* Use full covariance matrix in clustering */#define CLUSTER_DIAG 0 /* Use diagonal covariance matrix in clustering */#define PI 3.141592654#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <float.h>/* SigSet (Signature Set) data stucture used throughout package. *//* ClassSig (Class Signature) data stucture holds the parameters *//* of a single Gaussian mixture model. SigSet.nclasses is the *//* number of ClassSig's in a SigSet. *//* SubSig (Subsignature) data stucture holds each component of a *//* Gaussian mixture model. SigSet.classSig[k].nsubclasses is the *//* number of SubSig's in a ClassSig. */struct SigSet;struct ClassSig;struct SubSig;struct ClassData;struct SubSig{ double N; /* expected number of pixels in subcluster */ double pi; /* probability of component in GMM */ double *means; /* mean of component in GMM */ double **R; /* convarance of component in GMM */ double **Rinv; /* inverse of R */ double cnst; /* normalizing constant for multivariate Gaussian */ int used;};struct ClassData{ int npixels; double SummedWeights; double **x; /* list of pixel vectors: x[npixels][nbands] */ double **p; /* prob pixel is in subclass: p[npixels][subclasses] */ double *w; /* weight of pixel: w[npixels] */};struct SigSet{ int nbands; int nclasses; char *title; ClassSig *classSig;};struct ClassSig{ long classnum; char *title; int used; int type; int nsubclasses; SubSig *subSig; ClassData classData;};#define SIGNATURE_TYPE_MIXED 1#endif /* CLUST_DEFS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -