コード例 #1
0
        public static void SetToDefault(ShapeDataSourceSettings settings)
        {
            settings.MaximumRetraceSteps = 128;

            settings.ContourLineThinningDistance = 5f;
            settings.MinimalPointsInContour      = 50;
        }
コード例 #2
0
ファイル: SettingsForm.cs プロジェクト: an83/KinectTouch2
 public SettingsForm(ClusterDataSourceSettings clusterSettings, ShapeDataSourceSettings shapeDataSourceSettings, HandDataSourceSettings handDetectionSettings)
     : this()
 {
     this.propertyGridClustering.SelectedObject = clusterSettings;
     this.propertyGridShape.SelectedObject = shapeDataSourceSettings;
     this.propertyGridHandDetection.SelectedObject = handDetectionSettings;
 }
コード例 #3
0
 public ClusterShapeDataSource(IClusterDataSource clusterDataSource, ShapeDataSourceSettings settings)
     : base(clusterDataSource)
 {
     this.factory      = new ClusterShapeFactory(settings);
     this.size         = clusterDataSource.Size;
     this.CurrentValue = new ShapeCollection();
 }
コード例 #4
0
        public static void SetToDefault(ShapeDataSourceSettings settings)
        {
            settings.MaximumRetraceSteps = 128;

            settings.ContourLineThinningDistance = 5f;
            settings.MinimalPointsInContour = 50;
        }
コード例 #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
ファイル: HandDataFactory.cs プロジェクト: an83/KinectTouch2
        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 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();
        }
コード例 #8
0
 public IShapeDataSource CreateShapeDataSource(ClusterDataSourceSettings clusterDataSourceSettings, ShapeDataSourceSettings shapeDataSourceSettings)
 {
     return new ClusterShapeDataSource(this.CreateClusterDataSource(clusterDataSourceSettings), shapeDataSourceSettings);
 }
コード例 #9
0
 public IShapeDataSource CreateShapeDataSource(IClusterDataSource clusterdataSource, ShapeDataSourceSettings shapeDataSourceSettings)
 {
     return new ClusterShapeDataSource(clusterdataSource, shapeDataSourceSettings);
 }
コード例 #10
0
 public ClusterShapeFactory(ShapeDataSourceSettings settings)
 {
     this.settings       = settings;
     this.contourFactory = new ContourFactory(settings.ContourLineThinningDistance);
 }
コード例 #11
0
 public ClusterShapeFactory(ShapeDataSourceSettings settings)
 {
     this.settings = settings;
     this.contourFactory = new ContourFactory(settings.ContourLineThinningDistance, settings.MaximumRetraceSteps);
 }
コード例 #12
0
ファイル: HandDataFactory.cs プロジェクト: an83/KinectTouch2
 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);
 }