-
Notifications
You must be signed in to change notification settings - Fork 2
/
imagemodel.h
44 lines (39 loc) · 832 Bytes
/
imagemodel.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
#ifndef IMAGEMODEL_H
#define IMAGEMODEL_H
#include <iostream>
#include <CImg.h>
#include <vector>
#include <armadillo>
#include "rectanglemodel.h"
using namespace std;
using namespace arma;
class ImageModel
{
private:
int RGB = 3;
int imageWidth;
int imageHeight;
int n;
int m;
int p;
double e;
int L;
int nmRGB;
double a;
vector<RectangleModel> rectangleModelList;
mat W;
mat W_;
int convertRGBToOutput(double rgb);
double getErrorDegree(mat deltaX);
void createWeightMatrix();
double convertColor(int color);
void normalizeMatrix(mat matrix);
void normalizeMatrixs();
double adaptiveLearningStep(mat matrix);
public:
ImageModel(char const * patch);
void run();
void initANN();
void createOutputImage();
};
#endif // IMAGEMODEL_H