Files
small-image-descriptors/main.cpp
T
Mark Hoekveen edfa53a4ff WIP on new init
Rework seems done, but man are there bugs
2018-10-11 17:05:41 +02:00

60 lines
1.3 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");
manager->Init();
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;
}