UNPKG

easy-tesseract-ocr

Version:

This is a tiny OCR project and just provide a caller method to interact with Tesseract (Which is a known open source OCR library project written in C++).

14 lines (12 loc) 316 B
const eto = require('./../index.js'); console.log("\n-- test case 1: basic OCR scanning (english), eng-sample.png --"); eto.scan({ imagePath: './test/eng-sample.png', trainedData: 'eng' }) .then(function (text) { console.log('[result]\n', text); }) .catch(function (err) { console.error(err); });