Inheritance: System.EventArgs
コード例 #1
0
 private void OnFrameUpdated(ushort[] pixels, int width, int height)
 {
     if (FrameUpdated == null)
         return;
     var args = new FrameUpdatedEventArgs(pixels, width, height, HandSessions.Values.AsEnumerable<HandSession>());
     FrameUpdated(null, args);
 }
コード例 #2
0
 private void OnFrameUpdated(FrameUpdatedEventArgs e)
 {
     if (FrameUpdated == null)
         return;
     FrameUpdated(this, e);
 }
コード例 #3
0
 void MotionTrackingClient_FrameUpdated(object sender, FrameUpdatedEventArgs e)
 {
     Frame = e.Frame;
     Factory = _motionTrackingClient.Factory;
 }
コード例 #4
0
        internal void SourceFrameUpdated(FrameUpdatedEventArgs e)
        {
            Image sourceImage = null;

            try
            {
            #if DEBUG
                CountFrames();
            #endif
                if (ProcessDepthImage)
                {
                    var frame = e.Frame;

                    sourceImage = e.Frame.ToDirectCanvasImage(imageProcessor.Factory);
                }

                ushort max = e.Frame.DepthPixels.AsParallel().Max();
                ushort min = e.Frame.DepthPixels.AsParallel()   .Where(v => v > 100).Min();
                imageProcessor.ProcessDepthSessions(sourceImage, deviceDictionary, max, min);

                OnFrameUpdated(e);
            }
            catch (AccessViolationException)
            {
                Trace.WriteLine("AccessViolationException - maybe during shutdown?");
                if (Application.Current == null)
                {
                    Trace.WriteLine("Application.Current == null");
                }
            }
        }
コード例 #5
0
ファイル: MotionTracking.cs プロジェクト: InfoStrat/MotionFx
 private static void HandPointGenerator_FrameUpdated(object sender, FrameUpdatedEventArgs e)
 {
     List<MotionTrackingClient> clientsCopy = new List<MotionTrackingClient>();
     lock (clients)
     {
         clientsCopy.AddRange(clients);
     }
     foreach (var client in clientsCopy)
     {
         client.SourceFrameUpdated(e);
     }
 }