Beispiel #1
0
        public void TestResizingRecognition()
        {
            testName = "ResizingRecognition";
            MachineLearning.Machine machine = new MachineLearning.Machine();
            var letters = machine.ProcessBook(new List <string> {
                DATA.standardTestFile
            }, MachineLearning.RecognitionModel.Resizing);

            Console.Write(letters.Aggregate("", (t, c) => t + c));
            TEST(true, "");
        }
Beispiel #2
0
        private void ClassicalRoutine()
        {
            MachineLearning.Machine machine = new MachineLearning.Machine();
            var letters = machine.ParseToLettersImages(Path.Combine(DATA.testFolder, @"Bez nazwy.png"));

            // Last line still catches 2 spaces
            if (letters.Count() != 21 + 20 + 22 + 18 + 8)
            {
                Console.WriteLine("TEST_Routine: Failed, received images: {0}, expected: {1}", letters.Count(), (21 + 20 + 22 + 18 + 8));
            }
            else
            {
                Log("TEST_Routine: Passed");
            }
        }