📄 snaphu.h
字号:
#define OPTIONSHELPFULL\ "usage: snaphu [options] infile linelength [options]\n"\ "options:\n"\ " -t use topography mode costs (default)\n"\ " -d use deformation mode costs\n"\ " -s use smooth-solution mode costs\n"\ " -f <filename> read configuration parameters from file\n"\ " -o <filename> write output to file\n"\ " -a <filename> read amplitude data from file\n"\ " -A <filename> read power data from file\n"\ " -m <filename> read interferogram magnitude data from file\n"\ " -c <filename> read correlation data from file\n"\ " -e <filename> read coarse unwrapped-phase estimate from file\n"\ " -w <filename> read scalar weights from file\n"\ " -b <decimal> perpendicular baseline (meters, topo mode only)\n"\ " -p <decimal> Lp-norm parameter p\n"\ " -i do initialization and exit\n"\ " -n do not use statistical costs (with -p or -i)\n"\ " -u infile is already unwrapped; initialization not needed\n"\ " -q quantify cost of unwrapped input file then exit\n"\ " -g <filename> grow connected components mask and write to file\n"\ " -G <filename> grow connected components mask for unwrapped input\n"\ " -l <filename> log runtime parameters to file\n"\ " -v give verbose output\n"\ " --mst use MST algorithm for initialization (default)\n"\ " --mcf use MCF algorithm for initialization\n"\ " --aa <filename1> <filename2> read amplitude from next two files\n"\ " --AA <filename1> <filename2> read power from next two files\n"\ " --costinfile <filename> read statistical costs from file\n"\ " --costoutfile <filename> write statistical costs to file\n"\ " --tile <nrow> <ncol> <rowovrlp> <colovrlp> unwrap as nrow x ncol tiles\n"\ " --nproc <integer> number of processors used in tile mode\n"\ " --assemble <dirname> assemble unwrapped tiles in dir\n"\ " --piece <firstrow> <firstcol> <nrow> <ncol> unwrap subset of image\n" \ " --debug, --dumpall dump all intermediate data arrays\n"\ " --copyright, --info print copyright and bug report info\n"\ " -h, --help print this help text\n"\ "\n"#define OPTIONSHELPBRIEF\ "usage: snaphu [options] infile linelength [options]\n"\ "most common options:\n"\ " -t use topography mode costs (default)\n"\ " -d use deformation mode costs\n"\ " -s use smooth-solution mode costs\n"\ " -f <filename> read configuration parameters from file\n"\ " -o <filename> write output to file\n"\ " -a <filename> read amplitude data from file\n"\ " -c <filename> read correlation data from file\n"\ " -b <decimal> perpendicular baseline (meters)\n"\ " -i do initialization and exit\n"\ " -l <filename> log runtime parameters to file\n"\ " -v give verbose output\n"\ " --mst use MST algorithm for initialization (default)\n"\ " --mcf use MCF algorithm for initialization\n"\ "\n"\ "type snaphu -h for a complete list of options\n"\ "\n"#define COPYRIGHT\ "Copyright 2002 Board of Trustees, Leland Stanford Jr. University\n"\ "\n"\ "Except as noted below, permission to use, copy, modify, and\n"\ "distribute, this software and its documentation for any purpose is\n"\ "hereby granted without fee, provided that the above copyright notice\n"\ "appear in all copies and that both that copyright notice and this\n"\ "permission notice appear in supporting documentation, and that the\n"\ "name of the copyright holders be used in advertising or publicity\n"\ "pertaining to distribution of the software with specific, written\n"\ "prior permission, and that no fee is charged for further distribution\n"\ "of this software, or any modifications thereof. The copyright holder\n"\ "makes no representations about the suitability of this software for\n"\ "any purpose. It is provided \"as is\" without express or implied\n"\ "warranty.\n"\ "\n"\ "THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS\n"\ "SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n"\ "FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY\n"\ "SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER\n"\ "RESULTING FROM LOSS OF USE, DATA, PROFITS, QPA OR GPA, WHETHER IN AN\n"\ "ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT\n"\ "OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"\ "\n"\ "The parts of this software derived from the CS2 minimum cost flow\n"\ "solver written by A. V. Goldberg and B. Cherkassky are governed by the\n"\ "terms of the copyright holder of that software. Permission has been\n"\ "granted to use and distrubute that software for strictly noncommercial\n"\ "purposes as part of this package, provided that the following\n"\ "copyright notice from the original distribution and URL accompany the\n"\ "software:\n"\ "\n"\ " COPYRIGHT C 1995 IG Systems, Inc. Permission to use for\n"\ " evaluation purposes is granted provided that proper\n"\ " acknowledgments are given. For a commercial licence, contact\n"\ " igsys@eclipse.net.\n"\ "\n"\ " This software comes with NO WARRANTY, expressed or implied. By way\n"\ " of example, but not limitation, we make no representations of\n"\ " warranties of merchantability or fitness for any particular\n"\ " purpose or that the use of the software components or\n"\ " documentation will not infringe any patents, copyrights,\n"\ " trademarks, or other rights.\n"\ "\n"\ " http://www.igsystems.com/cs2\n"\ "\n"\ "\n"\ "Send snaphu bug reports to Curtis W. Chen (curtis@nova.stanford.edu).\n"\ "\n"/********************//* type definitions *//********************//* node data structure */typedef struct nodeST{ short row,col; /* row, col of this node */ unsigned long level; /* tree level */ struct nodeST *next; /* ptr to next node in thread or bucket */ struct nodeST *prev; /* ptr to previous node in thread or bucket */ struct nodeST *pred; /* parent node in tree */ long group; /* for marking label */ long incost,outcost; /* costs to, from root of tree */}nodeT;/* arc cost data structure */typedef struct costST{ short offset; /* offset of wrapped phase gradient from 0 */ short sigsq; /* variance due to decorrelation */ short dzmax; /* largest discontinuity on shelf */ short laycost; /* cost of layover discontinuity shelf */}costT;/* arc cost data structure for smooth costs */typedef struct smoothcostST{ short offset; /* offset of wrapped phase gradient from 0 */ short sigsq; /* variance due to decorrelation */}smoothcostT;/* incremental cost data structure */typedef struct incrcostST{ short poscost; /* cost for positive flow increment */ short negcost; /* cost for negative flow increment */}incrcostT;/* arc candidate data structure */typedef struct candidateST{ nodeT *from, *to; /* endpoints of candidate arc */ long violation; /* magnitude of arc violation */ short arcrow,arccol; /* indexes into arc arrays */ signed char arcdir; /* direction of arc (1=fwd, -1=rev) */}candidateT;/* bucket data structure */typedef struct bucketST{ long size; /* number of buckets in list */ long curr; /* current bucket index */ long maxind; /* maximum bucket index */ long minind; /* smallest (possibly negative) bucket index */ nodeT **bucket; /* array of first nodes in each bucket */ nodeT **bucketbase; /* real base of bucket array */ signed char wrapped; /* flag denoting wrapped circular buckets */}bucketT;/* secondary arc data structure */typedef struct scndryarcST{ short arcrow; /* row of arc in secondary network array */ short arccol; /* col of arc in secondary network array */ nodeT *from; /* secondary node at tail of arc */ nodeT *to; /* secondary node at head of arc */ signed char fromdir; /* direction from which arc enters head */}scndryarcT;/* supplementary data structure for secondary nodes */typedef struct nodesuppST{ short row; /* row of node in primary network problem */ short col; /* col of node in primary network problem */ nodeT **neighbornodes; /* pointers to neighboring secondary nodes */ scndryarcT **outarcs; /* pointers to secondary arcs to neighbors */ short noutarcs; /* number of arcs from this node */}nodesuppT;/* run-time parameter data structure */typedef struct paramST{ /* SAR and geometry parameters */ double orbitradius; /* radius of platform orbit (meters) */ double altitude; /* SAR altitude (meters) */ double earthradius; /* radius of earth (meters) */ double bperp; /* nominal perpendiuclar baseline (meters) */ signed char transmitmode; /* transmit mode (PINGPONG or SINGLEANTTRANSMIT) */ double baseline; /* baseline length (meters, always postive) */ double baselineangle; /* baseline angle above horizontal (rad) */ long nlooksrange; /* number of looks in range for input data */ long nlooksaz; /* number of looks in azimuth for input data */ long nlooksother; /* number of nonspatial looks for input data */ double ncorrlooks; /* number of independent looks in correlation est */ long ncorrlooksrange; /* number of looks in range for correlation */ long ncorrlooksaz; /* number of looks in azimuth for correlation */ double nearrange; /* slant range to near part of swath (meters) */ double dr; /* range bin spacing (meters) */ double da; /* azimuth bin spacing (meters) */ double rangeres; /* range resolution (meters) */ double azres; /* azimuth resolution (meters) */ double lambda; /* wavelength (meters) */ /* scattering model parameters */ double kds; /* ratio of diffuse to specular scattering */ double specularexp; /* power specular scattering component */ double dzrcritfactor; /* fudge factor for linearizing scattering model */ signed char shadow; /* allow discontinuities from shadowing */ double dzeimin; /* lower limit for backslopes (if shadow = FALSE) */ long laywidth; /* width of window for summing layover brightness */ double layminei; /* threshold brightness for assuming layover */ double sloperatiofactor;/* fudge factor for linearized scattering slopes */ double sigsqei; /* variance (dz, meters) due to uncertainty in EI */ /* decorrelation model parameters */ double drho; /* step size of correlation-slope lookup table */ double rhosconst1,rhosconst2;/* for calculating rho0 in biased rho */ double cstd1,cstd2,cstd3;/* for calculating correlation power given nlooks */ double defaultcorr; /* default correlation if no correlation file */ double rhominfactor; /* threshold for setting unbiased correlation to 0 */ /* pdf model parameters */ double dzlaypeak; /* range pdf peak for no discontinuity when bright */ double azdzfactor; /* fraction of dz in azimuth vs. rnage */ double dzeifactor; /* nonlayover dz scale factor */ double dzeiweight; /* weight to give dz expected from intensity */ double dzlayfactor; /* layover regime dz scale factor */ double layconst; /* normalized constant pdf of layover edge */ double layfalloffconst; /* factor of sigsq for layover cost increase */ long sigsqshortmin; /* min short value for costT variance */ double sigsqlayfactor; /* fration of ambiguityheight^2 for layover sigma */ /* deformation mode parameters */ double defoazdzfactor; /* scale for azimuth ledge in defo cost function */ double defothreshfactor;/* factor of rho0 for discontinuity threshold */ double defomax; /* max discontinuity (cycles) from deformation */ double sigsqcorr; /* variance in measured correlation */ double defolayconst; /* layconst for deformation mode */ /* algorithm parameters */ signed char eval; /* evaluate unwrapped input file if TRUE */ signed char unwrapped; /* input file is unwrapped if TRUE */ signed char regrowconncomps;/* grow connected components and exit if TRUE */ signed char initonly; /* exit after initialization if TRUE */ signed char initmethod; /* MST or MCF initialization */ signed char costmode; /* statistical cost mode */ signed char dumpall; /* dump intermediate files */ signed char verbose; /* print verbose output */ signed char amplitude; /* intensity data is amplitude, not power */ signed char havemagnitude; /* flag to create correlation from other inputs */ signed char flipphasesign; /* flag to flip phase and flow array signs */ long initmaxflow; /* maximum flow for initialization */ long arcmaxflowconst; /* units of flow past dzmax to use for initmaxflow */ long maxflow; /* max flow for tree solve looping */ long krowei, kcolei; /* size of boxcar averaging window for mean ei */ long kpardpsi; /* length of boxcar for mean wrapped gradient */ long kperpdpsi; /* width of boxcar for mean wrapped gradient */ double threshold; /* thershold for numerical dzrcrit calculation */ double initdzr; /* initial dzr for numerical dzrcrit calc. (m) */ double initdzstep; /* initial stepsize for spatial decor slope calc. */ double maxcost; /* min and max float values for cost arrays */ double costscale; /* scale factor for discretizing to integer costs */ double costscaleambight;/* ambiguity height for auto costs caling */ double dnomincangle; /* step size for range-varying param lookup table */ long srcrow,srccol; /* source node location */ double p; /* power for Lp-norm solution (less than 0 is MAP) */ long nshortcycle; /* number of points for one cycle in short int dz */ double maxnewnodeconst; /* number of nodes added to tree on each iteration */ long maxnflowcycles; /* max number of cycles to consider nflow done */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -