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 BodyFeatureDetector() { _users = FileLoader.LoadAllUsers(); }