Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple wrapper for the Tesseract OCR package

branch: master

This branch is 0 commits ahead and 0 commits behind master

Update README.md

latest commit f8e7e3508d
Joscha Feth authored November 13, 2013
Octocat-spinner-32 bin added `bin/test` executable October 30, 2013
Octocat-spinner-32 lib * Move to CoffeeScript February 05, 2013
Octocat-spinner-32 src * Move to CoffeeScript February 05, 2013
Octocat-spinner-32 test added assertion to test file October 30, 2013
Octocat-spinner-32 .gitignore * Move to CoffeeScript February 05, 2013
Octocat-spinner-32 .travis.yml Create .travis.yml October 31, 2013
Octocat-spinner-32 Cakefile * Move to CoffeeScript February 05, 2013
Octocat-spinner-32 README.md Update README.md November 13, 2013
Octocat-spinner-32 package.json Merge pull request #3 from tphummel/tmp-dep October 31, 2013
README.md

Tesseract for Node.js

A simple wrapper for the Tesseract OCR package for Node.js

Build Status NPM version Dependency Status

Test

    ./bin/test

Demo

nodecr has been used in a NodeCopter demo, translating text into real-time flight commands. Here's a little video created by stitching together the photos taken by the onboard camera (each image was passed through nodecr): http://youtu.be/aGo6oPC92QE.

Source code available here: https://github.com/photomoose/OCRDrone

Installation

npm install nodecr

Versions

  • 0.0.5: Add possibility to override logger (quiet nodecr, see example below)
  • 0.0.4: Changed name to nodecr and published node module (formerly node-tesseract)
  • 0.0.3: Added support for custom preprocessors, OTB Preprocessor using ImageMagick 'convert'
  • 0.0.2: Refactored to support tesseract 3.01, added language parameter, config parameter, documentation
  • 0.0.1: Initial version from Desmond Morris

Usage

var nodecr = require('nodecr');

// Recognise text of any language in any format
nodecr.process(__dirname + '/path/to/image.jpg',function(err, text) {
    if(err) {
        console.error(err);
    } else {
        console.log(text);
    }
});

// Recognise German text in a single uniform block of text
nodecr.process(__dirname + '/path/to/image.jpg',function(err, text) {
    if(err) {
        console.error(err);
    } else {
        console.log(text);
    }
}, 'deu', 6);

// Recognise text of any language in any format but preprocess the image
// with ImageMagick 'convert' (This requires ImageMagick to be installed)

// uncomment this to quiet nodecr
//nodecr.log = function() {};

// You can write and use your own preprocessors easily, just have a look at src/nodecr.coffee
nodecr.process(__dirname + '/path/to/image.jpg',function(err, text) {
    if(err) {
        console.error(err);
    } else {
        console.log(text);
    }
}, null, null, null, nodecr.preprocessors.convert);

License

MIT

Something went wrong with that request. Please try again.