-
Notifications
You must be signed in to change notification settings - Fork 0
/
InputFile.h
48 lines (43 loc) · 1.08 KB
/
InputFile.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
#pragma once
#ifndef INPUTFILE_H
#define INPUTFILE_H
#include <vector>
#include <opencv2/opencv.hpp>
#include <filesystem>
typedef unsigned char BYTE;
//typedef std::vector<std::vector<double>> file;
struct input {
std::vector<double> output;
std::vector<std::vector<std::vector<double>>> inputData;
};
struct input2 {
int label;
std::vector<double> input_data;
};
class InputFile
{
private:
public:
double mean;
double std;
std::vector<input> data;
InputFile();
std::vector<input2> data2;
std::vector<input> &getData() { return data; };
void readFolder(std::string folder, int indexPredicted, int count = -1);
~InputFile();
std::string type2str(int type);
void print1();
void print();
void transfer();
void normalize();
void loadImage(std::string path);
std::vector<std::string> get_directories(const std::string& s);
void LoadFromOneFolder(const std::string str);
void normalizeTest();
std::vector<BYTE> openfile(std::string filename);
void prepareInput();
std::vector<std::vector<double>> filetoVector(std::string file);
bool operator==(const InputFile &in2);
};
#endif