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++).

21 lines (19 loc) 403 B
const eto = require('./../index.js'); console.log("\n-- test case 5: live OCR at specified location(rectangle) (chinese) --") eto.scan({ imagePath: { x1: 65, y1: 134, x2: 355, y2: 234 }, //compare: "測試", trainedData: "chi_tra", reservedSample: false }) .then(function (text) { console.log("[result]\n", text); }) .catch(function (err) { console.error(err); });