[ADD] up left and right detection regions

This commit is contained in:
Sem van der Hoeven
2021-06-08 14:48:46 +02:00
parent cadee7d8e9
commit 5e137faef5
5 changed files with 36 additions and 11 deletions

View File

@@ -1,8 +1,9 @@
#include "HandCalibrator.h"
#include <iostream>
#define MIN_MENU_HAND_SIZE 10000
#define MIN_GAME_HAND_SIZE 10000 // todo change
#define MIN_GAME_HAND_SIZE 4000 // todo change
namespace computervision
{
namespace handcalibration
@@ -64,9 +65,11 @@ namespace computervision
if (points.size() == 0) return false;
std::cout << std::endl;
for (int p = 0; p < points.size(); p++)
{
int area = cv::contourArea(points[p]);
std::cout << area << std::endl;
if (type == handcalibration::HandDetectionType::MENU)
if (area > MIN_MENU_HAND_SIZE) return true;