[EDIT] files accordingly to style guide

This commit is contained in:
Sem van der Hoeven
2021-06-18 10:31:00 +02:00
parent 344745d9cf
commit ce0a1f3da7
15 changed files with 51 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
#include "BackgroundRemover.h"
#include "background_remover.h"
/*
Author: Pierfrancesco Soffritti https://github.com/PierfrancescoSoffritti

View File

@@ -1,4 +1,4 @@
#include "FingerCount.h"
#include "finger_count.h"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"

View File

@@ -1,5 +1,5 @@
#include "HandDetectRegion.h"
#include "hand_detect_region.h"
#define TIME_DURATION 1.0f
namespace computervision
{
@@ -83,7 +83,14 @@ namespace computervision
std::string calibration_text = (!background_calibrated ? "calibrating background in " : (!skin_calibrated ? "calibrating skin in " : ""));
calibration_text += std::to_string(seconds_left);
if (!background_calibrated || !skin_calibrated)
{
cv::rectangle(camera_frame, cv::Rect(0, camera_frame.rows - 130, 600, 60), cv::Scalar(0, 0, 0), -1);
cv:putText(camera_frame, calibration_text, cv::Point(5, 400), cv::FONT_HERSHEY_COMPLEX, 1.0, cv::Scalar(255, 0, 255), 2);
}
if (background_calibrated && !skin_calibrated)
{
cv::putText(camera_frame, "put your hand in the left square", cv::Point(5, camera_frame.rows - 105), cv::FONT_HERSHEY_COMPLEX, 1.0, cv::Scalar(255, 0, 255), 2);
}
}

View File

@@ -6,9 +6,9 @@
#include "async/StaticCameraInstance.h"
#include "calibration/HandCalibrator.h"
#include "BackgroundRemover.h"
#include "SkinDetector.h"
#include "FingerCount.h"
#include "background_remover.h"
#include "skin_detector.h"
#include "finger_count.h"
namespace computervision
{
class HandDetectRegion

View File

@@ -4,10 +4,10 @@
#include <opencv2/video.hpp>
#include <GLFW/glfw3.h>
#include "ObjectDetection.h"
#include "BackgroundRemover.h"
#include "SkinDetector.h"
#include "FingerCount.h"
#include "object_detection.h"
#include "background_remover.h"
#include "skin_detector.h"
#include "finger_count.h"
#include "async/StaticCameraInstance.h"
#include "calibration/HandCalibrator.h"
@@ -116,8 +116,15 @@ namespace computervision
std::string calibration_text = (!background_calibrated ? "calibrating background in " : (!skin_calibrated ? "calibrating skin in " : ""));
calibration_text += std::to_string(seconds_left);
if (!background_calibrated || !skin_calibrated)
cv:putText(camera_frame, calibration_text, cv::Point(5, 400), cv::FONT_HERSHEY_COMPLEX, 1.0, cv::Scalar(255, 0, 255), 2);
{
cv::rectangle(camera_frame, cv::Rect(0, camera_frame.rows - 120, 500, 50), cv::Scalar(0, 0, 0), -1);
cv::putText(camera_frame, calibration_text, cv::Point(5, camera_frame.rows-80), cv::FONT_HERSHEY_COMPLEX, 1.0, cv::Scalar(255, 0, 255), 2);
}
if (background_calibrated && !skin_calibrated)
{
cv::putText(camera_frame, "put your hand in the square", cv::Point(5, camera_frame.rows - 100), cv::FONT_HERSHEY_COMPLEX, 1.0, cv::Scalar(255, 0, 255), 2);
}
imshow("camera", camera_frame);
/*imshow("output", frame_out);

View File

@@ -1,4 +1,4 @@
#include "SkinDetector.h"
#include "skin_detector.h"
#include <iostream>
/*

View File

@@ -28,7 +28,7 @@
#include "scenes/in_Game_Scene.h"
#include "scenes/startup_Scene.h"
#include "computervision/ObjectDetection.h"
#include "computervision/object_detection.h"
//#include "computervision/OpenPoseImage.h"
#include "computervision/OpenPoseVideo.h"

View File

@@ -19,8 +19,8 @@
#include <memory>
#include <queue>
#include <opencv2/core/base.hpp>
#include "../computervision/HandDetectRegion.h"
#include "../computervision/ObjectDetection.h"
#include "../computervision/hand_detect_region.h"
#include "../computervision/object_detection.h"
#include <string>
#define MAX_MODEL_DEQUE_SIZE 6 // max amount of models to load at the same time

View File

@@ -14,8 +14,8 @@
#include "../gui/gui_interactable.h"
#include "../toolbox/toolbox.h"
#include "../computervision/MenuTest.h"
#include "../computervision/ObjectDetection.h"
#include "../computervision/HandDetectRegion.h"
#include "../computervision/object_detection.h"
#include "../computervision/hand_detect_region.h"

View File

@@ -23,15 +23,15 @@
<ClCompile Include="src\entities\main_character.cpp" />
<ClCompile Include="src\entities\house_generator.cpp" />
<ClCompile Include="src\computervision\calibration\HandCalibrator.cpp" />
<ClCompile Include="src\computervision\HandDetectRegion.cpp" />
<ClCompile Include="src\computervision\hand_detect_region.cpp" />
<ClCompile Include="src\scenes\in_Game_Scene.cpp" />
<ClCompile Include="src\computervision\MenuTest.cpp" />
<ClCompile Include="src\computervision\async\async_arm_detection.cpp" />
<ClCompile Include="src\computervision\ObjectDetection.cpp" />
<ClCompile Include="src\computervision\object_detection.cpp" />
<ClCompile Include="src\computervision\OpenPoseVideo.cpp" />
<ClCompile Include="src\computervision\SkinDetector.cpp" />
<ClCompile Include="src\computervision\FingerCount.cpp" />
<ClCompile Include="src\computervision\BackgroundRemover.cpp" />
<ClCompile Include="src\computervision\skin_detector.cpp" />
<ClCompile Include="src\computervision\finger_count.cpp" />
<ClCompile Include="src\computervision\background_remover.cpp" />
<ClCompile Include="src\entities\camera.cpp" />
<ClCompile Include="src\entities\collision_entity.cpp" />
<ClCompile Include="src\entities\entity.cpp" />
@@ -54,17 +54,17 @@
<ClInclude Include="src\entities\house_generator.h" />
<ClInclude Include="src\computervision\calibration\HandCalibrator.h" />
<ClInclude Include="src\computervision\calibration\StaticSkinTreshold.h" />
<ClInclude Include="src\computervision\HandDetectRegion.h" />
<ClInclude Include="src\computervision\hand_detect_region.h" />
<ClInclude Include="src\scenes\in_Game_Scene.h" />
<ClInclude Include="src\scenes\scene.h" />
<ClInclude Include="src\computervision\async\async_arm_detection.h" />
<ClInclude Include="src\computervision\async\StaticCameraInstance.h" />
<ClInclude Include="src\computervision\FingerCount.h" />
<ClInclude Include="src\computervision\BackgroundRemover.h" />
<ClInclude Include="src\computervision\finger_count.h" />
<ClInclude Include="src\computervision\background_remover.h" />
<ClInclude Include="src\computervision\MenuTest.h" />
<ClInclude Include="src\computervision\OpenPoseVideo.h" />
<ClInclude Include="src\computervision\SkinDetector.h" />
<ClInclude Include="src\computervision\ObjectDetection.h" />
<ClInclude Include="src\computervision\skin_detector.h" />
<ClInclude Include="src\computervision\object_detection.h" />
<ClInclude Include="src\entities\camera.h" />
<ClInclude Include="src\entities\collision_entity.h" />
<ClInclude Include="src\entities\entity.h" />

View File

@@ -4,11 +4,11 @@
<ClCompile Include="src\collision\collision_handler.cpp" />
<ClCompile Include="src\scenes\in_Game_Scene.cpp" />
<ClCompile Include="src\computervision\async\async_arm_detection.cpp" />
<ClCompile Include="src\computervision\ObjectDetection.cpp" />
<ClCompile Include="src\computervision\object_detection.cpp" />
<ClCompile Include="src\computervision\OpenPoseVideo.cpp" />
<ClCompile Include="src\computervision\SkinDetector.cpp" />
<ClCompile Include="src\computervision\FingerCount.cpp" />
<ClCompile Include="src\computervision\BackgroundRemover.cpp" />
<ClCompile Include="src\computervision\skin_detector.cpp" />
<ClCompile Include="src\computervision\finger_count.cpp" />
<ClCompile Include="src\computervision\background_remover.cpp" />
<ClCompile Include="src\entities\camera.cpp" />
<ClCompile Include="src\entities\collision_entity.cpp" />
<ClCompile Include="src\entities\entity.cpp" />
@@ -23,7 +23,7 @@
<ClCompile Include="src\toolbox\toolbox.cpp" />
<ClCompile Include="src\scenes\startup_Scene.cpp" />
<ClCompile Include="src\computervision\calibration\HandCalibrator.cpp" />
<ClCompile Include="src\computervision\HandDetectRegion.cpp" />
<ClCompile Include="src\computervision\hand_detect_region.cpp" />
<ClCompile Include="src\entities\main_character.cpp" />
<ClCompile Include="src\entities\house_generator.cpp" />
<ClCompile Include="src\computervision\MenuTest.cpp" />
@@ -118,7 +118,7 @@
<ClInclude Include="src\toolbox\toolbox.h" />
<ClInclude Include="src\scenes\startup_Scene.h" />
<ClInclude Include="src\computervision\calibration\HandCalibrator.h" />
<ClInclude Include="src\computervision\HandDetectRegion.h" />
<ClInclude Include="src\computervision\hand_detect_region.h" />
<ClInclude Include="src\computervision\calibration\StaticSkinTreshold.h" />
<ClInclude Include="src\collision\collision.h" />
<ClInclude Include="src\collision\collision_handler.h" />
@@ -126,11 +126,11 @@
<ClInclude Include="src\entities\house_generator.h" />
<ClInclude Include="src\scenes\in_Game_Scene.h" />
<ClInclude Include="src\scenes\scene.h" />
<ClInclude Include="src\computervision\FingerCount.h" />
<ClInclude Include="src\computervision\BackgroundRemover.h" />
<ClInclude Include="src\computervision\finger_count.h" />
<ClInclude Include="src\computervision\background_remover.h" />
<ClInclude Include="src\computervision\MenuTest.h" />
<ClInclude Include="src\computervision\SkinDetector.h" />
<ClInclude Include="src\computervision\ObjectDetection.h" />
<ClInclude Include="src\computervision\skin_detector.h" />
<ClInclude Include="src\computervision\object_detection.h" />
<ClInclude Include="src\entities\camera.h" />
<ClInclude Include="src\entities\collision_entity.h" />
<ClInclude Include="src\entities\entity.h" />