-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatasettrainer.h
More file actions
34 lines (28 loc) · 809 Bytes
/
datasettrainer.h
File metadata and controls
34 lines (28 loc) · 809 Bytes
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
#ifndef DATASETTRAINER_H
#define DATASETTRAINER_H
#include <QCoreApplication>
#include <opencv2/core/core.hpp>
#include <opencv2/face.hpp>
#include<opencv2/face/facerec.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/objdetect/objdetect.hpp>
#include <iostream>
#include <fstream>
#include <sstream>
#include <math.h>
#include<time.h>
#include<QString>
using namespace cv;
using namespace std;
class dataSetTrainer
{
private:
Ptr<face::FaceRecognizer> model;
public:
dataSetTrainer();
void runTrainer();
//loads the images and their corresponding labels(seperated by ',') from the ext file
static void dbread(const string& filename, vector<Mat>& images, vector<int>& labels, char separator = ',');
};
#endif // DATASETTRAINER_H