8,834
社区成员
发帖
与我相关
我的任务
分享
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
//PictureBox控件显示图片
pictureBox1.Load(openFileDialog1.FileName);
//识别图片文字
var img = new Bitmap(openFileDialog1.FileName);
var ocr = new TesseractEngine("./tessdata", "eng", EngineMode.TesseractAndCube);
var page = ocr.Process(img);
label1.Text = page.GetText();
}