[ADD] detecting if hand is in square

This commit is contained in:
Sem van der Hoeven
2021-06-04 13:09:51 +02:00
parent 4c49895f6d
commit f5926fffcb
5 changed files with 69 additions and 171 deletions

View File

@@ -9,6 +9,7 @@
#include "FaceDetector.h"
#include "FingerCount.h"
#include "async/StaticCameraInstance.h"
#include "HandPresentChecker.h"
namespace computervision
{
@@ -66,10 +67,14 @@ namespace computervision
putText(cameraFrame,hand_text, Point(10, 75), FONT_HERSHEY_PLAIN, 2.0, Scalar(255, 0, 255),3);
imshow("camera", cameraFrame);
imshow("output", frameOut);
imshow("foreground", foreground);
imshow("handMask", handMask);
imshow("handDetection", fingerCountDebug);
//imshow("output", frameOut);
//imshow("foreground", foreground);
//imshow("handMask", handMask);
//imshow("handDetection", fingerCountDebug);
check_if_hand_present(handMask);
int key = waitKey(1);

View File

@@ -37,7 +37,7 @@
static double UpdateDelta();
scene::Scene& current_scene;
scene::Scene* current_scene;
static GLFWwindow* window;
bool points_img_available = false;

View File

@@ -2,9 +2,11 @@
#include <GLFW/glfw3.h>
#include <map>
#include "startup_Scene.h"
#include "../computervision/ObjectDetection.h"
namespace scene
{
computervision::ObjectDetection objDetect;
scene::Scenes scene::Startup_Scene::start(GLFWwindow *window)
{
@@ -27,6 +29,7 @@ namespace scene
void scene::Startup_Scene::update(GLFWwindow* window)
{
objDetect.detectHand(objDetect.readCamera());
}