Beispiel #1
0
        public FramesCollector(TKinect.TKinect kinect, int framesCount = 20)
        {
            _framesCount = framesCount;
            _frames = new LinkedList<Frame>();

            kinect.SkeletonFrameReady += OnSkeletonImageFrameReady;
        }
Beispiel #2
0
        public FramesCollector(TKinect.TKinect kinect, int framesCount = 20)
        {
            _framesCount = framesCount;
            _frames      = new LinkedList <Frame>();


            kinect.SkeletonFrameReady += OnSkeletonImageFrameReady;
        }
Beispiel #3
0
        public void Setup()
        {
            Configuration.postureNavigation = true;
            SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());

            Kinect = new TKinect.TKinect();
            var framesCollector = new FramesCollector(Kinect, 30);

            PostureAnalyzer = new PostureAnalyzer(framesCollector, 25);
            PostureAnalyzer.PostureDetected += PostureAnalyzerOnPostureDetected;
        }
        public void Setup()
        {
            Configuration.postureNavigation = true;
            SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());

            Kinect = new TKinect.TKinect();
            var framesCollector = new FramesCollector(Kinect, 30);

            PostureAnalyzer = new PostureAnalyzer(framesCollector, 25);
            PostureAnalyzer.PostureDetected += PostureAnalyzerOnPostureDetected;
        }
Beispiel #5
0
        public HelloKinect()
        {
            //Initialize TKinect
            TKinect = new TKinect.TKinect();

            //Initialize KinectToolBox frame collector
            SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
            var framesCollector = new FramesCollector(TKinect, 30);

            //Create and use one of analyzers
            PostureAnalyzer = new PostureAnalyzer(framesCollector, 25);
            Configuration.postureNavigation = true;
            PostureAnalyzer.PostureDetected += PostureAnalyzerOnPostureDetected;
        }
Beispiel #6
0
        public HelloKinect()
        {
            //Initialize TKinect
            TKinect = new TKinect.TKinect();

            //Initialize KinectToolBox frame collector
            SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
            var framesCollector = new FramesCollector(TKinect, 30);

            //Create and use one of analyzers
            PostureAnalyzer = new PostureAnalyzer(framesCollector, 25);
            Configuration.postureNavigation  = true;
            PostureAnalyzer.PostureDetected += PostureAnalyzerOnPostureDetected;
        }
Beispiel #7
0
        private static void InitializeKinect()
        {
            int index = 0;

            KinectSensor kinectSensor = null;
            var          testKinect   = new TKinect.TKinect();

            DependencyFactory.Container.RegisterInstance(testKinect);

            while (kinectSensor == null && index < KinectSensor.KinectSensors.Count)
            {
                try
                {
                    kinectSensor = KinectSensor.KinectSensors[index];

                    kinectSensor.Start();
                }
                catch (Exception)
                {
                    kinectSensor = null;
                }

                index++;
            }
            if (kinectSensor != null)
            {
                kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
                {
                    Smoothing          = 0.5f,
                    Correction         = 0.5f,
                    Prediction         = 0.5f,
                    JitterRadius       = 0.05f,
                    MaxDeviationRadius = 0.04f
                });
                kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
                kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution320x240Fps30);


                kinectSensor.SkeletonFrameReady += testKinect.SensorSkeletonFrameHandler;
                kinectSensor.ColorFrameReady    += testKinect.SensorColorFrameHandler;
                kinectSensor.DepthFrameReady    += testKinect.SensorDepthFrameHandler;

                DependencyFactory.Container.RegisterInstance(kinectSensor);
                DependencyFactory.Container.RegisterInstance(testKinect);
            }
        }
Beispiel #8
0
        private static void InitializeKinect()
        {
            int index = 0;

            KinectSensor kinectSensor = null;
            var testKinect = new TKinect.TKinect();
            DependencyFactory.Container.RegisterInstance(testKinect);

            while (kinectSensor == null && index < KinectSensor.KinectSensors.Count)
            {
                try
                {
                    kinectSensor = KinectSensor.KinectSensors[index];

                    kinectSensor.Start();
                }
                catch (Exception)
                {
                    kinectSensor = null;
                }

                index++;
            }
            if (kinectSensor != null)
            {
                kinectSensor.SkeletonStream.Enable(new TransformSmoothParameters
                {
                    Smoothing = 0.5f,
                    Correction = 0.5f,
                    Prediction = 0.5f,
                    JitterRadius = 0.05f,
                    MaxDeviationRadius = 0.04f
                });
                kinectSensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);
                kinectSensor.DepthStream.Enable(DepthImageFormat.Resolution320x240Fps30);

                kinectSensor.SkeletonFrameReady += testKinect.SensorSkeletonFrameHandler;
                kinectSensor.ColorFrameReady += testKinect.SensorColorFrameHandler;
                kinectSensor.DepthFrameReady += testKinect.SensorDepthFrameHandler;

                DependencyFactory.Container.RegisterInstance(kinectSensor);
                DependencyFactory.Container.RegisterInstance(testKinect);
            }
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            var tkinect = new TKinect.TKinect();
            tkinect.SkeletonFrameHost.Start(4503);

            Application application = Application.Launch(@"..\..\..\HelloKinectWPF\bin\Debug\HelloKinectWPF.exe");
            Window window = application.GetWindow("Hello Kinect", InitializeOption.NoCache);
            window.WaitWhileBusy();

            var label = window.Get<TestStack.White.UIItems.Label>(SearchCriteria.ByAutomationId("Label"));

            var fileStream = new FileStream(RecordingPath, FileMode.Open);
            tkinect.ReplayStart(fileStream);
            Thread.Sleep(18000);

            var label2 = window.Get<TestStack.White.UIItems.Label>(SearchCriteria.ByAutomationId("Label"));

            application.Close();
            fileStream.Close();
        }
Beispiel #10
0
        public static void InitKinectClient()
        {
            TKinect = new TKinect.TKinect();

            //COLOR
            ColorDisplayHelper.Init();
            TKinect.ColorFrameReady += ColorDisplayHelper.SensorColorFrameReady;

            //DEPTH
            DepthDisplayHelper.Init();
            TKinect.DepthFrameReady += DepthDisplayHelper.SensorDepthFrameReady;

            //SKELETON
            SkeletonDisplayHelper.Init();
            TKinect.SkeletonFrameReady += SkeletonDisplayHelper.SensorSkeletonFrameReady;

            //CLINET
            TKinect.ColorFrameClient.Connect("localhost",4501);
            TKinect.DepthFrameClient.Connect("localhost", 4502);
            TKinect.SkeletonFrameClient.Connect("localhost", 4503);
        }
Beispiel #11
0
        public static void InitKinectClient()
        {
            TKinect = new TKinect.TKinect();

            //COLOR
            ColorDisplayHelper.Init();
            TKinect.ColorFrameReady += ColorDisplayHelper.SensorColorFrameReady;

            //DEPTH
            DepthDisplayHelper.Init();
            TKinect.DepthFrameReady += DepthDisplayHelper.SensorDepthFrameReady;

            //SKELETON
            SkeletonDisplayHelper.Init();
            TKinect.SkeletonFrameReady += SkeletonDisplayHelper.SensorSkeletonFrameReady;

            //CLINET
            TKinect.ColorFrameClient.Connect("localhost", 4501);
            TKinect.DepthFrameClient.Connect("localhost", 4502);
            TKinect.SkeletonFrameClient.Connect("localhost", 4503);
        }
Beispiel #12
0
        public static void InitKinectHost()
        {
            //Initialize TKinect
            TKinect = new TKinect.TKinect();

            //COLOR
            ColorDisplayHelper.Init();
            TKinect.ColorFrameReady += ColorDisplayHelper.SensorColorFrameReady;

            //DEPTH
            DepthDisplayHelper.Init();
            TKinect.DepthFrameReady += DepthDisplayHelper.SensorDepthFrameReady;

            //SKELETON
            SkeletonDisplayHelper.Init();
            TKinect.SkeletonFrameReady += SkeletonDisplayHelper.SensorSkeletonFrameReady;

            //HOST
            TKinect.ColorFrameHost.Start(4501);
            TKinect.DepthFrameHost.Start(4502);
            TKinect.SkeletonFrameHost.Start(4503);
        }
Beispiel #13
0
        public static void InitKinectHost()
        {
            //Initialize TKinect
            TKinect = new TKinect.TKinect();

            //COLOR
            ColorDisplayHelper.Init();
            TKinect.ColorFrameReady += ColorDisplayHelper.SensorColorFrameReady;

            //DEPTH
            DepthDisplayHelper.Init();
            TKinect.DepthFrameReady += DepthDisplayHelper.SensorDepthFrameReady;

            //SKELETON
            SkeletonDisplayHelper.Init();
            TKinect.SkeletonFrameReady += SkeletonDisplayHelper.SensorSkeletonFrameReady;

            //HOST
            TKinect.ColorFrameHost.Start(4501);
            TKinect.DepthFrameHost.Start(4502);
            TKinect.SkeletonFrameHost.Start(4503);
        }
Beispiel #14
0
        static void Main(string[] args)
        {
            var tkinect = new TKinect.TKinect();

            tkinect.SkeletonFrameHost.Start(4503);

            Application application = Application.Launch(@"..\..\..\HelloKinectWPF\bin\Debug\HelloKinectWPF.exe");
            Window      window      = application.GetWindow("Hello Kinect", InitializeOption.NoCache);

            window.WaitWhileBusy();

            var label = window.Get <TestStack.White.UIItems.Label>(SearchCriteria.ByAutomationId("Label"));


            var fileStream = new FileStream(RecordingPath, FileMode.Open);

            tkinect.ReplayStart(fileStream);
            Thread.Sleep(18000);

            var label2 = window.Get <TestStack.White.UIItems.Label>(SearchCriteria.ByAutomationId("Label"));

            application.Close();
            fileStream.Close();
        }
Beispiel #15
0
 public void Setup()
 {
     Kinect = new TKinect.TKinect();
     Kinect.SkeletonFrameHost.Start(4503);
 }
Beispiel #16
0
 public void Setup()
 {
     Kinect = new TKinect.TKinect();
     Kinect.SkeletonFrameHost.Start(4503);
 }