Esempio n. 1
0
        private string ocrIMG(string imgf, OneNoteOCR eng)
        {
            string rs   = "";
            var    text = eng.RecognizeImage(imgf);

            if (text != null)
            {
                rs = text;
            }
            return(rs);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var ocr = new OneNoteOCR();

            try
            {
                ocr.Verify();
            }
            catch (Exception)
            {
                Console.WriteLine("you do not have OneNote 15 ");
                return;
            }
            if (args.Length == 0)
            {
                Console.WriteLine("please add argument = path to the image file");
                return;
            }
            var ocrText = ocr.RecognizeImage(args[0]);

            Console.WriteLine(ocrText);
        }