forked from upendra-singh0/Signature-Recognition
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakeList.cpp
More file actions
61 lines (53 loc) · 1.12 KB
/
MakeList.cpp
File metadata and controls
61 lines (53 loc) · 1.12 KB
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
#include <iostream>
#include <fstream>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace std;
using namespace cv;
//int data_list(string adress, char group);
//int preprocess(string adress);
int MakeDataList(string adress, char group)
{
string str1 = "..\\data\\threshold\\";
string str2= "\\data_list.txt";
string str3;
str3 = str1 +group+ str2;
cout << str3<<endl;
ofstream fout;
fout.open(str3);
if (!fout)
{
cout << "file open error!" << endl;
return -1;
}
int num = 0;
int sum = 5;
//group = 'A';
//group = 'B';
for (int i = 1; i <= sum; i++)
{
fout << group<<" ("<<i<<")" <<".png" << endl;
}
fout.close();
cout << "save data list successfully!" << endl;
system("pause");
return 0;
}
int main()
{
MakeDataList("", 'a');
MakeDataList("", 'b');
MakeDataList("", 'c');
MakeDataList("", 'd');
MakeDataList("", 'e');
MakeDataList("", 'f');
MakeDataList("", 'g');
MakeDataList("", 'h');
MakeDataList("", 'i');
MakeDataList("", 'j');
MakeDataList("", 'k');
MakeDataList("", 'l');
//MakeDataList("", 'i');
return 0;
}