【发布时间】:2016-07-28 07:44:09
【问题描述】:
我正在使用一个 Windows 应用程序 tesseract,长话短说,这是一个通过命令运行的 OCR 应用程序。
安装应用程序后,我使用命令进行测试并使用此行正常工作:
tesseract text.png out
它实际上获取图像并输出到文本文件 out.txt
我什至更改了目录,并且可以从任何地方访问。
现在问题来了,当我使用php时,我使用的代码如下:
echo exec("tesseract text.png out 2>&1", $output);
var_dump($output);
这次不是获取文件,而是说无法识别 tesseract!
这是输出:
operable program or batch file.
C:\wamp64\www\prestashop\ocr\ocr.php:12:
array (size=4)
0 => string '' (length=0)
1 => string 'C:\wamp64\www\prestashop\ocr>tesseract text.png out' (length=51)
2 => string ''tesseract' is not recognized as an internal or external command,' (length=65)
3 => string 'operable program or batch file.' (length=31)
谁能帮帮我!?
谢谢
【问题讨论】: