wocr

a library that regonizes text, and barcodes using opencv, tesseract and zbarimg

Usage no npm install needed!

<script type="module">
  import wocr from 'https://cdn.skypack.dev/wocr';
</script>

README

wocr

Build Status endorse

An ocr package for node. This package uses opencv, tesseract and zbarimg.

Install

You'll need OpenCV 2.3.1 or newer, tesseract 3.02.02 or newer, leptonica 1.71 or newer and zbar 0.10.0 or newer.

On Debian or Ubuntu.

sudo apt-get update
sudo apt-get install --force-yes libcv-dev libcvaux-dev libhighgui-dev libopencv-dev libleptonica-dev libtesseract-dev libzbar-dev
npm install wocr

Usage

OCR = require('wocr')
var ocr = new OCR();
ocr.Init('eng');
ocr.SetMatrix(myImage); // need to be an node-opencv matrix
var codes = ocr.GetBarcode();
var text = ocr.GetText();