c3d4c7ea11
Wwo!
63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
/*#include <Magick++.h>
|
|
#include <iostream>
|
|
#include <bitset>
|
|
#include <climits>
|
|
|
|
#include <boost/filesystem/fstream.hpp>
|
|
#include <string>*/
|
|
|
|
#include "DescriptorManager.h"
|
|
#include <boost/filesystem.hpp>
|
|
#include <Magick++.h>
|
|
using namespace std;
|
|
using namespace Magick;
|
|
|
|
//Methods:
|
|
//6 DCT Pearson
|
|
//5 threshold
|
|
//4 pearson
|
|
//3 sobel
|
|
//2 median
|
|
//1 numColors
|
|
//0 averageColor
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
string imagename = "im80.jpg";
|
|
int method = 6;
|
|
int count = 1000;
|
|
if (argc > 2) {
|
|
method = atoi(argv[2]);
|
|
imagename = argv[1];
|
|
}
|
|
if (argc > 3) {
|
|
count = atoi(argv[3]);
|
|
}
|
|
|
|
else {
|
|
cout << "Usage: " << endl << argv[0] << " [fileName] [methodIndex]" << endl;
|
|
cout << "Continuing.." << endl;
|
|
}
|
|
InitializeMagick(*argv);
|
|
DescriptorManager* manager = new DescriptorManager("data");
|
|
cout << "Intializing..." << endl;
|
|
manager->Init();
|
|
cout << "done!" << endl;
|
|
manager->runExperiments();
|
|
//manager->rankImages(imagename, method);
|
|
//manager->rankMutations(imagename, method);
|
|
//manager->outputMap(method);
|
|
//manager->outputRank(imagename, method);
|
|
//cout << "Loading descriptiors..";
|
|
//manager->loadDescriptors();
|
|
//manager->createMutations();
|
|
//cout << "done?" << endl;
|
|
//manager->similarImages(imagename, method, count);
|
|
//manager->insertMutations(imagename, method);
|
|
//cout << "done!" << endl << "Calculating distances.." << endl;
|
|
//cout << "done!" << endl << "Outputting map.." << endl;
|
|
//manager->outputMap();
|
|
|
|
return 0;
|
|
}
|