-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoader.H
55 lines (39 loc) · 882 Bytes
/
Loader.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
//
// HEADER Loader
// Loader.h
//
//
// Date: 2007-09-26
//
#ifndef LOADER_HEADER
#define LOADER_HEADER
#include <stdio.h>
#include "common.H"
#include "Face.H"
#include "FaceDetector.H"
#include "Utils.H"
using namespace std;
struct ImgDetail
{
char z_File[FILE_NAME_LEN];
int i_ID;
// etc
};
class Loader
{
public:
Loader();
~Loader();
/* configs */
static int LoadConfigs(const char* zConfigFile);
static int GetConfig(const char* zKey, int &riValue);
static int GetConfig(const char* zKey, string &rsValue);
/* Face DB */
static int LoadImages(const char* zPrefix, bool bValidate, FaceDB* pDB);
static void LoadFromFile(const char* zFile, bool bValidate, FaceDB* pDB);
private:
static int ExtractDetails(char* zBuf, ImgDetail* pDetail);
static int ValidateFace(IplImage* pImg);
static map<string, string>map_Configs;
};
#endif // LOADER_HEADER