[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

@@ -1,13 +1,37 @@
#include "ObjectDetection.h"
#include "ObjectDetection.h"
//#include "BackgroundRemover.h"
#include "SkinDetector.h"
#include "FaceDetector.h"
#include "FingerCount.h"
namespace computervision
{
cv::VideoCapture cap(0);
cv::Mat img, imgGray, img2, img2Gray, img3, img4;
Mat frame, frameOut, handMask, foreground, fingerCountDebug;
//BackgroundRemover backgroundRemover;
SkinDetector skinDetector;
FaceDetector faceDetector;
FingerCount fingerCount;
ObjectDetection::ObjectDetection()
{
}
void ObjectDetection::Init()
{
cap.read(frame);
skinDetector.drawSkinColorSampler(frameOut);
foreground = backgroundRemover.getForeground(frame);
faceDetector.removeFaces(frame, foreground);
handMask = skinDetector.getSkinMask(foreground);
}
void ObjectDetection::readWebcam()
{
cap.read(img);