-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvectorizer.h
39 lines (32 loc) · 914 Bytes
/
vectorizer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* Vectorix -- line-based image vectorizer
* (c) 2016 Jan Hadrava <[email protected]>
*/
#ifndef VECTORIX__VECTORIZER_H
#define VECTORIX__VECTORIZER_H
// Interface of all vectorizers
#include "pnm_handler.h"
#include "v_image.h"
#include "logger.h"
#include <opencv2/opencv.hpp>
#include "parameters.h"
namespace vectorix {
class vectorizer {
public:
virtual v_image vectorize(const pnm_image &image) = 0;
protected:
vectorizer(parameters ¶ms): par(¶ms) {
int *param_vectorizer_verbosity;
par->bind_param(param_vectorizer_verbosity, "vectorizer_verbosity", (int) log_level::info);
log.set_verbosity((log_level) *param_vectorizer_verbosity);
};
logger log;
parameters *par;
};
class vectorizer_example: public vectorizer {
public:
virtual v_image vectorize(const pnm_image &image);
vectorizer_example(parameters ¶ms): vectorizer(params) {};
};
}; // namespace
#endif