Code Monkey home page Code Monkey logo

nodecr's Introduction

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

nodecr's People

Contributors

joscha avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.