Skip to content

tualo/wocr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();