49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <bitset>
|
|
#include <climits>
|
|
#include <set>
|
|
#include <boost/filesystem.hpp>
|
|
#include <boost/system/error_code.hpp>
|
|
#include <boost/filesystem/fstream.hpp>
|
|
|
|
#include <Magick++.h>
|
|
#include <string>
|
|
#include "Descriptor.h"
|
|
#include "Mutation.h"
|
|
|
|
using namespace std;
|
|
using namespace Magick;
|
|
|
|
//ENUM_STRING(descriptorss, (totalColors)(averageColor)(numDescriptors))
|
|
|
|
namespace fs = boost::filesystem;
|
|
|
|
//Manager class for
|
|
class DescriptorManager {
|
|
public:
|
|
DescriptorManager();
|
|
DescriptorManager(const fs::path & image_path);
|
|
~DescriptorManager();
|
|
void Init();
|
|
bool loadDescriptors();
|
|
bool createMutations();
|
|
void similarImages(string image_name, int method, int numImages);
|
|
void insertMutations(string image_name, int method);
|
|
void checkImages(int method);
|
|
void outputMap(int a);
|
|
void outputMap();
|
|
private:
|
|
static const int numDescriptors = 8;
|
|
static const int numMutations = 7;
|
|
//TODO: automagically update this?
|
|
|
|
map<string, bitset<64>> descriptors[numDescriptors]; //array of maps that will hold the descriptors
|
|
multiset<pair<unsigned long long, string> > distances; //multiset that stores the distances
|
|
fs::path img_path; //where the images are
|
|
Descriptor* descriptor_types[numDescriptors];
|
|
Mutation* mutators[numMutations];
|
|
};
|
|
|