Note that there are some explanatory texts on larger screens.

plurals
  1. POTesseract and Php ocr
    primarykey
    data
    text
    <p>I am looking to convert a large number of image files into text using Tesseract.</p> <p>I have looked at their documentation but have not idea how that relates to PHP and how my php script will interact with tesseract ocr. I have seen on other questions that suggest that php exec() might be the way. </p> <pre><code>$img = myimage.png; $text = exec($img,'tesseract'); </code></pre> <p>I have downloaded and installed tesseract. Using windows 7 with a recent version of xampp installed. I have a beginner to intermediate knowledge of php. What knowledge am I missing?</p> <p><b>Update</b> I now have it working with in powershell and cmd with </p> <pre><code>tesseract.exe D:\Documents\Web_Development\Sandbox\php\images\23.png D:\Documents\Web_Development\Sandbox\php\images\23 </code></pre> <p>But When I try to run it through exec like this:</p> <pre><code>&lt;?php exec('tesseract.exe D:\Documents\Web_Development\Sandbox\images\23.png D:\Documents\Web_Development\Sandbox\images\23'); ?&gt; </code></pre> <p>I get a popup from windows that says the tesseract.exe has stopped working. here are the error details if they mean anything to anyone. </p> <pre><code>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 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload