forked from stupel/Preprocessing
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpreprocessing_config.h
executable file
·140 lines (121 loc) · 3.02 KB
/
preprocessing_config.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#ifndef PREPROCESSING_CONFIG_H
#define PREPROCESSING_CONFIG_H
#define GLOG_NO_ABBREVIATED_SEVERITIES
//Qt
#include <QObject>
#include <QDebug>
#include <QMetaType>
#include <QtMath>
#include <QThread>
#include <QVector>
#include <QTime>
#include <QString>
#include <QColor>
#include <QPainter>
#include <QDir>
#include <QProcess>
#include <QFileInfo>
//std
#include <iostream>
#include <stdio.h>
#include <vector>
#include <numeric>
#include <fstream>
#include <exception>
#include <algorithm>
#include <math.h>
#include <deque>
// ArrayFire
#include "arrayfire.h"
#include "af/macros.h"
//OpenCV
#include "opencv2/opencv.hpp"
//Helper
#include "helper.h"
#ifndef CAFFE_FILES_DEFINED
typedef struct caffe_files {
QString model;
QString trained;
QString imageMean;
QString label;
} CAFFE_FILES;
#define CAFFE_FILES_DEFINED
#endif
enum INPUTMODE {image, images, imagePath, imageDirectory};
typedef struct input_params {
INPUTMODE mode;
cv::Mat imgOriginal;
QVector<cv::Mat> imgOriginals;
QString path;
QVector<QString> imgNames;
int cnt;
bool inputLoaded;
} INPUT_PARAMS;
// nastavenia pre funkciu GaussianBlur, ktora sa pouziva na vyhladenie smerovej mapy
typedef struct gaussian_blur_settings {
int blockSize; // velkost bloku pre vyhladenie smerovej mapy (cez bloky)
double sigma; // sigma pre vyhladenie smerovej mapy
} GAUSSIAN_BLUR_SETTINGS;
typedef struct omap_params {
int blockSize;
GAUSSIAN_BLUR_SETTINGS gaussBlurBasic;
GAUSSIAN_BLUR_SETTINGS gaussBlurAdvanced;
} OMAP_PARAMS;
typedef struct qmap_params {
int ppi;
} QMAP_PARAMS;
typedef struct fmap_params {
int blockSize;
int exBlockSize;
bool isModelLoaded;
bool *cpuOnly;
CAFFE_FILES caffeFiles;
} FMAP_PARAMS;
typedef struct mask_params {
int blockSize;
int exBlockSize;
bool useSmooth;
bool isModelLoaded;
bool *cpuOnly;
CAFFE_FILES caffeFiles;
} MASK_PARAMS;
typedef struct contrast_params {
int distance;
double sigma;
double gaussBlock;
double gaussSigma;
} CONTRAST_PARAMS;
typedef struct gabor_params {
int blockSize;
float sigma;
float lambda;
float gamma;
float psi;
cv::Mat *oMap;
af::array *oMapAF;
int *threadNum;
bool *useFrequencyMap;
cv::Mat *fMap;
} GABOR_PARAMS;
typedef struct binarization_params {
bool *useQualityMap;
cv::Mat *imgQualityMap;
bool *useMask;
cv::Mat *imgMask;
int holeSize;
} BINARIZATION_PARAMS;
typedef struct preprocessing_features {
bool advancedMode;
bool useContrastEnhancement;
bool useQualityMap;
bool useHoleRemover;
bool useAdvancedOrientationMap;
bool useMask;
bool useFrequencyMap;
bool generateInvertedSceleton;
} PREPROCESSING_FEATURES;
typedef struct preprocessing_general {
bool cpuOnly;
int threadNum;
} PREPROCESSING_GENERAL;
#endif // PREPROCESSING_CONFIG_H