#include <Base/Image/ImageConvert.hh>
#include <iostream>
#include <iomanip>
#include <Base/Image/Image.hh>
#include <FeatureDetector/ColorHarris.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/ImageUtils/ImageDraw.hh>
#include <Base/Debug/TimeMeasure.hh>
#include <getopt.h>
using namespace BIAS;
using namespace std;
void usage(char *name)
{
cerr << endl << endl << name <<" [options] <image-filename>" << endl
<< " [-m maxnum] find maximal maxnum corners"<<endl
<< "\t\t default = 150"<<endl
<< " [-t sigma] sigma for gaussian average"<<endl
<< "\t\t default = 2.0"<<endl
<< " [-s sigma] sigma for gauss derivative (0=sobel)"<<endl
<< "\t\t default = 0"<<endl
<< " [-o out] write pointset to out"<<endl
<< endl << endl;
}
#define st_type short
int main(int argc, char *argv[])
{
char c;
unsigned int maxnum=150;
double minqual=0.00001;
double sigma1=0;
double sigma2=2.0;
string file, file2, outfile("pointset.txt");
vector<float> quality;
#ifdef use_timers
int count=2;
#else
int count=200;
#endif
if (argc <2) {
usage (argv[0]);
exit(1);
}
while ((c = getopt(argc, argv, "m:t:s:o:h")) != EOF)
{
switch (c){
case 'o':
outfile=optarg;
break;
case 's':
sigma1 = atof(optarg);
break;
case 't':
sigma2 = atof(optarg);
break;
case 'h':
usage(argv[0]);
return 0;
break;
case 'm':
maxnum = atoi(optarg);
break;
default:
break;
}
}
file = argv[optind];
BIASERR("error loading file " << file);
return -1;
}
time.start();
for (int i=0; i<count; i++){
BIASERR("error creating st");
return -1;
}
#ifdef use_timers
time2.start();
#endif
#ifdef use_timers
time2.stop();
cout <<"\nHarrisValue took:\n";
time2.print();
#endif
}
time.stop();
cout <<"\n"<<count<<" st harris took:\n";
time.print();
return 0;
}