public void SetupCoreBitExact() { if (core != null) { core.Dispose(); } string path = @"C:\Users\Daniel\Desktop\iPhone Photos\"; string[] pathes = Directory.GetFiles(path, "*.jpg", SearchOption.AllDirectories); bool[] feat = new bool[4]; feat[(int)Feature.BIT_EXACT] = true; Task task = new Task(pathes.ToList(), feat); core = new FeaturesLayer(ref task); }
public void TestAllFeatures() { string path = @"C:\Users\Daniel\Desktop\BitExact Pictures\"; string[] pathes = Directory.GetFiles(path, "*.jpg", SearchOption.AllDirectories); bool[] feat = new bool[4]; feat[(int)Feature.BAD_CONTRAST] = true; feat[(int)Feature.BIT_EXACT] = true; Task task = new Task(pathes.ToList(), feat); FeaturesLayer core = new FeaturesLayer(ref task); core.loadImages(); while (core.LoadingImagesStatus < 100) { Thread.Sleep(300); Debug.WriteLine("li: {0}", core.LoadingImagesStatus); } core.run(); while (core.RunStatus < 100) { Thread.Sleep(300); Debug.WriteLine("run: {0}", core.RunStatus); } }
public void TestLoadingImages() { string path = @"C:\Users\Daniel\Desktop\iPhone Photos\"; string[] pathes = Directory.GetFiles(path, "*.jpg", SearchOption.AllDirectories); bool[] feat = new bool[4]; Task task = new Task(pathes.ToList(), feat); FeaturesLayer core = new FeaturesLayer(ref task); Thread t = new Thread(core.loadImages); t.Start(); while (core.LoadingImagesStatus < 100) { Debug.WriteLine("{0}", core.LoadingImagesStatus); Thread.Sleep(100); } Debug.WriteLine("{0}", core.LoadingImagesStatus); Assert.IsTrue(100 == core.LoadingImagesStatus); //Thread.Sleep(10000); }