|
@@ -1,12 +1,6 @@
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
+using bbiwarg.Utility;
|
|
|
+using System;
|
|
|
using System.Drawing;
|
|
|
-using System.Linq;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
-using System.Net;
|
|
|
-
|
|
|
-using bbiwarg.Utility;
|
|
|
|
|
|
namespace bbiwarg
|
|
|
{
|
|
@@ -22,52 +16,49 @@ namespace bbiwarg
|
|
|
/// <summary>
|
|
|
/// Defines all parameters used in the whole program.
|
|
|
/// </summary>
|
|
|
- static class Parameters
|
|
|
+ internal static class Parameters
|
|
|
{
|
|
|
#region console
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// with of the console in monospace characters
|
|
|
- /// </summary>
|
|
|
- public static readonly int ConsoleWidth = 90;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// height of the console in monospace characters
|
|
|
/// </summary>
|
|
|
public static readonly int ConsoleHeight = 30;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// with of the console in monospace characters
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int ConsoleWidth = 90;
|
|
|
|
|
|
+ #endregion console
|
|
|
|
|
|
#region input
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// the input source type
|
|
|
- /// </summary>
|
|
|
- public static readonly InputType InputSource = InputType.Movie;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// path to the movie file used as input source
|
|
|
/// </summary>
|
|
|
public static readonly String InputMoviePath = "..\\..\\videos\\touch\\4.skv";
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// the input source type
|
|
|
+ /// </summary>
|
|
|
+ public static readonly InputType InputSource = InputType.Movie;
|
|
|
|
|
|
+ #endregion input
|
|
|
|
|
|
#region Logger
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// true iff the timer output should be shown
|
|
|
- /// </summary>
|
|
|
- public static readonly bool LoggerTimerOutputEnabled = true;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// bitfield which specifies which subjects should be logged
|
|
|
/// </summary>
|
|
|
public static readonly LogSubject LoggerEnabledSubjects = LogSubject.None;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// true iff the timer output should be shown
|
|
|
+ /// </summary>
|
|
|
+ public static readonly bool LoggerTimerOutputEnabled = true;
|
|
|
|
|
|
+ #endregion Logger
|
|
|
|
|
|
#region DebugWindow
|
|
|
|
|
@@ -76,18 +67,17 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly bool DebugWindowEnabled = true;
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// the update interval for the debug window
|
|
|
- /// </summary>
|
|
|
- public static readonly int DebugWindowUpdateIntervall = 1000 / 30; // 30fps
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// the title of the debug window
|
|
|
/// </summary>
|
|
|
public static readonly String DebugWindowTitle = "BBIWARG - DebugOutput";
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// the update interval for the debug window
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int DebugWindowUpdateIntervall = 1000 / 30; // 30fps
|
|
|
|
|
|
+ #endregion DebugWindow
|
|
|
|
|
|
#region GlassesWindow
|
|
|
|
|
@@ -97,9 +87,9 @@ namespace bbiwarg
|
|
|
public static readonly bool GlassesWindowEnabled = false;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// the update interval for the glasses window
|
|
|
+ /// number of calibration points
|
|
|
/// </summary>
|
|
|
- public static readonly int GlassesWindowUpdateInterval = 1000 / 30; // 30fps
|
|
|
+ public static readonly int GlassesWindowNumCalibrationPoints = 20;
|
|
|
|
|
|
/// <summary>
|
|
|
/// the titel of the debug window
|
|
@@ -107,20 +97,14 @@ namespace bbiwarg
|
|
|
public static readonly String GlassesWindowTitle = "BBIWARG - GlassesOutput";
|
|
|
|
|
|
/// <summary>
|
|
|
- /// number of calibration points
|
|
|
+ /// the update interval for the glasses window
|
|
|
/// </summary>
|
|
|
- public static readonly int GlassesWindowNumCalibrationPoints = 20;
|
|
|
-
|
|
|
- #endregion
|
|
|
+ public static readonly int GlassesWindowUpdateInterval = 1000 / 30; // 30fps
|
|
|
|
|
|
+ #endregion GlassesWindow
|
|
|
|
|
|
#region tuio
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// true iff the tuio server is enabled
|
|
|
- /// </summary>
|
|
|
- public static readonly bool TuioEnabledByDefault = true;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// the default ip address of the tuio server
|
|
|
/// </summary>
|
|
@@ -131,8 +115,12 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly Int16 TuioDefaultPort = 3333;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// true iff the tuio server is enabled
|
|
|
+ /// </summary>
|
|
|
+ public static readonly bool TuioEnabledByDefault = true;
|
|
|
|
|
|
+ #endregion tuio
|
|
|
|
|
|
#region ConfidenceImage
|
|
|
|
|
@@ -141,48 +129,47 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly int ConfidenceImageMinThreshold = 500;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion ConfidenceImage
|
|
|
|
|
|
#region DepthImage
|
|
|
|
|
|
/// <summary>
|
|
|
- /// the size of the median filter used to filter the depth image
|
|
|
+ /// the depth range which is considered important (in mm)
|
|
|
/// </summary>
|
|
|
- public static readonly int DepthImageMedianSize = 5;
|
|
|
+ public static readonly int DepthImageDepthRange = 200;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// the depth range which is considered important (in mm)
|
|
|
+ /// the size of the median filter used to filter the depth image
|
|
|
/// </summary>
|
|
|
- public static readonly int DepthImageDepthRange = 200; // <255
|
|
|
+ public static readonly int DepthImageMedianSize = 5;
|
|
|
|
|
|
- #endregion
|
|
|
+ // <255
|
|
|
|
|
|
+ #endregion DepthImage
|
|
|
|
|
|
#region EdgeImage
|
|
|
|
|
|
/// <summary>
|
|
|
- /// start threshold for the canny edge detector used to detect edges in the depth image
|
|
|
+ /// linking threshold for the canny edge detector used to detect edges in the depth image
|
|
|
/// </summary>
|
|
|
- public static readonly int EdgeImageCannyStartThreshold = 80;
|
|
|
+ public static readonly int EdgeImageCannyLinkingThreshold = 60;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// linking threshold for the canny edge detector used to detect edges in the depth image
|
|
|
+ /// filter size for the canny edge detector used to detect edges in the depth image
|
|
|
/// </summary>
|
|
|
- public static readonly int EdgeImageCannyLinkingThreshold = 60;
|
|
|
+ public static readonly int EdgeImageCannySize = 3;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// filter size for the canny edge detector used to detect edges in the depth image
|
|
|
+ /// start threshold for the canny edge detector used to detect edges in the depth image
|
|
|
/// </summary>
|
|
|
- public static readonly int EdgeImageCannySize = 3;
|
|
|
+ public static readonly int EdgeImageCannyStartThreshold = 80;
|
|
|
|
|
|
/// <summary>
|
|
|
/// number of dilation iterations to generate the rough edge image from the edge image
|
|
|
/// </summary>
|
|
|
public static readonly int EdgeImageRoughNumDilationIterations = 1;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion EdgeImage
|
|
|
|
|
|
#region general tracking
|
|
|
|
|
@@ -191,11 +178,20 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly float TrackerMaxRelativeMove = 0.25f;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion general tracking
|
|
|
|
|
|
#region finger detection
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// the contour margin around the finger
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int FingerContourMargin = 4;
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// the maximum depth difference between the finger and a point beside the finger
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int FingerMaxCrippleDifference = 20;
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// the number of missed slices until the trail expansion stops
|
|
|
/// </summary>
|
|
@@ -207,9 +203,9 @@ namespace bbiwarg
|
|
|
public static readonly int FingerMaxSliceLengthDifferencePerStep = 5;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// the minimum number of slices a finger must have
|
|
|
+ /// maximum finger slice length (in pixels)
|
|
|
/// </summary>
|
|
|
- public static readonly int FingerMinNumSlices = 20;
|
|
|
+ public static readonly int FingerMaxWidth2D = 30;
|
|
|
|
|
|
/// <summary>
|
|
|
/// maximum finger slice length (in mm)
|
|
@@ -217,24 +213,21 @@ namespace bbiwarg
|
|
|
public static readonly float FingerMaxWidth3D = 35f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// maximum finger slice length (in pixels)
|
|
|
+ /// the minimum number of slices a finger must have
|
|
|
/// </summary>
|
|
|
- public static readonly int FingerMaxWidth2D = 30; // TODO remove and replace with 3Dwidth
|
|
|
+ public static readonly int FingerMinNumSlices = 20;
|
|
|
+
|
|
|
+ // TODO remove and replace with 3Dwidth
|
|
|
|
|
|
/// <summary>
|
|
|
/// minimum finger slice length (in pixels)
|
|
|
/// </summary>
|
|
|
public static readonly int FingerMinWidth2D = 2;
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// the number of slices that are removed when the finger expansion starts in opposite direction (because inital slices don't have the correct direction)
|
|
|
- /// </summary>
|
|
|
- public static readonly int FingerRemoveNumSlicesForCorrection = 10;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// the number of slices used to calculate the start and end directions
|
|
|
/// </summary>
|
|
|
- public static readonly int FingerNumSlicesForRelativeDirection = FingerRemoveNumSlicesForCorrection;
|
|
|
+ public static readonly int FingerNumSlicesForRelativeDirection = 5;
|
|
|
|
|
|
/// <summary>
|
|
|
/// the distance of a point to be considered beside the finger (in pixels)
|
|
@@ -242,30 +235,14 @@ namespace bbiwarg
|
|
|
public static readonly int FingerOutMargin = 6;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// the maximum depth difference between the finger and a point beside the finger
|
|
|
- /// </summary>
|
|
|
- public static readonly int FingerMaxCrippleDifference = 20;
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// the contour margin around the finger
|
|
|
+ /// the number of slices that are removed when the finger expansion starts in opposite direction (because inital slices don't have the correct direction)
|
|
|
/// </summary>
|
|
|
- public static readonly int FingerContourMargin = 4;
|
|
|
-
|
|
|
- #endregion
|
|
|
+ public static readonly int FingerRemoveNumSlicesForCorrection = 10;
|
|
|
|
|
|
+ #endregion finger detection
|
|
|
|
|
|
#region finger tracking
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// number of frames a finger needs to be detected before it is tracked
|
|
|
- /// </summary>
|
|
|
- public static readonly int FingerTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// number of frames a finger needs to be lost before it is deleted
|
|
|
- /// </summary>
|
|
|
- public static readonly int FingerTrackerNumFramesLostUntilDeleted = 10;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// xx entry for the measurement noise covariance matrix for the kalman filter used to smooth the finger hand and tip points
|
|
|
/// </summary>
|
|
@@ -282,9 +259,9 @@ namespace bbiwarg
|
|
|
public static readonly float FingermYY = 0.000005f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// number of finger slice directions used to compute the mean finger direction
|
|
|
+ /// if the hand point of a finger moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
/// </summary>
|
|
|
- public static readonly int FingerTrackerNumDirectionsForMeanDirection = 10;
|
|
|
+ public static readonly float FingerTrackerMaxHandPointRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
/// <summary>
|
|
|
/// if the tip point of a finger moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
@@ -292,19 +269,33 @@ namespace bbiwarg
|
|
|
public static readonly float FingerTrackerMaxTipPointRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// if the hand point of a finger moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
+ /// number of finger slice directions used to compute the mean finger direction
|
|
|
/// </summary>
|
|
|
- public static readonly float FingerTrackerMaxHandPointRelativeMove = TrackerMaxRelativeMove;
|
|
|
+ public static readonly int FingerTrackerNumDirectionsForMeanDirection = 10;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// number of frames a finger needs to be detected before it is tracked
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int FingerTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// number of frames a finger needs to be lost before it is deleted
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int FingerTrackerNumFramesLostUntilDeleted = 10;
|
|
|
+
|
|
|
+ #endregion finger tracking
|
|
|
|
|
|
#region hand detection
|
|
|
|
|
|
/// <summary>
|
|
|
- /// number of colors used to draw hands
|
|
|
+ /// maximum depth difference below which two sections of a hand which are seperated by a finger are considered to belong to the same hand
|
|
|
/// </summary>
|
|
|
- public static readonly int HandNumColors = 3;
|
|
|
+ public static readonly int HandExtendMaxDifference = 40;
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// maximum size of a hand extension mask relative to the whole image
|
|
|
+ /// </summary>
|
|
|
+ public static readonly float HandExtensionMaxRelativeSize = 0.5f * HandMaxSize;
|
|
|
|
|
|
/// <summary>
|
|
|
/// maximum downwards depth difference between a pixel and a neighboring pixel belonging to the same hand
|
|
@@ -327,14 +318,9 @@ namespace bbiwarg
|
|
|
public static readonly float HandMinSize = 0.01f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// maximum size of a hand extension mask relative to the whole image
|
|
|
- /// </summary>
|
|
|
- public static readonly float HandExtensionMaxRelativeSize = 0.5f * HandMaxSize;
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// maximum depth difference below which two sections of a hand which are seperated by a finger are considered to belong to the same hand
|
|
|
+ /// number of colors used to draw hands
|
|
|
/// </summary>
|
|
|
- public static readonly int HandExtendMaxDifference = 40;
|
|
|
+ public static readonly int HandNumColors = 3;
|
|
|
|
|
|
/// <summary>
|
|
|
/// the maximum distance of the thumb tip point to the outer short point of a convexity defect for possible thumb defects
|
|
@@ -342,9 +328,10 @@ namespace bbiwarg
|
|
|
public static readonly float HandThumbDefectMaxDistanceToThumb = Parameters.FingerMaxWidth2D;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// the minumum ratio of the thumb length to the length from the depth point to the outer short point of a convexity defect for possible thumb defects
|
|
|
+ /// the maximum ratio of the length from the depth point to the outer short point to
|
|
|
+ /// the length from the depth point to the outer long point of a convexity defect for possible thumb defects
|
|
|
/// </summary>
|
|
|
- public static readonly float HandThumbDefectMinThumbShortLengthRatio = 0.75f;
|
|
|
+ public static readonly float HandThumbDefectMaxShortLongLengthRatio = 0.7f;
|
|
|
|
|
|
/// <summary>
|
|
|
/// the maximum ratio of the thumb length to the length from the depth point to the outer short point of a convexity defect for possible thumb defects
|
|
@@ -352,90 +339,87 @@ namespace bbiwarg
|
|
|
public static readonly float HandThumbDefectMaxThumbShortLengthRatio = 1.1f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// the minimum ratio of the length from the depth point to the outer short point to
|
|
|
+ /// the minimum ratio of the length from the depth point to the outer short point to
|
|
|
/// the length from the depth point to the outer long point of a convexity defect for possible thumb defects
|
|
|
/// </summary>
|
|
|
public static readonly float HandThumbDefectMinShortLongLengthRatio = 0.3f;
|
|
|
+
|
|
|
/// <summary>
|
|
|
- /// the maximum ratio of the length from the depth point to the outer short point to
|
|
|
- /// the length from the depth point to the outer long point of a convexity defect for possible thumb defects
|
|
|
+ /// the minumum ratio of the thumb length to the length from the depth point to the outer short point of a convexity defect for possible thumb defects
|
|
|
/// </summary>
|
|
|
- public static readonly float HandThumbDefectMaxShortLongLengthRatio = 0.7f;
|
|
|
-
|
|
|
- #endregion
|
|
|
+ public static readonly float HandThumbDefectMinThumbShortLengthRatio = 0.75f;
|
|
|
|
|
|
+ #endregion hand detection
|
|
|
|
|
|
#region hand tracker
|
|
|
|
|
|
/// <summary>
|
|
|
- /// number of frames a hand needs to be detected before it is tracked
|
|
|
+ /// xx entry for the measurement noise covariance matrix for the kalman filter used to smooth the hand centroid
|
|
|
/// </summary>
|
|
|
- public static readonly int HandTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
+ public static readonly float HandmXX = 0.0005f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// number of frames a hand needs to be lost before it is deleted
|
|
|
+ /// xy and yx entry for the measurement noise covariance matrix for the kalman filter used to smooth the hand centroid
|
|
|
/// </summary>
|
|
|
- public static readonly int HandTrackerNumFramesLostUntilDeleted = 5;
|
|
|
+ public static readonly float HandmXY = 0.0f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// if the centroid of a hand moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
+ /// yy entry for the measurement noise covariance matrix for the kalman filter used to smooth the hand centroid
|
|
|
/// </summary>
|
|
|
- public static readonly float HandTrackerMaxCentroidRelativeMove = TrackerMaxRelativeMove;
|
|
|
+ public static readonly float HandmYY = 0.0005f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// xx entry for the measurement noise covariance matrix for the kalman filter used to smooth the hand centroid
|
|
|
+ /// if the centroid of a hand moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
/// </summary>
|
|
|
- public static readonly float HandmXX = 0.0005f;
|
|
|
+ public static readonly float HandTrackerMaxCentroidRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// xy and yx entry for the measurement noise covariance matrix for the kalman filter used to smooth the hand centroid
|
|
|
+ /// number of frames a hand needs to be detected before it is tracked
|
|
|
/// </summary>
|
|
|
- public static readonly float HandmXY = 0.0f;
|
|
|
+ public static readonly int HandTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// yy entry for the measurement noise covariance matrix for the kalman filter used to smooth the hand centroid
|
|
|
+ /// number of frames a hand needs to be lost before it is deleted
|
|
|
/// </summary>
|
|
|
- public static readonly float HandmYY = 0.0005f;
|
|
|
-
|
|
|
- #endregion
|
|
|
+ public static readonly int HandTrackerNumFramesLostUntilDeleted = 5;
|
|
|
|
|
|
+ #endregion hand tracker
|
|
|
|
|
|
#region palm detection
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// number of positions along the forefinger used as starting points to detect the palm width
|
|
|
- /// </summary>
|
|
|
- public static readonly int PalmNumPositionsForPalmWidth = 5;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// relative tolerance which specifies when a point is considered to be in the palm grid
|
|
|
/// </summary>
|
|
|
public static readonly float PalmInsideTolerance = 0.1f;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// number of positions along the forefinger used as starting points to detect the palm width
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int PalmNumPositionsForPalmWidth = 5;
|
|
|
|
|
|
+ #endregion palm detection
|
|
|
|
|
|
#region palm tracker
|
|
|
|
|
|
/// <summary>
|
|
|
- /// number of frames a palm needs to be detected before it is tracked
|
|
|
+ /// xx entry for the measurement noise covariance matrix for the kalman filter used to smooth the palm grid points
|
|
|
/// </summary>
|
|
|
- public static readonly int PalmTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
+ public static readonly float PalmmXX = 0.00005f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// number of frames a palm needs to be lost before it is deleted
|
|
|
+ /// xy and yx entry for the measurement noise covariance matrix for the kalman filter used to smooth the palm grid points
|
|
|
/// </summary>
|
|
|
- public static readonly int PalmTrackerNumFramesLostUntilDeleted = 5;
|
|
|
+ public static readonly float PalmmXY = 0.0f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// if the upper wrist point of the palm grid moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
+ /// yy entry for the measurement noise covariance matrix for the kalman filter used to smooth the palm grid points
|
|
|
/// </summary>
|
|
|
- public static readonly float PalmTrackerMaxWristUpperRelativeMove = TrackerMaxRelativeMove;
|
|
|
+ public static readonly float PalmmYY = 0.00005f;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// if the lower wrist point of the palm grid moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
+ /// if the lower finger point of the palm grid moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
/// </summary>
|
|
|
- public static readonly float PalmTrackerMaxWristLowerRelativeMove = TrackerMaxRelativeMove;
|
|
|
+ public static readonly float PalmTrackerMaxFingersLowerRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
/// <summary>
|
|
|
/// if the upper finger point of the palm grid moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
@@ -443,50 +427,43 @@ namespace bbiwarg
|
|
|
public static readonly float PalmTrackerMaxFingersUpperRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// if the lower finger point of the palm grid moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
+ /// if the lower wrist point of the palm grid moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
/// </summary>
|
|
|
- public static readonly float PalmTrackerMaxFingersLowerRelativeMove = TrackerMaxRelativeMove;
|
|
|
+ public static readonly float PalmTrackerMaxWristLowerRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// xx entry for the measurement noise covariance matrix for the kalman filter used to smooth the palm grid points
|
|
|
+ /// if the upper wrist point of the palm grid moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
/// </summary>
|
|
|
- public static readonly float PalmmXX = 0.00005f;
|
|
|
+ public static readonly float PalmTrackerMaxWristUpperRelativeMove = TrackerMaxRelativeMove;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// xy and yx entry for the measurement noise covariance matrix for the kalman filter used to smooth the palm grid points
|
|
|
+ /// number of frames a palm needs to be detected before it is tracked
|
|
|
/// </summary>
|
|
|
- public static readonly float PalmmXY = 0.0f;
|
|
|
+ public static readonly int PalmTrackerNumFramesDetectedUntilTracked = 5;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// yy entry for the measurement noise covariance matrix for the kalman filter used to smooth the palm grid points
|
|
|
+ /// number of frames a palm needs to be lost before it is deleted
|
|
|
/// </summary>
|
|
|
- public static readonly float PalmmYY = 0.00005f;
|
|
|
-
|
|
|
- #endregion
|
|
|
+ public static readonly int PalmTrackerNumFramesLostUntilDeleted = 5;
|
|
|
|
|
|
+ #endregion palm tracker
|
|
|
|
|
|
#region palm grid
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// default number of palm grid rows
|
|
|
- /// </summary>
|
|
|
- public static readonly int PalmGridDefaultNumRows = 3;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// default number of palm grid columns
|
|
|
/// </summary>
|
|
|
public static readonly int PalmGridDefaultNumColumns = 4;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// default number of palm grid rows
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int PalmGridDefaultNumRows = 3;
|
|
|
|
|
|
+ #endregion palm grid
|
|
|
|
|
|
#region touch detection
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// the threshold number of pixels affected by the flood fill (in percentage) to be considered as a touch
|
|
|
- /// </summary>
|
|
|
- public static readonly float TouchMinTouchValue = 0.3f;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// the size of the quadrant around the touch positions that is used to determine the touch value
|
|
|
/// </summary>
|
|
@@ -502,6 +479,11 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly int TouchFloodfillUpDiff = 3;
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// the threshold number of pixels affected by the flood fill (in percentage) to be considered as a touch
|
|
|
+ /// </summary>
|
|
|
+ public static readonly float TouchMinTouchValue = 0.3f;
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// the position adjustment for the start point of the flood fill operation
|
|
|
/// </summary>
|
|
@@ -512,26 +494,10 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly int TouchTipOutsideFactor = 7;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion touch detection
|
|
|
|
|
|
#region touch tracking
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// number of frames an object needs to be detected before it is tracked
|
|
|
- /// </summary>
|
|
|
- public static readonly int TouchTrackerNumFramesDetectedUntilTracked = 1;
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// number of frames an object needs to be lost before it is deleted
|
|
|
- /// </summary>
|
|
|
- public static readonly int TouchTrackerNumFramesLostUntilDeleted = 5;
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// if the absolute position of a tracked touch event moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
- /// </summary>
|
|
|
- public static readonly float TouchTrackerMaxAbsolutePositionRelativeMove = TrackerMaxRelativeMove;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// xx entry for the measurement noise covariance matrix for the kalman filter used to smooth touch events
|
|
|
/// </summary>
|
|
@@ -552,8 +518,22 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly float TouchProcessNoise = 3.0e-4f;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// if the absolute position of a tracked touch event moves this relative amount it will have a similarity of 0 to itself at the previous position
|
|
|
+ /// </summary>
|
|
|
+ public static readonly float TouchTrackerMaxAbsolutePositionRelativeMove = TrackerMaxRelativeMove;
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// number of frames an object needs to be detected before it is tracked
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int TouchTrackerNumFramesDetectedUntilTracked = 1;
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// number of frames an object needs to be lost before it is deleted
|
|
|
+ /// </summary>
|
|
|
+ public static readonly int TouchTrackerNumFramesLostUntilDeleted = 5;
|
|
|
|
|
|
+ #endregion touch tracking
|
|
|
|
|
|
#region TouchEventVisualizer
|
|
|
|
|
@@ -562,8 +542,7 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly int TouchEventVisualizerFadeOutTime = 1500;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion TouchEventVisualizer
|
|
|
|
|
|
#region homographyExport
|
|
|
|
|
@@ -572,8 +551,7 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly String HomographyFileName = "homography.txt";
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion homographyExport
|
|
|
|
|
|
#region colors
|
|
|
|
|
@@ -589,8 +567,7 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly Color ColorTracked = Color.Yellow;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion general
|
|
|
|
|
|
#region images
|
|
|
|
|
@@ -609,15 +586,14 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly Color OutputImageBorderColor = Color.White;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion images
|
|
|
|
|
|
#region finger
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the finger slices
|
|
|
+ /// color used to draw the finger contour
|
|
|
/// </summary>
|
|
|
- public static readonly Color FingerSliceColor = Color.Magenta;
|
|
|
+ public static readonly Color FingerContourColor = Color.Red;
|
|
|
|
|
|
/// <summary>
|
|
|
/// color used to draw the detected fingers
|
|
@@ -625,32 +601,31 @@ namespace bbiwarg
|
|
|
public static readonly Color FingerDetectedColor = ColorDetected;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the tracked fingers
|
|
|
+ /// color used to draw the finger hand point
|
|
|
/// </summary>
|
|
|
- public static readonly Color FingerTrackedColor = ColorTracked;
|
|
|
+ public static readonly Color FingerHandColor = Color.Yellow;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the finger tip point
|
|
|
+ /// color used to draw the text for the finger id
|
|
|
/// </summary>
|
|
|
- public static readonly Color FingerTipColor = Color.Blue;
|
|
|
+ public static readonly Color FingerIDColor = Color.White;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the finger hand point
|
|
|
+ /// color used to draw the finger slices
|
|
|
/// </summary>
|
|
|
- public static readonly Color FingerHandColor = Color.Yellow;
|
|
|
+ public static readonly Color FingerSliceColor = Color.Magenta;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the finger contour
|
|
|
+ /// color used to draw the finger tip point
|
|
|
/// </summary>
|
|
|
- public static readonly Color FingerContourColor = Color.Red;
|
|
|
+ public static readonly Color FingerTipColor = Color.Blue;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the text for the finger id
|
|
|
+ /// color used to draw the tracked fingers
|
|
|
/// </summary>
|
|
|
- public static readonly Color FingerIDColor = Color.White;
|
|
|
-
|
|
|
- #endregion
|
|
|
+ public static readonly Color FingerTrackedColor = ColorTracked;
|
|
|
|
|
|
+ #endregion finger
|
|
|
|
|
|
#region touch
|
|
|
|
|
@@ -664,20 +639,14 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly Color TouchEventTrackedColor = ColorTracked;
|
|
|
|
|
|
- #endregion
|
|
|
-
|
|
|
+ #endregion touch
|
|
|
|
|
|
#region TouchEventVisualizer
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the lines between touch events in the touch event visualizer
|
|
|
- /// </summary>
|
|
|
- public static readonly Color TouchEventVisualizerLineColor = Color.Yellow;
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// color used to draw the touch event points in the touch event visualizer
|
|
|
+ /// color used to highlight the active block in the touch event visualizer
|
|
|
/// </summary>
|
|
|
- public static readonly Color TouchEventVisualizerPointColor = Color.Red;
|
|
|
+ public static readonly Color TouchEventVisualizerActiveBlockColor = Color.DarkSlateGray;
|
|
|
|
|
|
/// <summary>
|
|
|
/// color used to draw the grid in the touch event visualizer
|
|
@@ -685,62 +654,64 @@ namespace bbiwarg
|
|
|
public static readonly Color TouchEventVisualizerGridColor = Color.White;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the text in the touch event visualizer
|
|
|
+ /// color used to draw the lines between touch events in the touch event visualizer
|
|
|
/// </summary>
|
|
|
- public static readonly Color TouchEventVisualizerTextColor = Color.White;
|
|
|
+ public static readonly Color TouchEventVisualizerLineColor = Color.Yellow;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to highlight the active block in the touch event visualizer
|
|
|
+ /// color used to draw the touch event points in the touch event visualizer
|
|
|
/// </summary>
|
|
|
- public static readonly Color TouchEventVisualizerActiveBlockColor = Color.DarkSlateGray;
|
|
|
+ public static readonly Color TouchEventVisualizerPointColor = Color.Red;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// color used to draw the text in the touch event visualizer
|
|
|
+ /// </summary>
|
|
|
+ public static readonly Color TouchEventVisualizerTextColor = Color.White;
|
|
|
|
|
|
+ #endregion TouchEventVisualizer
|
|
|
|
|
|
#region palm
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// color used to draw the plam quadrangle
|
|
|
- /// </summary>
|
|
|
- public static readonly Color PalmQuadColor = Color.Blue;
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// color used to draw the palm grid in the palm
|
|
|
/// </summary>
|
|
|
public static readonly Color PalmGridColor = Color.CornflowerBlue;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// color used to draw the plam quadrangle
|
|
|
+ /// </summary>
|
|
|
+ public static readonly Color PalmQuadColor = Color.Blue;
|
|
|
|
|
|
+ #endregion palm
|
|
|
|
|
|
#region hand
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// colors used to draw the hands (ith element is a color which specifies the color channels used to draw the ith hand)
|
|
|
- /// </summary>
|
|
|
- public static readonly Color[] HandColors = new Color[3] { Color.Red, Color.Blue, Color.Green };
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// color used to draw the hand centroid
|
|
|
/// </summary>
|
|
|
public static readonly Color HandCentroidColor = Color.Yellow;
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the hand id text
|
|
|
+ /// colors used to draw the hands (ith element is a color which specifies the color channels used to draw the ith hand)
|
|
|
/// </summary>
|
|
|
- public static readonly Color HandIDColor = Color.White;
|
|
|
+ public static readonly Color[] HandColors = new Color[3] { Color.Red, Color.Blue, Color.Green };
|
|
|
|
|
|
/// <summary>
|
|
|
- /// color used to draw the points of the thumb defects
|
|
|
+ /// color used to draw the hand id text
|
|
|
/// </summary>
|
|
|
- public static readonly Color HandThumbDefectPointColor = Color.Lime;
|
|
|
+ public static readonly Color HandIDColor = Color.White;
|
|
|
|
|
|
/// <summary>
|
|
|
/// color used to draw the lines of the thumb defects
|
|
|
/// </summary>
|
|
|
public static readonly Color HandThumbDefectLineColor = Color.CornflowerBlue;
|
|
|
|
|
|
- #endregion
|
|
|
+ /// <summary>
|
|
|
+ /// color used to draw the points of the thumb defects
|
|
|
+ /// </summary>
|
|
|
+ public static readonly Color HandThumbDefectPointColor = Color.Lime;
|
|
|
|
|
|
+ #endregion hand
|
|
|
|
|
|
#region calibration
|
|
|
|
|
@@ -749,8 +720,8 @@ namespace bbiwarg
|
|
|
/// </summary>
|
|
|
public static readonly Color CalibrationPointColor = Color.Yellow;
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion calibration
|
|
|
|
|
|
- #endregion
|
|
|
+ #endregion colors
|
|
|
}
|
|
|
-}
|
|
|
+}
|