【发布时间】:2016-04-28 14:19:48
【问题描述】:
我使用 tesseract 从验证码图像中获取文本。 我用这个代码
Process p = new Process();
p.StartInfo.FileName = Server.MapPath("~/app/tesseract.exe");
p.StartInfo.Arguments = imgSavePath + " " + txtSavePath;
p.Start();
p.WaitForExit();
bool exist = File.Exists(txtSavePath);
txtSavePath 是在 windows 资源管理器中创建的,我可以打开它并阅读其中的文本。但是 exist 变量是 false。太奇怪了。 谁能告诉我为什么?如何使用 StreamReader 读取创建文件中的文本?
【问题讨论】: