-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBlackBox.h
71 lines (63 loc) · 1.72 KB
/
BlackBox.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <cstring>
#include <cstdlib>
#include <vector>
#include <string>
#include <iostream>
#include <stdio.h>
#include <assert.h>
#include "caffe/caffe.hpp"
#include "caffe/util/io.hpp"
#include "caffe/blob.hpp"
#include "opencv2/opencv.hpp"
#include "time.h"
#include "CAFFE_classifier.h"
#include "fstream"
#include <numeric>
#include <stdlib.h>
#include <string>
#include <iostream>
#include "FaceDetector.h"
#include "clmtacker.h"
#ifndef BLACKBOX_H
#define BLACKBOX_H
class BlackBox
{
public:
BlackBox(std::string path,
cv::VideoCapture* _video_capture,
std::string netArchitecture,
std::string netWeights,
std::string mean_image_filename,
bool useGPU = false);
void setMode(int mode);
void BlackBox::drawProbabilities(cv::Mat& frame,ImageSample& faceSample,std::string cel);
void process(cv::Mat& frame,std::string cel);
void BlackBox::FaceCropping(cv::Mat& frame,std::string path);
std::vector<std::string> class_names;
ImageSample* faceSample;
std::ofstream out;
std::ofstream outfile;
int count=0;
int wrong_count=0;
std::string writename;
float prob;
int count1=0;
int copy_int=0;
int filter=0;
~BlackBox();
private:
float* avg_emotions;
// Eyes regions extractor
faceDetector* FDet;
// Neural network classifier for eyes
CAFFE_classifier* cc;
// Eyes structure for feedeng to neural network
algobucket *facecrop;
// Eyes regions
cv::RotatedRect faceRect;
// 0 - normal
// 1 - smile
// 2 - no smile
int _mode;
};
#endif /* BLACKBOX_H */