[ADD] start game scene fingers
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
#include "async/StaticCameraInstance.h"
|
||||
#include "calibration/HandCalibrator.h"
|
||||
|
||||
#include "calibration/StaticSkinTreshold.h"
|
||||
|
||||
namespace computervision
|
||||
{
|
||||
|
||||
@@ -64,12 +62,15 @@ namespace computervision
|
||||
|
||||
// draw the hand rectangle on the camera input, and draw text showing if the hand is open or closed.
|
||||
DrawHandMask(&camera_frame);
|
||||
|
||||
|
||||
hand_calibrator.SetAmountOfFingers(fingers_amount);
|
||||
finger_count.DrawHandContours(camera_frame);
|
||||
hand_calibrator.DrawHandCalibrationText(camera_frame);
|
||||
imshow("camera", camera_frame);
|
||||
|
||||
|
||||
|
||||
/*imshow("output", frame_out);
|
||||
imshow("foreground", foreground);
|
||||
imshow("handMask", handMask);
|
||||
@@ -89,13 +90,7 @@ namespace computervision
|
||||
}
|
||||
else if (key == 115) // s, calibrate the skin color
|
||||
{
|
||||
std::vector<int> treshold = skin_detector.calibrateAndReturn(input_frame);
|
||||
StaticSkinTreshold::hLowThreshold = treshold[0];
|
||||
StaticSkinTreshold::hHighThreshold = treshold[1];
|
||||
StaticSkinTreshold::sLowThreshold = treshold[2];
|
||||
StaticSkinTreshold::sHighThreshold = treshold[3];
|
||||
StaticSkinTreshold::vLowThreshold = treshold[4];
|
||||
StaticSkinTreshold::vHighThreshold = treshold[5];
|
||||
skin_detector.calibrate(input_frame);
|
||||
hand_calibrator.SetSkinCalibration(true);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user