[EDIT] files accordingly to style guide
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#include "BackgroundRemover.h"
|
#include "background_remover.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Author: Pierfrancesco Soffritti https://github.com/PierfrancescoSoffritti
|
Author: Pierfrancesco Soffritti https://github.com/PierfrancescoSoffritti
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "FingerCount.h"
|
#include "finger_count.h"
|
||||||
|
|
||||||
#include "opencv2/imgproc.hpp"
|
#include "opencv2/imgproc.hpp"
|
||||||
#include "opencv2/highgui.hpp"
|
#include "opencv2/highgui.hpp"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
#include "HandDetectRegion.h"
|
#include "hand_detect_region.h"
|
||||||
#define TIME_DURATION 1.0f
|
#define TIME_DURATION 1.0f
|
||||||
namespace computervision
|
namespace computervision
|
||||||
{
|
{
|
||||||
@@ -83,7 +83,14 @@ namespace computervision
|
|||||||
std::string calibration_text = (!background_calibrated ? "calibrating background in " : (!skin_calibrated ? "calibrating skin in " : ""));
|
std::string calibration_text = (!background_calibrated ? "calibrating background in " : (!skin_calibrated ? "calibrating skin in " : ""));
|
||||||
calibration_text += std::to_string(seconds_left);
|
calibration_text += std::to_string(seconds_left);
|
||||||
if (!background_calibrated || !skin_calibrated)
|
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);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
#include "async/StaticCameraInstance.h"
|
#include "async/StaticCameraInstance.h"
|
||||||
#include "calibration/HandCalibrator.h"
|
#include "calibration/HandCalibrator.h"
|
||||||
#include "BackgroundRemover.h"
|
#include "background_remover.h"
|
||||||
#include "SkinDetector.h"
|
#include "skin_detector.h"
|
||||||
#include "FingerCount.h"
|
#include "finger_count.h"
|
||||||
namespace computervision
|
namespace computervision
|
||||||
{
|
{
|
||||||
class HandDetectRegion
|
class HandDetectRegion
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
#include <opencv2/video.hpp>
|
#include <opencv2/video.hpp>
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
#include "ObjectDetection.h"
|
#include "object_detection.h"
|
||||||
#include "BackgroundRemover.h"
|
#include "background_remover.h"
|
||||||
#include "SkinDetector.h"
|
#include "skin_detector.h"
|
||||||
#include "FingerCount.h"
|
#include "finger_count.h"
|
||||||
#include "async/StaticCameraInstance.h"
|
#include "async/StaticCameraInstance.h"
|
||||||
#include "calibration/HandCalibrator.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 " : ""));
|
std::string calibration_text = (!background_calibrated ? "calibrating background in " : (!skin_calibrated ? "calibrating skin in " : ""));
|
||||||
calibration_text += std::to_string(seconds_left);
|
calibration_text += std::to_string(seconds_left);
|
||||||
if (!background_calibrated || !skin_calibrated)
|
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("camera", camera_frame);
|
||||||
|
|
||||||
/*imshow("output", frame_out);
|
/*imshow("output", frame_out);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "SkinDetector.h"
|
#include "skin_detector.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "scenes/in_Game_Scene.h"
|
#include "scenes/in_Game_Scene.h"
|
||||||
#include "scenes/startup_Scene.h"
|
#include "scenes/startup_Scene.h"
|
||||||
|
|
||||||
#include "computervision/ObjectDetection.h"
|
#include "computervision/object_detection.h"
|
||||||
//#include "computervision/OpenPoseImage.h"
|
//#include "computervision/OpenPoseImage.h"
|
||||||
#include "computervision/OpenPoseVideo.h"
|
#include "computervision/OpenPoseVideo.h"
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <opencv2/core/base.hpp>
|
#include <opencv2/core/base.hpp>
|
||||||
#include "../computervision/HandDetectRegion.h"
|
#include "../computervision/hand_detect_region.h"
|
||||||
#include "../computervision/ObjectDetection.h"
|
#include "../computervision/object_detection.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#define MAX_MODEL_DEQUE_SIZE 6 // max amount of models to load at the same time
|
#define MAX_MODEL_DEQUE_SIZE 6 // max amount of models to load at the same time
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
#include "../gui/gui_interactable.h"
|
#include "../gui/gui_interactable.h"
|
||||||
#include "../toolbox/toolbox.h"
|
#include "../toolbox/toolbox.h"
|
||||||
#include "../computervision/MenuTest.h"
|
#include "../computervision/MenuTest.h"
|
||||||
#include "../computervision/ObjectDetection.h"
|
#include "../computervision/object_detection.h"
|
||||||
#include "../computervision/HandDetectRegion.h"
|
#include "../computervision/hand_detect_region.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,15 +23,15 @@
|
|||||||
<ClCompile Include="src\entities\main_character.cpp" />
|
<ClCompile Include="src\entities\main_character.cpp" />
|
||||||
<ClCompile Include="src\entities\house_generator.cpp" />
|
<ClCompile Include="src\entities\house_generator.cpp" />
|
||||||
<ClCompile Include="src\computervision\calibration\HandCalibrator.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\scenes\in_Game_Scene.cpp" />
|
||||||
<ClCompile Include="src\computervision\MenuTest.cpp" />
|
<ClCompile Include="src\computervision\MenuTest.cpp" />
|
||||||
<ClCompile Include="src\computervision\async\async_arm_detection.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\OpenPoseVideo.cpp" />
|
||||||
<ClCompile Include="src\computervision\SkinDetector.cpp" />
|
<ClCompile Include="src\computervision\skin_detector.cpp" />
|
||||||
<ClCompile Include="src\computervision\FingerCount.cpp" />
|
<ClCompile Include="src\computervision\finger_count.cpp" />
|
||||||
<ClCompile Include="src\computervision\BackgroundRemover.cpp" />
|
<ClCompile Include="src\computervision\background_remover.cpp" />
|
||||||
<ClCompile Include="src\entities\camera.cpp" />
|
<ClCompile Include="src\entities\camera.cpp" />
|
||||||
<ClCompile Include="src\entities\collision_entity.cpp" />
|
<ClCompile Include="src\entities\collision_entity.cpp" />
|
||||||
<ClCompile Include="src\entities\entity.cpp" />
|
<ClCompile Include="src\entities\entity.cpp" />
|
||||||
@@ -54,17 +54,17 @@
|
|||||||
<ClInclude Include="src\entities\house_generator.h" />
|
<ClInclude Include="src\entities\house_generator.h" />
|
||||||
<ClInclude Include="src\computervision\calibration\HandCalibrator.h" />
|
<ClInclude Include="src\computervision\calibration\HandCalibrator.h" />
|
||||||
<ClInclude Include="src\computervision\calibration\StaticSkinTreshold.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\in_Game_Scene.h" />
|
||||||
<ClInclude Include="src\scenes\scene.h" />
|
<ClInclude Include="src\scenes\scene.h" />
|
||||||
<ClInclude Include="src\computervision\async\async_arm_detection.h" />
|
<ClInclude Include="src\computervision\async\async_arm_detection.h" />
|
||||||
<ClInclude Include="src\computervision\async\StaticCameraInstance.h" />
|
<ClInclude Include="src\computervision\async\StaticCameraInstance.h" />
|
||||||
<ClInclude Include="src\computervision\FingerCount.h" />
|
<ClInclude Include="src\computervision\finger_count.h" />
|
||||||
<ClInclude Include="src\computervision\BackgroundRemover.h" />
|
<ClInclude Include="src\computervision\background_remover.h" />
|
||||||
<ClInclude Include="src\computervision\MenuTest.h" />
|
<ClInclude Include="src\computervision\MenuTest.h" />
|
||||||
<ClInclude Include="src\computervision\OpenPoseVideo.h" />
|
<ClInclude Include="src\computervision\OpenPoseVideo.h" />
|
||||||
<ClInclude Include="src\computervision\SkinDetector.h" />
|
<ClInclude Include="src\computervision\skin_detector.h" />
|
||||||
<ClInclude Include="src\computervision\ObjectDetection.h" />
|
<ClInclude Include="src\computervision\object_detection.h" />
|
||||||
<ClInclude Include="src\entities\camera.h" />
|
<ClInclude Include="src\entities\camera.h" />
|
||||||
<ClInclude Include="src\entities\collision_entity.h" />
|
<ClInclude Include="src\entities\collision_entity.h" />
|
||||||
<ClInclude Include="src\entities\entity.h" />
|
<ClInclude Include="src\entities\entity.h" />
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<ClCompile Include="src\collision\collision_handler.cpp" />
|
<ClCompile Include="src\collision\collision_handler.cpp" />
|
||||||
<ClCompile Include="src\scenes\in_Game_Scene.cpp" />
|
<ClCompile Include="src\scenes\in_Game_Scene.cpp" />
|
||||||
<ClCompile Include="src\computervision\async\async_arm_detection.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\OpenPoseVideo.cpp" />
|
||||||
<ClCompile Include="src\computervision\SkinDetector.cpp" />
|
<ClCompile Include="src\computervision\skin_detector.cpp" />
|
||||||
<ClCompile Include="src\computervision\FingerCount.cpp" />
|
<ClCompile Include="src\computervision\finger_count.cpp" />
|
||||||
<ClCompile Include="src\computervision\BackgroundRemover.cpp" />
|
<ClCompile Include="src\computervision\background_remover.cpp" />
|
||||||
<ClCompile Include="src\entities\camera.cpp" />
|
<ClCompile Include="src\entities\camera.cpp" />
|
||||||
<ClCompile Include="src\entities\collision_entity.cpp" />
|
<ClCompile Include="src\entities\collision_entity.cpp" />
|
||||||
<ClCompile Include="src\entities\entity.cpp" />
|
<ClCompile Include="src\entities\entity.cpp" />
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<ClCompile Include="src\toolbox\toolbox.cpp" />
|
<ClCompile Include="src\toolbox\toolbox.cpp" />
|
||||||
<ClCompile Include="src\scenes\startup_Scene.cpp" />
|
<ClCompile Include="src\scenes\startup_Scene.cpp" />
|
||||||
<ClCompile Include="src\computervision\calibration\HandCalibrator.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\main_character.cpp" />
|
||||||
<ClCompile Include="src\entities\house_generator.cpp" />
|
<ClCompile Include="src\entities\house_generator.cpp" />
|
||||||
<ClCompile Include="src\computervision\MenuTest.cpp" />
|
<ClCompile Include="src\computervision\MenuTest.cpp" />
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
<ClInclude Include="src\toolbox\toolbox.h" />
|
<ClInclude Include="src\toolbox\toolbox.h" />
|
||||||
<ClInclude Include="src\scenes\startup_Scene.h" />
|
<ClInclude Include="src\scenes\startup_Scene.h" />
|
||||||
<ClInclude Include="src\computervision\calibration\HandCalibrator.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\computervision\calibration\StaticSkinTreshold.h" />
|
||||||
<ClInclude Include="src\collision\collision.h" />
|
<ClInclude Include="src\collision\collision.h" />
|
||||||
<ClInclude Include="src\collision\collision_handler.h" />
|
<ClInclude Include="src\collision\collision_handler.h" />
|
||||||
@@ -126,11 +126,11 @@
|
|||||||
<ClInclude Include="src\entities\house_generator.h" />
|
<ClInclude Include="src\entities\house_generator.h" />
|
||||||
<ClInclude Include="src\scenes\in_Game_Scene.h" />
|
<ClInclude Include="src\scenes\in_Game_Scene.h" />
|
||||||
<ClInclude Include="src\scenes\scene.h" />
|
<ClInclude Include="src\scenes\scene.h" />
|
||||||
<ClInclude Include="src\computervision\FingerCount.h" />
|
<ClInclude Include="src\computervision\finger_count.h" />
|
||||||
<ClInclude Include="src\computervision\BackgroundRemover.h" />
|
<ClInclude Include="src\computervision\background_remover.h" />
|
||||||
<ClInclude Include="src\computervision\MenuTest.h" />
|
<ClInclude Include="src\computervision\MenuTest.h" />
|
||||||
<ClInclude Include="src\computervision\SkinDetector.h" />
|
<ClInclude Include="src\computervision\skin_detector.h" />
|
||||||
<ClInclude Include="src\computervision\ObjectDetection.h" />
|
<ClInclude Include="src\computervision\object_detection.h" />
|
||||||
<ClInclude Include="src\entities\camera.h" />
|
<ClInclude Include="src\entities\camera.h" />
|
||||||
<ClInclude Include="src\entities\collision_entity.h" />
|
<ClInclude Include="src\entities\collision_entity.h" />
|
||||||
<ClInclude Include="src\entities\entity.h" />
|
<ClInclude Include="src\entities\entity.h" />
|
||||||
|
|||||||
Reference in New Issue
Block a user