33 #include <Base/Common/BIASpragma.hh>
35 #include <Utils/GenSynthMatches.hh>
36 #include <Base/Image/ImageIO.hh>
42 #define DEFAULT_PARA_FILE_NAME "GenSynthMatches.ini"
45 int main(
int argc,
char *argv[])
53 gsm.AddDebugLevel(GSM_MOVIN_TRANSF);
57 bool FoundDefaultParaFile=
true;
58 ifstream is(DEFAULT_PARA_FILE_NAME);
61 if (DEBUG) cerr <<
"reading "<<DEFAULT_PARA_FILE_NAME<<
" failed"<<endl;
62 FoundDefaultParaFile=
false;
64 if (DEBUG) cerr <<
"reading "<<DEFAULT_PARA_FILE_NAME<<endl;
70 BIASERR(
"error parsing command line");
74 if ((!FoundDefaultParaFile) && (*para.
GetParamString(
"readconfig")==
"")) {
75 cerr <<
"no parameter file found, writing default to "
76 <<DEFAULT_PARA_FILE_NAME<<
"\n";
85 gsm.Write(
"data.txt");
87 gsm.CreateGTVRML(
"gsm-gt.wrl");
97 gsm.DrawTrue(im, 0, 1);
102 gsm.DrawNoisy(im, 0, 1);
void DisableDestructorWarning()
Uses this just before end of your program to avoid error from destructor.
int ReadParameter(const std::string &filename)
read values for parameters from file
int ParseCommandLine(int &argc, char *argv[])
scan command line arguments for valid parameters
class for generating synthetic matches
std::string * GetParamString(const std::string &name) const
int WriteParameter(const std::string &filename)
store complete set of parameter in file if write_comments is set, alo the help strings are written to...
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
This class Param provides generic support for parameters.
void SetWriteOptions(bool indent, bool comments, bool enhanced)