Esempio n. 1
0
        public static string VeryFy(Bitmap pic)
        {
            OCR2   ocr = new OCR2(pic);
            string s   = ocr.OCRPic();

            if (s == "")
            {
                s = " ";
            }
            return(s);
        }
Esempio n. 2
0
 public static void GenData(string path)
 {
     string[] files = Directory.GetFiles(path, "*.bmp");
     for (int i = 0; i < files.Length;i++ )
     {
         string file = files[i];
         string c = GetFileName(file);
         Bitmap bp = (Bitmap)Bitmap.FromFile(file);
         OCR2 ocr = new OCR2(bp);
         ocr.GetDataPic();
         dataChar[i] = (byte)c[0];
         for (int j = 0; j < bp.Height; j++)
         {
             dataP[i, j] = ocr.datapic[j];
         }
         dataNum++;
     }
     //WriteToFile();
 }
Esempio n. 3
0
 public static void GenData(string path)
 {
     string[] files = Directory.GetFiles(path, "*.bmp");
     for (int i = 0; i < files.Length; i++)
     {
         string file = files[i];
         string c    = GetFileName(file);
         Bitmap bp   = (Bitmap)Bitmap.FromFile(file);
         OCR2   ocr  = new OCR2(bp);
         ocr.GetDataPic();
         dataChar[i] = (byte)c[0];
         for (int j = 0; j < bp.Height; j++)
         {
             dataP[i, j] = ocr.datapic[j];
         }
         dataNum++;
     }
     //WriteToFile();
 }
Esempio n. 4
0
 public static string VeryFy(Bitmap pic)
 {
     OCR2 ocr = new OCR2(pic);
     string s = ocr.OCRPic();
     if (s == "")
     {
         s = " ";
     }
     return s;
 }