示例#1
0
        public HandInFrontAnalyzer(FramesCollector framesCollector) : base(framesCollector)
        {
            MinimalPeriodBetweenGestures = Configuration.minimalPeriodBetweenGestures;

            CallsSkipp  = Configuration.callsSkipped;
            CallCounter = CallsSkipp;
        }
示例#2
0
 public SwipeAnalyzer(FramesCollector framesCollector, TJointType jointType) : base(framesCollector)
 {
     _joint               = jointType;
     SwipeMinimalLength   = 0.4f;
     SwipeMaximalHeight   = 0.2f;
     SwipeMininalDuration = 250;
     SwipeMaximalDuration = 1500;
 }
示例#3
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;
        }
示例#4
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); };
        }
示例#5
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;
        }
示例#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;
        }
示例#7
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);
        }
示例#8
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;
        }
示例#9
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;
        }
示例#10
0
 public DummyHandAnalyzer(FramesCollector framesCollector)
     : base(framesCollector)
 {
 }
示例#11
0
 public MovementAnalyzer(FramesCollector framesCollector, TJointType joint) : base(framesCollector)
 {
     _joint = joint;
     MinimalVectorLength          = 0.01f;
     MinimalPeriodBetweenGestures = 250;
 }
示例#12
0
 public ContinousMovementAnalyzer(FramesCollector framesCollector, TJointType joint) : base(framesCollector, joint)
 {
 }
示例#13
0
 public PostureAnalyzer(FramesCollector framesCollector, int postureFramesDuration = 10) : base(framesCollector)
 {
     _postureFramesDuration = postureFramesDuration;
     Epsilon  = 0.2f;
     MaxRange = 0.25f;
 }
示例#14
0
 protected FramesAnalyzer(FramesCollector framesCollector)
 {
     _analyzeExtensions           = new List <IAnalyzeExtension>();
     _framesCollector             = framesCollector;
     _framesCollector.FrameReady += FramesCollectorOnFrameReady;
 }
 public SkeletonStabilityAnalyzeExtension(FramesCollector framesCollector, float threshold = 0.05f)
 {
     _framesCollector = framesCollector;
     Threshold        = threshold;
 }