123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace bbiwarg
- {
- class Constants
- {
- // colors
- public static readonly Color ColorDetected = Color.White;
- public static readonly Color ColorTracked = Color.Yellow;
- //public static readonly Color EdgeColor = Color.Blue; // edgeImage draw direct to blue chanel from outputImage
- public static readonly Color FingerSliceColor = Color.Magenta;
- public static readonly Color FingerDetectedColor = ColorDetected;
- public static readonly Color FingerTrackedColor = ColorTracked;
- public static readonly Color FingerOutSliceColor = Color.DarkSlateGray;
- public static readonly Color TouchEventDetectedColor = ColorDetected;
- public static readonly Color TouchEventTrackedColor = ColorTracked;
- public static readonly Color TouchEventTipColor = Color.CornflowerBlue;
- public static readonly Color TouchEventAreaMatchedSubtractColor = Color.DarkOrange;
- public static readonly Color TouchEventAreaNonMatchedSubtractColor = Color.DarkSlateGray;
- public static readonly Color TouchEventStatusBarColor = Color.Green;
- public static readonly Color TouchEventVisualizerLineColor = Color.White;
- public static readonly Color TouchEventVisualizerPointColor = Color.Red;
- public static readonly Color PalmQuadColor = Color.Blue;
- public static readonly Color PalmGridColor = Color.CornflowerBlue;
- public static readonly Color PalmConturColor = Color.Red;
- public static readonly Color PalmConvexHullColor = Color.Green;
- public static readonly Color PalmThumbDefectColor = Color.Lime;
- // depth image
- public static readonly int DepthImageMedianSize = 5;
- public static readonly int DepthImageDepthRange = 200; // <255
- // edge image
- public static readonly int EdgeImageCannyStartThreshold = 100;
- public static readonly int EdgeImageCannyLinkingThreshold = 75;
- public static readonly int EdgeImageCannySize = 3;
- public static readonly int EdgeImageRoughNumDilationIterations = 1;
- // finger detection
- public static readonly int FingerStepSize = 2;
- public static readonly int FingerMinNumSlices = 10;
- public static readonly int FingerRemoveNumSlicesForCorrection = 3;
- public static readonly int FingerMaxGapCounter = 10;
- public static readonly int FingerMaxSliceDifferencePerStep = 5;
- public static readonly int FingerMaxSize = 35;
- public static readonly int FingerMinSize = 5;
- public static readonly int FingerNumSlicesForRelativeDirection = 5;
- public static readonly int FingerNumFramesUntilTracked = 2;
- public static readonly int FingerOutSliceFactor = 5;
- public static readonly float FingerMinSimilarityForTracking = 0.75f;
- // hand detection
- public static readonly float HandMaxSize = 0.7f;
- // palm detection
- public static readonly float PalmMinDefectMidFingerLineDistance = 20; // defects with mid point ((start + end) / 2) closer than this to a finger line are removed
- public static readonly float PalmMaxThumbDefectAngle = 110; // degree
- public static readonly float PalmMaxThumbDefectLengthQuotient = 2.05f;
- public static readonly float PalmMinThumbDefectLengthQuotient = 1.35f;
-
- //palm Grid
- public static readonly int PalmGridRows = 4;
- public static readonly int PalmGridColumns = 3;
- // touch detection
- public static readonly float TouchEventMinFloodValue = 0.33f;
- public static readonly int TouchEventTipCorrectionFactor = 5;
- public static readonly int TouchEventAreaSize = 30;
- public static readonly int TouchEventMaxDepthDifference = 20;
- public static readonly int TouchEventFingerDiameter = 5;
- public static readonly int TouchEventNumFramesUntilTracked = 2;
- // output window
- public static readonly int NumImagesPerRow = 3;
- public static readonly float WindwoSizeFactor = 1f; // output window size is scaled by this factor (from necessary size for images)
- }
- }
|