mittagessen / kraken

OCR engine for all the languages
http://kraken.re
Apache License 2.0
673 stars 125 forks source link

It there a way to simply call kraken recognizer from code? #615

Closed dantetemplar closed 2 weeks ago

dantetemplar commented 3 weeks ago

I would like to call kraken recognition from code and get hocr. However, just calling kraken --hocr -i image.png image.txt binarize segment ocr --reorder will initialize model on each image recognition. Also it will create file when I need pipe.

Kraken code with click is too tricky for reverse-engineering.

mittagessen commented 2 weeks ago

The API tutorial explains how to do it. It's fairly straightforward.