[EDIT] added evrything to namespace, also fixed includes

This commit is contained in:
Jasper
2021-05-21 12:12:42 +02:00
parent e39cb1a761
commit 27a09aeca4
12 changed files with 493 additions and 454 deletions

View File

@@ -1,34 +1,39 @@
#pragma once
#include<opencv\cv.h>
#include<opencv2\core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/imgproc/types_c.h>
/*
Author: Pierfrancesco Soffritti https://github.com/PierfrancescoSoffritti
*/
using namespace cv;
using namespace std;
namespace computervision
{
using namespace cv;
using namespace std;
class SkinDetector {
public:
SkinDetector(void);
class SkinDetector {
public:
SkinDetector(void);
void drawSkinColorSampler(Mat input);
void calibrate(Mat input);
Mat getSkinMask(Mat input);
void drawSkinColorSampler(Mat input);
void calibrate(Mat input);
Mat getSkinMask(Mat input);
private:
int hLowThreshold = 0;
int hHighThreshold = 0;
int sLowThreshold = 0;
int sHighThreshold = 0;
int vLowThreshold = 0;
int vHighThreshold = 0;
private:
int hLowThreshold = 0;
int hHighThreshold = 0;
int sLowThreshold = 0;
int sHighThreshold = 0;
int vLowThreshold = 0;
int vHighThreshold = 0;
bool calibrated = false;
bool calibrated = false;
Rect skinColorSamplerRectangle1, skinColorSamplerRectangle2;
Rect skinColorSamplerRectangle1, skinColorSamplerRectangle2;
void calculateThresholds(Mat sample1, Mat sample2);
void SkinDetector::performOpening(Mat binaryImage, int structuralElementShapde, Point structuralElementSize);
};
void calculateThresholds(Mat sample1, Mat sample2);
void performOpening(Mat binaryImage, int structuralElementShapde, Point structuralElementSize);
};
}