void kinectRuntime_ColorFrameReady(object sender, ColorImageFrameReadyEventArgs e) { if (replay != null && !replay.IsFinished) { return; } using (var frame = e.OpenColorImageFrame()) { if (frame == null) { return; } if (recorder != null && ((recorder.Options & KinectRecordOptions.Color) != 0)) { recorder.Record(frame); } if (displayDepth) { return; } colorManager.Update(frame); } }
void ProcessColorFrame(ColorImageFrame frame) { if (colorManager != null) { colorManager.Update(frame); } }
void replay_ColorImageFrameReady(object sender, ReplayColorImageFrameReadyEventArgs e) { //if (displayDepth) //return; colorManager.Update(e.ColorImageFrame); ProcessFrame2(e.ColorImageFrame); //Debug.WriteLine("replayColor"); }
void kinectRuntime_ColorFrameReady(object sender, ColorImageFrameReadyEventArgs e) { using (var frame = e.OpenColorImageFrame()) { if (frame == null) { return; } if (displayDepth) { return; } colorManager.Update(frame); } }
/// <summary> /// RGBカメラの更新通知 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void kinect_ColorFrameReady(object sender, ColorImageFrameReadyEventArgs e) { try { // RGBカメラのフレームデータを取得する using (ColorImageFrame colorFrame = e.OpenColorImageFrame()) { if (colorFrame != null) { colorManager.Update(colorFrame); imageRgb.Source = colorManager.Bitmap; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void kinectRuntime_AllFrameReady(object sender, AllFramesReadyEventArgs e) { // If replaying, bypass this. if (replay != null && !replay.IsFinished) { return; } using (var cf = e.OpenColorImageFrame()) using (var df = e.OpenDepthImageFrame()) using (var sf = e.OpenSkeletonFrame()) { try { if (recorder != null && sf != null && df != null && cf != null) { recorder.Record(sf, df, cf); } } catch (ObjectDisposedException) { } if (cf != null) { colorManager.Update(cf, !displayDebug); } if (df != null) { depthFrameNumber = df.FrameNumber; depthManager.Update(df); } if (sf != null) { UpdateSkeletonDisplay(sf); if (handTracker != null && recogEngine != null) { var result = handTracker.Update(depthManager.PixelData, colorManager.PixelData, SkeletonUtil.FirstTrackedSkeleton(sf.GetSkeletons())); var gesture = recogEngine.Update(result); lock (inputServer) inputServer.Send(gesture); UpdateDisplay(result); textGestureEvent.Text = gesture; fpsCounter.LogFPS(); } } } }
void kinectRuntime_ColorFrameReady(object sender, ImageFrameReadyEventArgs e) { // カメラ画像の描画 ColorImage.Source = colorStreamManager.Update(e); }
private void RuntimeVideoFrameReady(object sender, ImageFrameReadyEventArgs e) { //透過ColorStreamManager.Update()方法,直接傳入ImageFrameReadyEventArgs,取得BitmapSource imgVideoFrame.Source = _colorStreamManager.Update(e); }
void kinectRuntime_VideoFrameReady(object sender, ImageFrameReadyEventArgs e) { kinectDisplay.Source = streamManager.Update(e); }
void ReplayColorImageFrameReady(object sender, ReplayColorImageFrameReadyEventArgs e) { colorManager.Update(e.ColorImageFrame); }