Tesseract OCR bindings for Node.js
Tesseract OCR bindings for Node.js.
I started developing of this module when had a need to have Tesseract working with Node.js. But found that
existing modules do call
tesseract command-line tool. And I have a need in fully customizable API. I started
from this article and now working with Tesseract 3.02 API
documentation. So soon will have much more things implemented! :wink:
var tesseract = require"tesseract"tess =pix;// set languagetessinit"eng";// set imagetesssetImage"some-image.png";// run recognitiontessrecognize;// get recognized textconsole.logtessgetText;// clear resultstessclear;// create Pix object (wrapper for Leptonica PIX structure)pix = "other-image.png";// Pix can be used in BaseApi::SetImage() tootesssetImagepix;// again recognize and get texttessrecognize;console.logtessgetText;// finish him! - free memory of underlying TessBaseAPI objecttessend;
- Make class BaseApi support more of TessBaseAPI
- Make tests
- Support of other Tesseract APIs (someday)!