|
@@ -58,7 +58,7 @@ namespace bbiwarg
|
|
|
|
|
|
private TouchEventVisualizer touchEventVisualizer;
|
|
|
|
|
|
- private int videoFrame = 0;
|
|
|
+ private int videoFrame = 1;
|
|
|
|
|
|
public VideoHandle(IInputProvider inputProvider)
|
|
|
{
|
|
@@ -68,13 +68,12 @@ namespace bbiwarg
|
|
|
public void start()
|
|
|
{
|
|
|
palmDetector = new PalmDetector();
|
|
|
+ server = new TuioServer("127.0.0.1", 3333);
|
|
|
|
|
|
inputProvider.init();
|
|
|
inputProvider.start();
|
|
|
inputProvider.updateFrame();
|
|
|
processFrameUpdate();
|
|
|
-
|
|
|
- server = new TuioServer("127.0.0.1", 3333);
|
|
|
}
|
|
|
|
|
|
public void stop()
|
|
@@ -127,7 +126,7 @@ namespace bbiwarg
|
|
|
{
|
|
|
Timer.start("processFrameUpdate");
|
|
|
|
|
|
- if (CurrentFrame == 0) {
|
|
|
+ if (CurrentFrame == 1) {
|
|
|
//initialize trackers
|
|
|
touchTracker = new TouchTracker();
|
|
|
fingerTracker = new FingerTracker();
|
|
@@ -191,7 +190,7 @@ namespace bbiwarg
|
|
|
|
|
|
//detect palm
|
|
|
Timer.start("palmDetection");
|
|
|
- if (CurrentFrame == 0)
|
|
|
+ if (CurrentFrame == 1)
|
|
|
palmDetector.reset();
|
|
|
palmDetector.findPalmQuad(OutputImages[3], handDetector.Hands);
|
|
|
Timer.stop("palmDetection");
|
|
@@ -233,7 +232,7 @@ namespace bbiwarg
|
|
|
// touch event visualizer
|
|
|
if (touchEventVisualizer == null)
|
|
|
touchEventVisualizer = new TouchEventVisualizer(Width, Height);
|
|
|
- if (CurrentFrame == 0)
|
|
|
+ if (CurrentFrame == 1)
|
|
|
touchEventVisualizer.Reset();
|
|
|
if (palmTouchDetector != null)
|
|
|
{
|