示例#1
0
        public static string VeryFy(Bitmap pic)
        {
            OCR2   ocr = new OCR2(pic);
            string s   = ocr.OCRPic();

            if (s == "")
            {
                s = " ";
            }
            return(s);
        }
示例#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();
 }
示例#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();
 }
示例#4
0
 public static string VeryFy(Bitmap pic)
 {
     OCR2 ocr = new OCR2(pic);
     string s = ocr.OCRPic();
     if (s == "")
     {
         s = " ";
     }
     return s;
 }