An implementation of Rubine's Linear Classifier, adapted to recognize 3D gestures as per the description by Hoffman & LaViola. Dean Rubine. 1991. Specifying gestures by example. SIGGRAPH Comput. Graph. 25, 4 (July 1991), 329-337. DOI=10.1145/127719.122753 http://doi.acm.org/10.1145/127719.122753 Hoffman, M., Varcholik, P., and LaViola, J. "Breaking the Status Quo: Improving 3D Gesture Recognition with Spatially Convenient Input Devices", Proceedings of IEEE Virtual Reality 2010, 59-66, March 2010
Beispiel #1
0
        /// <summary>
        /// Entry point for setting up and running the experiments.
        /// </summary>
        public void Initialize()
        {
            //load gesture data and report on the number and type of available samples
            dataset = DataLoader.LoadGestureDataFrom(Config.DataPath);

            int training = 0;
            foreach (UserDataSet user_i in dataset)
            {
                training += user_i.TrainingSamples.Count;
            }

            ToTrain = new Dictionary<GestureType, List<GestureSample>>();
            foreach (GestureType gesture in Config.GesturesToUse)
            {
                ToTrain.Add(gesture, new List<GestureSample>());
            }

            foreach (UserDataSet uData in dataset)
            {
                //1-construct/prune the 'ToTrain' collection for training the Classifier

                //add all training samples into the 'ToTrain' collection.
                //sort training samples into classes
                foreach (GestureSample sample in uData.TrainingSamples)
                    if (Config.GesturesToUse.Contains(sample.Gesture))
                        ToTrain[sample.Gesture].Add(sample);
            }
            Recognizer = new LinearClassifier(ToTrain);
        }
Beispiel #2
0
        /// <summary>
        /// Entry point for setting up and running the experiments.
        /// </summary>
        public void RunExperiments()
        {
            //load gesture data and report on the number and type of available samples
            dataset = DataLoader.LoadGestureDataFrom(Config.DataPath);

            int training = 0;
            foreach (UserDataSet user_i in dataset)
            {
                training += user_i.TrainingSamples.Count;
            }

            ToTrain = new Dictionary<GestureType, List<GestureSample>>();
            ToRecognize_Training = new Dictionary<GestureType, List<GestureSample>>();
            foreach (GestureType gesture in Config.GesturesToUse)
            {
                ToTrain.Add(gesture, new List<GestureSample>());
                ToRecognize_Training.Add(gesture, new List<GestureSample>());
            }

            PopulateDataSets();
            Recognizer = new LinearClassifier(ToTrain);

            Run();
            Console.WriteLine();
        }