Files
small-image-descriptors/DescriptorManager.h
T
2018-08-11 11:05:03 +02:00

47 lines
1.2 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();
bool loadDescriptors();
bool createMutations();
void similarImages(string image_name, int method, int numImages);
void insertMutations(string image_name, int method);
void outputMap(int a);
void outputMap();
private:
static const int numDescriptors = 8;
static const int numMutations = 2;
//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];
};