예제 #1
0
 private void buttonHandDataFactory_Click(object sender, EventArgs e)
 {
     var factory = new HandDataFactory(new IntSize(640, 480));
     var handData = factory.Create((this.dataSourceFactory as OpenNIDataSourceFactory).GetDepthGenerator().DataPtr);
     MessageBox.Show(string.Format("{0} hands detected", handData.Count), "Detection Message");
 }
예제 #2
0
        private void buttonHandDataFactory_Click(object sender, EventArgs e)
        {
            var factory = new HandDataFactory(new IntSize(640, 480));
            HandCollection handData;
            if (this.radioButtonOpenNI.Checked)
            {
                handData = factory.Create((this.dataSourceFactory as OpenNIDataSourceFactory).GetDepthGenerator().DataPtr);
            }
            else
            {
                handData = factory.Create((this.dataSourceFactory as SDKDataSourceFactory).Runtime.DepthStream.GetNextFrame(1000));
            }

            MessageBox.Show(string.Format("{0} hands detected", handData.Count), "Detection Message");
        }