|
@@ -10,59 +10,192 @@ using bbiwarg.Utility;
|
|
|
|
|
|
namespace bbiwarg
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public enum InputType
|
|
|
{
|
|
|
Camera,
|
|
|
Movie
|
|
|
}
|
|
|
|
|
|
- class Parameters
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ static class Parameters
|
|
|
{
|
|
|
-
|
|
|
+ #region console
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int ConsoleWidth = 90;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int ConsoleHeight = 30;
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region input
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public static readonly InputType InputSource = InputType.Camera;
|
|
|
|
|
|
-
|
|
|
- public static readonly InputType InputSource = InputType.Movie;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly String InputMoviePath = "..\\..\\videos\\touch\\4.skv";
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region Logger
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly bool LoggerTimerOutputEnabled = true;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly LogSubject LoggerEnabledSubjects = LogSubject.None;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region DebugWindow
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly bool DebugWindowEnabled = true;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int DebugWindowUpdateIntervall = 1000 / 30;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly String DebugWindowTitle = "BBIWARG - DebugOutput";
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region GlassesWindow
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly bool GlassesWindowEnabled = false;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int GlassesWindowUpdateInterval = 1000 / 30;
|
|
|
- public static readonly String GlassesWindowTitle = "BBIWARG - GlassesOuty put";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public static readonly String GlassesWindowTitle = "BBIWARG - GlassesOutput";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int GlassesWindowNumCalibrationPoints = 20;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region tuio
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly bool TuioEnabledByDefault = true;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly String TuioDefaultIP = "127.0.0.1";
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Int16 TuioDefaultPort = 3333;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region ConfidenceImage
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int ConfidenceImageMinThreshold = 500;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region DepthImage
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int DepthImageMedianSize = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int DepthImageDepthRange = 200;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region EdgeImage
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int EdgeImageCannyStartThreshold = 80;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int EdgeImageCannyLinkingThreshold = 60;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int EdgeImageCannySize = 3;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int EdgeImageRoughNumDilationIterations = 1;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region general tracking
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float TrackerMaxRelativeMove = 0.25f;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region finger detection
|
|
|
+
|
|
|
public static readonly int FingerStepSize = 1;
|
|
|
public static readonly int FingerMaxGapCounter = 3;
|
|
|
public static readonly int FingerMaxSliceDifferencePerStep = 5;
|
|
@@ -76,23 +209,86 @@ namespace bbiwarg
|
|
|
public static readonly int FingerMaxCrippleDifference = 20;
|
|
|
public static readonly int FingerContourMargin = 4;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region finger tracking
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int FingerTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int FingerTrackerNumFramesLostUntilDeleted = 10;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float FingermXX = 0.000005f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float FingermXY = 0.0f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float FingermYY = 0.000005f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int FingerTrackerNumDirectionsForMeanDirection = 10;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float FingerTrackerMaxTipPointRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float FingerTrackerMaxHandPointRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region hand detection
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int HandNumColors = 3;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int HandFloodFillDownDiff = 2;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int HandFloodFillUpDiff = 2;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float HandMaxSize = 0.6f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float HandMinSize = 0.01f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float HandExtensionMaxRelativeSize = 0.5f * HandMaxSize;
|
|
|
+
|
|
|
public static readonly int HandExtendMaxDifference = 40;
|
|
|
public static readonly float HandThumbDefectMaxDistanceToThumb = Parameters.FingerMaxWidth2D;
|
|
|
public static readonly float HandThumbDefectMinThumbShortLengthRatio = 0.75f;
|
|
@@ -100,34 +296,126 @@ namespace bbiwarg
|
|
|
public static readonly float HandThumbDefectMinShortLongLengthRatio = 0.3f;
|
|
|
public static readonly float HandThumbDefectMaxShortLongLengthRatio = 0.7f;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region hand tracker
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int HandTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int HandTrackerNumFramesLostUntilDeleted = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float HandTrackerMaxCentroidRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float HandmXX = 0.0005f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float HandmXY = 0.0f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float HandmYY = 0.0005f;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region palm detection
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int PalmNumPositionsForPalmWidth = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmInsideTolerance = 0.1f;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region palm tracker
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int PalmTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int PalmTrackerNumFramesLostUntilDeleted = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmTrackerMaxWristUpperRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmTrackerMaxWristLowerRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmTrackerMaxFingersUpperRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmTrackerMaxFingersLowerRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmmXX = 0.00005f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmmXY = 0.0f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float PalmmYY = 0.00005f;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region palm grid
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int PalmGridDefaultNumRows = 3;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int PalmGridDefaultNumColumns = 4;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region touch
|
|
|
+
|
|
|
public static readonly float TouchMinTouchValue = 0.3f;
|
|
|
public static readonly int TouchAreaSize = 30;
|
|
|
public static readonly int TouchFloodfillDownDiff = 1;
|
|
@@ -135,58 +423,245 @@ namespace bbiwarg
|
|
|
public static readonly int TouchTipInsideFactor = 2;
|
|
|
public static readonly int TouchTipOutsideFactor = 7;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region touch tracking
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int TouchTrackerNumFramesDetectedUntilTracked = 1;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int TouchTrackerNumFramesLostUntilDeleted = 5;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float TouchTrackerMaxAbsolutePositionRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float TouchmXX = 0.003f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float TouchmXY = 0.0f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float TouchmYY = 0.00165f;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly float TouchProcessNoise = 3.0e-4f;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region TouchEventVisualizer
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly int TouchEventVisualizerFadeOutTime = 1500;
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region homographyExport
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly String HomographyFileName = "homography.txt";
|
|
|
|
|
|
-
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region colors
|
|
|
+
|
|
|
+ #region general
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color ColorDetected = Color.Turquoise;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color ColorTracked = Color.Yellow;
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region images
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color DepthImageColor = Color.White;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color EdgeImageColor = Color.Blue;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color OutputImageBorderColor = Color.White;
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region finger
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color FingerSliceColor = Color.Magenta;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color FingerDetectedColor = ColorDetected;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color FingerTrackedColor = ColorTracked;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color FingerTipColor = Color.Blue;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color FingerHandColor = Color.Yellow;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color FingerContourColor = Color.Red;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color FingerIDColor = Color.White;
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region touch
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color TouchEventDetectedColor = ColorDetected;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color TouchEventTrackedColor = ColorTracked;
|
|
|
- public static readonly Color TouchEventAreaMatchedSubtractColor = Color.DarkOrange;
|
|
|
- public static readonly Color TouchEventAreaNonMatchedSubtractColor = Color.DarkSlateGray;
|
|
|
- public static readonly Color TouchEventStatusBarColor = Color.Green;
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region TouchEventVisualizer
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color TouchEventVisualizerLineColor = Color.Yellow;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color TouchEventVisualizerPointColor = Color.Red;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color TouchEventVisualizerGridColor = Color.White;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color TouchEventVisualizerTextColor = Color.White;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color TouchEventVisualizerActiveBlockColor = Color.DarkSlateGray;
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region palm
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color PalmQuadColor = Color.Blue;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color PalmGridColor = Color.CornflowerBlue;
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region hand
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color[] HandColors = new Color[3] { Color.Red, Color.Blue, Color.Green };
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color HandCentroidColor = Color.Yellow;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color HandIDColor = Color.White;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color HandThumbDefectPointColor = Color.Lime;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color HandThumbDefectLineColor = Color.CornflowerBlue;
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #region calibration
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public static readonly Color CalibrationPointColor = Color.Yellow;
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|