[ADD] added handy files

This commit is contained in:
Jasper
2021-05-21 11:52:47 +02:00
parent ab3b0c296a
commit e39cb1a761
12 changed files with 662 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
#pragma once
#include<opencv\cv.h>
/*
Author: Pierfrancesco Soffritti https://github.com/PierfrancescoSoffritti
*/
using namespace cv;
using namespace std;
class SkinDetector {
public:
SkinDetector(void);
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;
bool calibrated = false;
Rect skinColorSamplerRectangle1, skinColorSamplerRectangle2;
void calculateThresholds(Mat sample1, Mat sample2);
void SkinDetector::performOpening(Mat binaryImage, int structuralElementShapde, Point structuralElementSize);
};