本文整理汇总了C++中ArgParser::argexists方法的典型用法代码示例。如果您正苦于以下问题:C++ ArgParser::argexists方法的具体用法?C++ ArgParser::argexists怎么用?C++ ArgParser::argexists使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArgParser
的用法示例。
在下文中一共展示了ArgParser::argexists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
void main(int argc,String *argv) {
mcheck();
randomise();
a=ArgParser(argc,argv);
nnname=a.argafter("-nn","nn name","current.net");
tsname=a.argafter("-ts","trainset name","current.pat");
eacq=a.intafter("-eqcq","Edge Angle Cancelling histogram quantisation",16);
eacrad=a.intafter("-eacrad","Default radius for eac",6);
glq=a.intafter("-glq","greylevel quantisation",32);
glhistrad=a.intafter("-glvr","Default radius for gl variance",3);
windres=a.intafter("-wskip","pixel skip for window segmentation",5);
botres=a.intafter("-br","bottom res for neighbour segmenter (botres*2^n=topres)",2);
topres=a.intafter("-tr","top res",32);
notext=a.floatafter("-nt","not text if < than",-4.5);
istext=a.floatafter("-it","is text if > than",-2.0);
show=a.argexists("-show","show results of measures");
usenumpostrainexs=a.intafter("-nptes","number of positive training examples to output",50);
usenumnegtrainexs=a.intafter("-nntes","number of positive training examples to output",50);
scale=a.floatafter("-s","scale",0.5);
morphrad=a.intafter("-mr","radius for morphology",3);
twooutnodes=true; // a.argexists("-to","two output nodes");
minarea=a.intafter("-ms","minimum size of kept region",200);
// ghistscale=a.floatafter("-ghs","scale for hist stability",0.5);
a.opts.add("task = trainset | newnn | trainnn | scan | test");
String task=a.arg("task");
if (Seq(task,"trainset")) {
a.opts.add("trainset task = new | image | finish");
String task2=a.arg("trainset task");
if (Seq(task2,"new")) {
tsname=a.argor(tsname);
a.done();
makenewtrainingset();
} else if (Seq(task2,"image")) {
iname=a.arg("image file");
a.done();
trainimage();
} else if(Seq(task2,"finish")) {
a.done();
finishtrainingset();
} else {
a.done();
error("Please choose a task for the training set");
}
} else if (Seq(task,"newnn")) {
a.opts.add("nn type = hopfield | banana");
String type=a.arg("nn type");
a.done();
makenewnn(type);
} else if (Seq(task,"trainnn")) {
a.done();
trainnetwork();
} else if (Seq(task,"scan")) {
iname=a.arg("image file");
a.done();
scanimage();
} else if (Seq(task,"test")) {
iname=a.arg("image file");
a.done();
testimage();
} else {
a.done();
error("Please choose a task.");
}
printf("jnn : Finished.\n");