Пример #1
0
 public PostureAnalyzer(FramesCollector framesCollector, int postureFramesDuration = 10)
     : base(framesCollector)
 {
     _postureFramesDuration = postureFramesDuration;
     Epsilon = 0.2f;
     MaxRange = 0.25f;
 }
Пример #2
0
 public MovementAnalyzer(FramesCollector framesCollector, TJointType joint)
     : base(framesCollector)
 {
     _joint = joint;
     MinimalVectorLength = 0.01f;
     MinimalPeriodBetweenGestures = 250;
 }
Пример #3
0
        public HandInFrontAnalyzer(FramesCollector framesCollector)
            : base(framesCollector)
        {
            MinimalPeriodBetweenGestures = Configuration.minimalPeriodBetweenGestures;

            CallsSkipp = Configuration.callsSkipped;
            CallCounter = CallsSkipp;
        }
Пример #4
0
 public SwipeAnalyzer(FramesCollector framesCollector, TJointType jointType)
     : base(framesCollector)
 {
     _joint = jointType;
     SwipeMinimalLength = 0.4f;
     SwipeMaximalHeight = 0.2f;
     SwipeMininalDuration = 250;
     SwipeMaximalDuration = 1500;
 }
Пример #5
0
        public ControlPanelViewModel()
        {
            //var kinectSensor = DependencyFactory.Container.Resolve<KinectSensor>();

            var testKinect = DependencyFactory.Container.Resolve<TKinect.TKinect>();
            var framesCollector = new FramesCollector(testKinect);
            //_algorithmicPostureDetector = new PostureAnalyzer(framesCollector);
            //_algorithmicPostureDetector.PostureDetected += AlgorithmicPostureDetectorOnPostureDetected;
        }
Пример #6
0
        public ParallelSwipeAnalyzer(FramesCollector framesCollector, long epsilon = 1000)
            : base(framesCollector)
        {
            Epsilon = epsilon;

            _leftHandSwipeAnalyzer = new SwipeAnalyzer(framesCollector, TJointType.HandLeft);
            _leftHandSwipeAnalyzer.SwipeDetected += (sender, args) => { _leftHandGestrue = new SwipeGestureWrapper(args.Gesture, DateTime.Now.Ticks); };

            _rightHandSwipeAnalyzer = new SwipeAnalyzer(framesCollector, TJointType.HandRight);
            _rightHandSwipeAnalyzer.SwipeDetected += (sender, args) => { _rightHandGestrue = new SwipeGestureWrapper(args.Gesture, DateTime.Now.Ticks); };
        }
Пример #7
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;
        }
Пример #8
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;
        }
Пример #9
0
        private static void AttachKinect()
        {
            if (_skeletonDisplayManager != null)
            {
                return;
            }

            //var kinectSensor = DependencyFactory.Container.Resolve<KinectSensor>();
            var testKinect = DependencyFactory.Container.Resolve<TKinect.TKinect>();

            var framesCollector = new FramesCollector(testKinect);
            _skeletonDisplayManager = new SkeletonDisplayManager(_kinectCanvas);
            framesCollector.FrameReady += (sender, arg) => _skeletonDisplayManager.Draw(arg.Frames.Last().Skeletons, false);
        }
Пример #10
0
        public ToolboxViewModel()
        {
            _mapDefinition = DependencyFactory.Container.Resolve<IMapDefinition>();

            Cities = new List<string>() {"Record", "Replay"};

            //var kinectSensor = DependencyFactory.Container.Resolve<KinectSensor>();
            var testKinect = DependencyFactory.Container.Resolve<TKinect.TKinect>();
            _framesCollector = new FramesCollector(testKinect);

            //_postureAnalyzer = new PostureAnalyzer(_framesCollector);
            //_postureAnalyzer.PostureDetected += PostureAnalyzerOnPostureDetected;

            //_handSwipeAnalyzer = new SwipeAnalyzer(_framesCollector, JointType.HandRight);
            //_handSwipeAnalyzer.SwipeDetected  += HandSwipeAnalyzerOnSwipeDetected;
        }
Пример #11
0
 public DummyHandAnalyzer(FramesCollector framesCollector)
     : base(framesCollector)
 {
 }
Пример #12
0
        private void RegisterOnKinectEvents()
        {
            //var kinectSensor = DependencyFactory.Container.Resolve<KinectSensor>();
            var testKinect = DependencyFactory.Container.Resolve<TKinect.TKinect>();
            var framesCollector = new FramesCollector(testKinect, 30);

            _postureAnalyzer = new PostureAnalyzer(framesCollector, 25);
            _postureAnalyzer.PostureDetected += PostureAnalyzerOnPostureDetected;

            var stabilityFramesCollector = new FramesCollector(testKinect, 40);

            var HandCollector = new FramesCollector(testKinect, 10);
            var trafficReduceExtension = new TrafficReduceExtension(0);

            _handNavigationAnalyzer = new HandInFrontAnalyzer(HandCollector);
            _handNavigationAnalyzer.AddBeforeAnalyzeExtension(trafficReduceExtension);
            _handNavigationAnalyzer.MovementDetected += MovementAnalyzerOnOnMovementGestureDetected;
        }
Пример #13
0
 protected FramesAnalyzer(FramesCollector framesCollector)
 {
     _analyzeExtensions = new List<IAnalyzeExtension>();
     _framesCollector = framesCollector;
     _framesCollector.FrameReady += FramesCollectorOnFrameReady;
 }
Пример #14
0
 public ContinousMovementAnalyzer(FramesCollector framesCollector, TJointType joint)
     : base(framesCollector, joint)
 {
 }
 public SkeletonStabilityAnalyzeExtension(FramesCollector framesCollector, float threshold = 0.05f)
 {
     _framesCollector = framesCollector;
     Threshold = threshold;
 }