forked from LuisTbx/Skin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
skindetector.h
41 lines (36 loc) · 1012 Bytes
/
skindetector.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
#ifndef SKINDETECTOR_H
#define SKINDETECTOR_H
#include <opencv2/opencv.hpp>
class SkinDetector
{
public:
// Constructors
SkinDetector(); // Need further initialization
SkinDetector(cv::Mat _mcovariance, cv::Mat _mean, float _mthreshold);
SkinDetector(cv::Mat _mcovariance, cv::Mat _inverse_covariance, cv::Mat _mean, float _mthreshold);
// Destructure
~SkinDetector();
void normalize_image();
// Setters
void set_bgr_image(cv::Mat _bgr_image);
void set_threshold(float _mthreshold);
void set_covariance(cv::Mat _covariance);
void set_mean(cv::Mat _mean);
// Getters
cv::Mat get_skin_map();
cv::Mat get_covariance();
cv::Mat get_inverse_covariance();
cv::Mat get_mean();
float get_threshold();
private:
cv::Mat covariance;
cv::Mat inverse_covariance;
cv::Mat mean;
cv::Mat n_g;
cv::Mat n_r;
cv::Mat bgr_img;
cv::Mat skin_map;
std::vector<cv::Mat> layers;
float threshold;
};
#endif // SKINDETECTOR_H