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