public GestureProcessor(IKinect kinectHandler, KinectData kinect) { _pointer = new ObjectPointer(); Log.Debug("objectPointer loaded"); _pointer.SetObjects(FileLoader.LoadObj("livingRoom.obj", FileLoader.Units.cm)); Log.Debug("objects loaded"); _kinectHandler = kinectHandler; _kinect = kinect; _seqCoords = new ArrayList(); if (kinect != null) { kinect.attachSkeletonHandler(SkeletonDataReadyHandler); } _dtw = new DtwGestureRecognizer(12, 0.6, 2, 2, 10); Skeleton2DDataExtract.Skeleton2DdataCoordReady += NuiSkeleton2DdataCoordReady; _pointer.ContextSelected += PointerContextSelected; }
private void LoadUsers() { var userData = FileLoader.LoadAllUsers(); if (userData == null) { return; } foreach (var userInfo in userData) { var user = new User { Name = userInfo.Key, TrackingID = -1, IsActive = false }; if (userInfo.Value != null) { foreach (var feature in userInfo.Value) { if (feature.Key.Equals(FeatureType.ArmLength)) { user.ArmLength = float.Parse(feature.Value); } else if (feature.Key.Equals(FeatureType.HipHeadHeight)) { user.HipHeight = float.Parse(feature.Value); } else if (feature.Key.Equals(FeatureType.ShoulderWidth)) { user.ShoulderWidth = float.Parse(feature.Value); } } } _users.Add(user); } }
public void DelUser(string user) { FileLoader.RemoveUser(user); }
private void StoreFeatures(Dictionary <FeatureType, String> features) { FileLoader.StoreUserData(features); }
public BodyFeatureDetector() { _users = FileLoader.LoadAllUsers(); }
public string[] LoadGestures() { return(FileLoader.LoadGestures(_dtw)); }