public HandsRecognition(MainForm form)
 {
     m_images = new Queue<PXCMImage>();
     this.form = form;
     LUT = Enumerable.Repeat((byte)0, 256).ToArray();
     LUT[255] = 1;
 }
Beispiel #2
0
 public FPSTimer(MainForm mf)
 {
     form = mf;
     QueryPerformanceFrequency(out freq);
     fps = 0;
     QueryPerformanceCounter(out last);
 }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            PXCMSession session = null;
            session = PXCMSession.CreateInstance();
            if (session != null)
            {
                // Optional steps to send feedback to Intel Corporation to understand how often each SDK sample is used.
                PXCMMetadata md = session.QueryInstance<PXCMMetadata>();
                if (md != null)
                {
                    string sample_name = "Hands Viewer CS";
                    md.AttachBuffer(1297303632, System.Text.Encoding.Unicode.GetBytes(sample_name));
                }

                MainForm form = new MainForm(session);
                form.MainMenu.Enabled = false;

                //form.Start.Enabled = false;
                //form.Stop.Enabled = true;

                //stop = false;
                System.Threading.Thread thread = new System.Threading.Thread(form.DoRecognition);
                thread.Start();
                System.Threading.Thread.Sleep(5);

                Application.Run(form);

                session.Dispose();
            }
        }