Ejemplo n.º 1
0
 private void RefreshDepthFrame()
 {
     using (var depthFrameSource = new DepthFramePointerDataSource(this.CurrentFrame.Frame))
     {
         this.clusterDataSource = new OpenNIClusterDataSource(depthFrameSource, this.clusterDataSourceSettings);
         this.shapeDataSource   = new ClusterShapeDataSource(this.clusterDataSource, this.shapeDataSourceSettings);
         this.handDataSource    = new HandDataSource(this.shapeDataSource, this.handDataSourceSettings);
         this.ToggleLayers();
         this.ImageSource = new DepthImageDataSource(depthFrameSource);
         depthFrameSource.Push();
     }
 }
Ejemplo n.º 2
0
        private void RunTest(string framePath, Action <HandCollection> assertions)
        {
            var frameSize = new IntSize(640, 480);
            var frame     = new DepthDataFrameRepository(frameSize).Load(framePath);

            using (var frameDataSource = new DepthFramePointerDataSource(frame))
            {
                var src = new HandDataSource(new ClusterShapeDataSource(new OpenNIClusterDataSource(frameDataSource, new ClusterDataSourceSettings())));
                frameDataSource.Push();

                assertions(src.CurrentValue);
            }
        }
 public void Setup()
 {
     this.depthDataFrame         = new DepthDataFrame(20, 10);
     this.depthDataFrame.Data[1] = 1;
     this.dataSource             = new DepthFramePointerDataSource(this.depthDataFrame);
 }