mittagessen / kraken

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

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

Closed dantetemplar closed 5 months ago

dantetemplar commented 5 months 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 5 months ago

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