33 #include <Base/Common/BIASpragma.hh>
35 #include <Utils/GenSynthMatchesRig.hh>
36 #include <Base/Image/ImageIO.hh>
44 #define DEFAULT_PARA_FILE_NAME "GenSynthMatchesRig.ini"
47 int main(
int argc,
char *argv[])
52 bool FoundDefaultParaFile=
true;
53 ifstream is(DEFAULT_PARA_FILE_NAME);
56 if (DEBUG) cerr <<
"reading "<<DEFAULT_PARA_FILE_NAME<<
" failed"<<endl;
57 FoundDefaultParaFile=
false;
59 if (DEBUG) cerr <<
"reading "<<DEFAULT_PARA_FILE_NAME<<endl;
65 BIASERR(
"error parsing command line");
69 if ((!FoundDefaultParaFile) && (*para.
GetParamString(
"readconfig")==
"")) {
70 cerr <<
"no parameter file found, writing default to "
71 <<DEFAULT_PARA_FILE_NAME<<
"\n";
87 std::vector<Image<unsigned char> >im;
89 gsm.DrawTrue(im, 0, 1);
91 std::vector<Image<unsigned char> >::iterator imIt;
95 for (imIt = im.begin(), i = 0; imIt != im.end(); imIt++, i++) {
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
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...
Generates synthetic matches for cameras in a rig.
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)