void InternalInitialize(Action initializeCallback) { modelBuilder = new SvmModelBuilder(); this.featureVector = new List<double[]>(); // init omp this.imgFeature = new ImageFeature(GestureStudio.GestureLib_DictionartyPath); // update GestureInfo.data if (this.problemFile == null || this.problemFile.Equals(GestureStudio.FeatureFileEmpty)) Gestures.loadData(GestureStudio.GesturesDataPathEmpty); else if (this.problemFile.Equals(GestureStudio.FeatureFileNew)) Gestures.loadData(GestureStudio.GesturesDataPathNew); else // demo version, this will take a long time. So avoid this in the demo. Gestures.loadData(GestureStudio.GesturesDataPathDemo); // done initialization if (initializeCallback != null) { initializeCallback(); } // display trainer form SynchronizationContext ctx = SynchronizationContext.Current; GestureStudio.DisplayTrainerForm(() => { // count down finished, begin this.initialized = true; }); }
void InternalInitialize(Action initializeCallback) { // init svm this.LoadModel(); // init omp this.imgFeature = new ImageFeature(GestureStudio.GestureLib_DictionartyPath); this.initialized = true; this.hasUpdates = false; if (initializeCallback != null) { initializeCallback(); } }
void InternalInitialize(Action initializeCallback) { modelBuilder = new SvmModelBuilder(); this.featureVector = new List <double[]>(); // init omp this.imgFeature = new ImageFeature(GestureStudio.GestureLib_DictionartyPath); // update GestureInfo.data if (this.problemFile == null || this.problemFile.Equals(GestureStudio.FeatureFileEmpty)) { Gestures.loadData(GestureStudio.GesturesDataPathEmpty); } else if (this.problemFile.Equals(GestureStudio.FeatureFileNew)) { Gestures.loadData(GestureStudio.GesturesDataPathNew); } else // demo version, this will take a long time. So avoid this in the demo. { Gestures.loadData(GestureStudio.GesturesDataPathDemo); } // done initialization if (initializeCallback != null) { initializeCallback(); } // display trainer form SynchronizationContext ctx = SynchronizationContext.Current; GestureStudio.DisplayTrainerForm(() => { // count down finished, begin this.initialized = true; }); }