I want to convert a large number of image files to text using Tesseract.
I looked through their documentation, but I don’t know how this relates to PHP and how my php script will interact with tesseract ocr. I have seen on other issues that suggest php exec () might be like this.
$img = myimage.png;
$text = exec($img,'tesseract');
I downloaded and installed tesseract. Using Windows 7 with xampp installed. I have a newbie for intermediate php knowledge. What knowledge do I lack?
Update Now I have work with powershell and cmd with
tesseract.exe D:\Documents\Web_Development\Sandbox\php\images\23.png D:\Documents\Web_Development\Sandbox\php\images\23
But when I try to run it through exec as follows:
<?php
exec('tesseract.exe D:\Documents\Web_Development\Sandbox\images\23.png D:\Documents\Web_Development\Sandbox\images\23');
?>
I get a popup from windows that says tesseract.exe stops working. here is the error information if they mean anything to anyone.
Problem signature:
Problem Event Name: BEX
Application Name: tesseract.exe
Application Version: 0.0.0.0
Application Timestamp: 4ca507b3
Fault Module Name: MSVCR90.dll
Fault Module Version: 9.0.30729.4926
Fault Module Timestamp: 4a1743c1
Exception Offset: 0002f93e
Exception Code: c0000417
Exception Data: 00000000
OS Version: 6.1.7600.2.0.0.768.3
Locale ID: 1033
Additional Information 1: e958
Additional Information 2: e95831f9d00a16a326250da660e931c5
Additional Information 3: 040a
Additional Information 4: 040a259d27c5ccf749ee18722d5fbec0