示例#1
0
 public HandDataSource(IShapeDataSource shapeDataSource, HandDataSourceSettings settings)
     : base(shapeDataSource)
 {
     this.factory      = new ShapeHandDataFactory(settings);
     this.size         = shapeDataSource.Size;
     this.CurrentValue = new HandCollection();
 }
 public ShapeHandDataFactory(HandDataSourceSettings settings)
 {
     this.settings = settings;
     this.fingerPointDetector = new FingerPointDetector(settings);
     this.palmFinder = new PalmFinder(settings);
     this.currentValue = new HandCollection();
 }
示例#3
0
 public ShapeHandDataFactory(HandDataSourceSettings settings)
 {
     this.settings            = settings;
     this.fingerPointDetector = new FingerPointDetector(settings);
     this.palmFinder          = new PalmFinder(settings);
     this.currentValue        = new HandCollection();
 }
示例#4
0
 public SettingsForm(ClusterDataSourceSettings clusterSettings, ShapeDataSourceSettings shapeDataSourceSettings, HandDataSourceSettings handDetectionSettings)
     : this()
 {
     this.propertyGridClustering.SelectedObject = clusterSettings;
     this.propertyGridShape.SelectedObject = shapeDataSourceSettings;
     this.propertyGridHandDetection.SelectedObject = handDetectionSettings;
 }
示例#5
0
        public MainViewModel(ClusterDataSourceSettings clusterDataSourceSettings, ShapeDataSourceSettings shapeDataSourceSettings, HandDataSourceSettings handDataSourceSettings)
        {
            this.Frames = new BindingList<TestDepthFrame>();
            this.clusterDataSourceSettings = clusterDataSourceSettings;
            this.shapeDataSourceSettings = shapeDataSourceSettings;
            this.handDataSourceSettings = handDataSourceSettings;

            this.VideoPresenter = new VideoViewModel(clusterDataSourceSettings, shapeDataSourceSettings, handDataSourceSettings);
            this.VideoPresenter.NewFrameCaptured += new Action<DepthDataFrame>(VideoPresenter_NewFrameCaptured);

            this.SaveFrameCommand = new RelayCommand(SaveCurrentFrame);
            this.LoadFrameCommand = new RelayCommand(LoadFrames);
            this.SelectPointCommand = new RelayCommand(SelectPoint);
            this.SelectFrameCommand = new RelayCommand<TestDepthFrame>(SelectFrame);
            this.RemoveFrameCommand = new RelayCommand(RemoveFrame);

            this.AddHandCommand = new RelayCommand(AddHand);
            this.RemoveHandCommand = new RelayCommand<HandDataViewModel>(RemoveHand);

            this.MarkPalmCenterCommand = new RelayCommand<HandDataViewModel>(MarkPalmCenter);
            this.MarkFingersCommand = new RelayCommand<HandDataViewModel>(MarkFingers);
            this.RemoveFingerCommand = new RelayCommand<FingerRoutedEventArgs>(RemoveFinger);

            this.OptionChangeCommand = new RelayCommand(ChangeOptions);

            this.LayerViewModel = new LayerViewModel();
        }
示例#6
0
        public HandDataFactory(IntSize size, ClusterDataSourceSettings clusteringSettings, ShapeDataSourceSettings shapeSettings, HandDataSourceSettings handSettings)
        {
            this.clusteringSettings = clusteringSettings;
            this.shapeSettings      = shapeSettings;
            this.handSettings       = handSettings;

            this.clusterFactory = new KMeansClusterFactory(this.clusteringSettings, size);
            this.filter         = new PointerDepthPointFilter(size, this.clusteringSettings.MinimumDepthThreshold, this.clusteringSettings.MaximumDepthThreshold, this.clusteringSettings.LowerBorder);

            this.shapeFactory = new ClusterShapeFactory(this.shapeSettings);
            this.handFactory  = new ShapeHandDataFactory(this.handSettings);
        }
示例#7
0
        public HandDataFactory(IntSize size, ClusterDataSourceSettings clusteringSettings, ShapeDataSourceSettings shapeSettings, HandDataSourceSettings handSettings)
        {
            this.clusteringSettings = clusteringSettings;
            this.shapeSettings = shapeSettings;
            this.handSettings = handSettings;

            this.clusterFactory = new KMeansClusterFactory(this.clusteringSettings, size);
            this.filter = new PointerDepthPointFilter(size, this.clusteringSettings.MinimumDepthThreshold, this.clusteringSettings.MaximumDepthThreshold, this.clusteringSettings.LowerBorder);

            this.shapeFactory = new ClusterShapeFactory(this.shapeSettings);
            this.handFactory = new ShapeHandDataFactory(this.handSettings);
        }
示例#8
0
        public VideoViewModel(ClusterDataSourceSettings clusterDataSourceSettings, ShapeDataSourceSettings shapeDataSourceSettings, HandDataSourceSettings handDataSourceSettings)
        {
            this.clusterDataSourceSettings = clusterDataSourceSettings;
            this.shapeDataSourceSettings = shapeDataSourceSettings;
            this.handDataSourceSettings = handDataSourceSettings;

            this.CaptureFrameCommand = new RelayCommand(CaptureFrame);
            this.CaptureFrameDelayedCommand = new RelayCommand(CaptureFrameDelayed);

            this.StartDepthSourceCommand = new RelayCommand(StartDepthSource);

            this.LayerViewModel = new LayerViewModel();
        }
示例#9
0
        public static void SetToDefault(HandDataSourceSettings settings)
        {
            settings.MinimumDistanceBetweenFingerPoints           = 25;
            settings.MinimumDistanceIntersectionPoints            = 25;
            settings.MinimumDistanceFingerPointToIntersectionLine = 22;
            settings.MaximumDistanceBetweenIntersectionPoints     = 27;

            settings.DetectFingers         = true;
            settings.DetectCenterOfPalm    = true;
            settings.DetectFingerDirection = true;

            settings.PalmAccuracySearchRadius = 4;
            settings.PalmContourReduction     = 8;
        }
示例#10
0
        public static void SetToDefault(HandDataSourceSettings settings)
        {
            settings.MinimumDistanceBetweenFingerPoints           = 25;
            settings.MinimumDistanceIntersectionPoints            = 30;
            settings.MinimumDistanceFingerPointToIntersectionLine = 22;
            settings.MaximumDistanceBetweenIntersectionPoints     = 27;

            settings.DetectFingers         = true;
            settings.DetectCenterOfPalm    = true;
            settings.DetectFingerDirection = false;

            settings.PalmAccuracySearchRadius = 8;
            settings.PalmContourReduction     = 8;

            settings.FingerBaseIndexOffset    = 10;
            settings.FingerBaseOffsetDistance = 770;

            settings.FramesForNewFingerPoint          = 3;
            settings.FramesForDiscontinuedFingerPoint = 2;
        }
示例#11
0
        public static void SetToDefault(HandDataSourceSettings settings)
        {
            settings.MinimumDistanceBetweenFingerPoints = 25;
            settings.MinimumDistanceIntersectionPoints = 30;
            settings.MinimumDistanceFingerPointToIntersectionLine = 22;
            settings.MaximumDistanceBetweenIntersectionPoints = 27;

            settings.DetectFingers = true;
            settings.DetectCenterOfPalm = true;
            settings.DetectFingerDirection = false;

            settings.PalmAccuracySearchRadius = 8;
            settings.PalmContourReduction = 8;

            settings.FingerBaseIndexOffset = 10;
            settings.FingerBaseOffsetDistance = 770;

            settings.FramesForNewFingerPoint = 3;
            settings.FramesForDiscontinuedFingerPoint = 2;
        }
示例#12
0
 public FingerBaseDetector(HandDataSourceSettings settings)
 {
     this.indexOffset = settings.FingerBaseIndexOffset;
     this.offsetDistance = settings.FingerBaseOffsetDistance;
 }
示例#13
0
 public FingerBaseDetector(HandDataSourceSettings settings)
 {
     this.indexOffset    = settings.FingerBaseIndexOffset;
     this.offsetDistance = settings.FingerBaseOffsetDistance;
 }
示例#14
0
 public PalmFinder(HandDataSourceSettings settings)
 {
     this.searchRadius = settings.PalmAccuracySearchRadius;
     this.contourReduction = settings.PalmContourReduction;
 }
示例#15
0
 public HandDataFactory(IKinectSensor sensor, IntSize size, ClusterDataSourceSettings clusteringSettings, ShapeDataSourceSettings shapeSettings, HandDataSourceSettings handSettings)
     : this(size, clusteringSettings, shapeSettings, handSettings)
 {
     this.sdkFilter = new ImageFrameDepthPointFilter(sensor, size, this.clusteringSettings.MinimumDepthThreshold, this.clusteringSettings.MaximumDepthThreshold, this.clusteringSettings.LowerBorder);
 }
示例#16
0
 public HandDataFactory(IKinectSensor sensor, IntSize size, ClusterDataSourceSettings clusteringSettings, ShapeDataSourceSettings shapeSettings, HandDataSourceSettings handSettings)
     : this(size, clusteringSettings, shapeSettings, handSettings)
 {
     this.sdkFilter = new ImageFrameDepthPointFilter(sensor, size, this.clusteringSettings.MinimumDepthThreshold, this.clusteringSettings.MaximumDepthThreshold, this.clusteringSettings.LowerBorder);
 }
示例#17
0
 public FingerPointDetector(HandDataSourceSettings settings)
 {
     this.settings = settings;
     this.lineThinner = new LineThinner(this.settings.MinimumDistanceBetweenFingerPoints, true);
 }
示例#18
0
 public PalmFinder(HandDataSourceSettings settings)
 {
     this.searchRadius     = settings.PalmAccuracySearchRadius;
     this.contourReduction = settings.PalmContourReduction;
 }
示例#19
0
 public FingerPointDetector(HandDataSourceSettings settings)
 {
     this.settings    = settings;
     this.lineThinner = new LineThinner(this.settings.MinimumDistanceBetweenFingerPoints, true);
 }
 public FingerPointDetector(HandDataSourceSettings settings)
 {
     this.settings = settings;
 }
示例#21
0
 public FingerPointDetector(HandDataSourceSettings settings)
 {
     this.settings = settings;
 }
示例#22
0
 public static void SetToAccurate(HandDataSourceSettings settings)
 {
     SetToDefault(settings);
     settings.PalmAccuracySearchRadius = 6;
     settings.PalmContourReduction     = 3;
 }