n-ocr

0.1.4 • Public • Published

n-ocr

Build Status

n-ocr is an OCR library pure JavaScript for node.js. We use ocrad.js.

Install

$ npm install n-ocr -S

How to use

image

Simple :

var okrabyte = require("n-ocr");
okrabyte.decodeFile("test/fixture/hello_world.png", function(error, data){
  console.log(data); // Hello World!
});

From Buffer:

var okrabyte = require("n-ocr");
var fs = require("fs");
var buffer = fs.readFileSync("test/fixture/hello_world.png");
okrabyte.decodeBuffer(buffer, function(error, data){
  console.log(data); // Hello World!
});

From Stream:

var okrabyte = require("n-ocr");
var fs = require("fs");
var stream = fs.createReadStream("test/fixture/hello_world.png");
okrabyte.decodeStream(stream, function(error, data){
  console.log(data); // Hello World!
});

Todo

  • JPG support
  • gif support
  • stream interface (i love pipe)

Readme

Keywords

Package Sidebar

Install

npm i n-ocr

Weekly Downloads

1

Version

0.1.4

License

MIT

Last publish

Collaborators

  • zmatsh