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");
        }
Ejemplo n.º 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");
        }