public MainWindow() { InitializeComponent(); KinectSensor k = KinectManager.GetFirstOrDefaultConnectedKinectSensor(); if(k==null) { MessageBox.Show("No Kinects"); Environment.Exit(0); } m_k = new KinectLib.Kinect(k, true); //AzureStorage az = new AzureStorage(m_k); //KinectAudioRecorder rec = new KinectAudioRecorder(k, @"C:\Users\cmcginty\Desktop\kinect\" + Guid.NewGuid().ToString() + ".wav", 10); //rec.NewAudioRecordingDone += new KinectAudioRecorder.AudioRecordingDone(rec_NewAudioRecordingDone); //SkeletalViewModel viewModel = new SkeletalViewModel(m_k); //ImageFrameViewModel imageviewmodel = new ImageFrameViewModel(m_k); ProcessedPlayerDepthFrameViewModel processdepth = new ProcessedPlayerDepthFrameViewModel(m_k); //SpeechTextViewModel speech = new SpeechTextViewModel(m_k); //this.speech.DataContext = speech; this.PlayerDepth.DataContext = processdepth; //this.Video.DataContext = imageviewmodel; //this.Skeletal.DataContext = viewModel; //KinectLib.BitmapGenerator b = new KinectLib.BitmapGenerator(k); //FacialRecognition f = new FacialRecognition(b); //this.facialCanvas.Children.Add(f); ////KinectLib.AzureStorage azure = new KinectLib.AzureStorage(k); //StorageOptions so = new StorageOptions //{ // ColorMax = 40, // SkeltonMax = 40, // DepthMax = 40, // StoreColor = true, // StoreSkeleton = true, // StoreDepth = true //}; //MemoryStorage ms = new MemoryStorage(k, so); // // bool val1 =k.AimCameraDown(); // System.Threading.Thread.Sleep(1000); // bool val2 =k.AimCameraDown(); //System.Threading.Thread.Sleep(1000); // bool val3 = k.AimCameraDown(); }
public SkeletalViewModel(KinectLib.Kinect kinect) { m_kinect = kinect; m_kinect.NewSkeletonFrame += new KinectLib.Kinect.SkeletonFrameReadyDelegate(m_kinect_NewSkeletonFrame); }
public SpeechTextViewModel(KinectLib.Kinect kinect) { m_kinect = kinect; m_kinect.NewSpeechRecognizedResult += new KinectLib.Kinect.NewSpeechRecognizedResultDelegate(m_kinect_NewSpeechRecognizedResult); }