#include <iostream>
#include <Utils/GenSynthMatches.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/Geometry/TrifocalTensorBase.hh>
#include <Base/Common/BIASpragma.hh>
using namespace BIAS;
using namespace std;
#define DEFAULT_PARA_FILE_NAME "TFT.ini"
#define DEBUG true
int main(int argc, char *argv[])
{
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";
}
BIASERR("must be at least 3 images for trifocal tensor");
BIASASSERT(false);
}
vector<HomgPoint2D> m1, m2, m3;
vector<RMatrixBase> R(3);
vector<HomgPoint3D> C(3);
tft.
Compose(R[0], R[1], R[2], C[0], C[1], C[2]);
for (int i=0; i<num; i++){
cerr << setw(3)<<i<<
" : " << res.
NormL1() <<
"\t"<< res.
NormL2()<<endl;
}
return 0;
}