Example for generating synthetic matches
- Author
- MIP
#include <iostream>
#include <Base/Common/BIASpragma.hh>
#include <Utils/GenSynthMatches.hh>
#include <Base/Image/ImageIO.hh>
using namespace BIAS;
using namespace std;
#define DEFAULT_PARA_FILE_NAME "GenSynthMatches.ini"
#define DEBUG true
int main(int argc, char *argv[])
{
gsm.AddDebugLevel(GSM_MOVIN_TRANSF);
bool FoundDefaultParaFile=true;
ifstream is(DEFAULT_PARA_FILE_NAME);
if (!is){
is.close();
if (DEBUG) cerr << "reading "<<DEFAULT_PARA_FILE_NAME<<" failed"<<endl;
FoundDefaultParaFile=false;
} else {
if (DEBUG) cerr << "reading "<<DEFAULT_PARA_FILE_NAME<<endl;
}
if (argind<0){
BIASERR("error parsing command line");
return -1;
}
if ((!FoundDefaultParaFile) && (*para.
GetParamString(
"readconfig")==
"")) {
cerr << "no parameter file found, writing default to "
<<DEFAULT_PARA_FILE_NAME<<"\n";
}
gsm.CreateMatches();
gsm.Write("data.txt");
gsm.CreateGTVRML("gsm-gt.wrl");
gsm.DrawTrue(im, 0, 1);
gsm.DrawNoisy(im, 0, 1);
return 0;
}