#pragma once #include #include #include #include //in which we store our feature vectors #include //for sorting using namespace std; using namespace Magick; namespace fs = boost::filesystem; //Virtual base class //Holds definitions for all common functions of descriptors, //but should be overloaded by a child class class Mutation { public: virtual Image* getMutated(Image* img) = 0; virtual string ToString() = 0; virtual fs::path ToPath() { return fs::path(this->ToString()); } }; //Just the way dogs see class Grayscale : public Mutation { public: Image* getMutated(Image* img) { Image* mut = new Image(*img); mut->type(GrayscaleType); return mut; } string ToString() { return "Grayscale"; } }; //Mirrors over the vertical axis class Flop : public Mutation { public: Image * getMutated(Image* img) { Image* mut = new Image(*img); mut->flop(); return mut; } string ToString() { return "Flop"; } }; //Very low quality JPEG re-encoding class LowQ : public Mutation { public: Image * getMutated(Image* img) { Image* mut = new Image(*img); mut->quality(5); return mut; } string ToString() { return "Low Quality"; } }; //Medium quality JPEG re-encoding class JPEG : public Mutation { public: Image * getMutated(Image* img) { Image* mut = new Image(*img); mut->quality(45); return mut; } string ToString() { return "JPEG"; } }; //A 50% hue-shift to the right class Hue : public Mutation { public: Image * getMutated(Image* img) { Image* mut = new Image(*img); mut->modulate(100, 100, 150); return mut; } string ToString() { return "Hue"; } }; //A 25% increase in brightness class Brighten : public Mutation { public: Image * getMutated(Image* img) { Image* mut = new Image(*img); mut->modulate(125, 100, 100); mut->sigmoidalContrast(false, 5.0); return mut; } string ToString() { return "Brighten"; } };