Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uk0/ocr-nodejs
https://github.com/uk0/ocr-nodejs
Last synced: about 11 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/uk0/ocr-nodejs
- Owner: uk0
- License: other
- Created: 2017-06-13T15:47:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-15T02:42:08.000Z (almost 3 years ago)
- Last Synced: 2024-05-20T02:01:59.836Z (6 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 14
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
ng-ocr
============[![Build Status](https://travis-ci.org/breakEval13/OCR-NODEJS.svg?branch=master)](https://travis-ci.org/breakEval13/OCR-NODEJS)
[![Downloads](http://img.shields.io/npm/dm/ng-ocr.svg)](https://npmjs.org/package/ng-ocr)
[![NPM-Version](https://img.shields.io/npm/v/npm.svg)](https://npmjs.org/package/ng-ocr)Ngocr is an OCR library pure JavaScript for node.js.
We use [ocrad.js](https://github.com/antimatter15/ocrad.js/).Install
---------```bash
$ npm install ng-ocr -S
```How to use
---------![image](test/fixture/hello_world.png)
Simple :
```javascript
var Ngocr = require("ng-ocr");
Ngocr.decodeFile("test/fixture/hello_world.png", function(error, data){
console.log(data); // Hello World!
});
```From Buffer:
```javascript
var Ngocr = require("ng-ocr");
var fs = require("fs");
var buffer = fs.readFileSync("test/fixture/hello_world.png");
Ngocr.decodeBuffer(buffer, function(error, data){
console.log(data); // Hello World!
});
```From Stream:
```javascript
var Ngocr = require("ng-ocr");
var fs = require("fs");
var stream = fs.createReadStream("test/fixture/hello_world.png");
Ngocr.decodeStream(stream, function(error, data){
console.log(data); // Hello World!
});
```Todo
----------- JPG support
- gif support
- stream interface (i love pipe)