public ChangeSkeletonBackgroundColor ( System.Windows.Media.Brush brush ) : void | ||
brush | System.Windows.Media.Brush | |
리턴 | void |
// Event Handler for the Window's Loaded event // (Use to initialize the KinectHelper) private void MainWindow_Loaded(object sender, RoutedEventArgs e) { // Enable the Kinect and data streams manually with default constructor //helper = new KinectHelper(); //helper.UseColorImageStream = true; //helper.UseDepthImageStream = true; //helper.UseSkeletonStream = true; //helper.InitializeKinectSensor(); // Enable the Kinect and all data streams with shorthand constructor helper = new KinectHelper(false, false, true, false, false); // Link the UI Images with the images produced by the Kinect //_colorImage.Source = helper.colorBitmap; //_depthImage.Source = helper.depthBitmap; _skeletonImage.Source = helper.skeletonBitmap; // Listen for data stream change events helper.ColorDataChanged += new KinectHelper.ColorDataChangedEvent(ColorDataChange); helper.DepthDataChanged += new KinectHelper.DepthDataChangedEvent(DepthDataChange); helper.SkeletonDataChanged += new KinectHelper.SkeletonDataChangedEvent(SkeletonDataChange); // Change the background color of the skeleton image helper.ChangeSkeletonBackgroundColor(Brushes.Black); }
// Event Handler for the Window's Loaded event // (Use to initialize the KinectHelper) private void MainWindow_Loaded(object sender, RoutedEventArgs e) { // Enable the Kinect and data streams manually with default constructor //helper = new KinectHelper(); //helper.UseColorImageStream = true; //helper.UseDepthImageStream = true; //helper.UseSkeletonStream = true; //helper.InitializeKinectSensor(); // Enable the Kinect and all data streams with shorthand constructor helper = new KinectHelper(true, true, true); // Link the UI Images with the images produced by the Kinect _colorImage.Source = helper.colorBitmap; _depthImage.Source = helper.depthBitmap; _skeletonImage.Source = helper.skeletonBitmap; // Listen for data stream change events helper.ColorDataChanged += new KinectHelper.ColorDataChangedEvent(ColorDataChange); helper.DepthDataChanged += new KinectHelper.DepthDataChangedEvent(DepthDataChange); helper.SkeletonDataChanged += new KinectHelper.SkeletonDataChangedEvent(SkeletonDataChange); // Change the background color of the skeleton image helper.ChangeSkeletonBackgroundColor(Brushes.Black); }