ngregrichardson / node-text-from-image

Quick wrapper for Tesseract.js to extract text from images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node.js Text from Image

npm version

A rewrite of text-from-image by goyalabhi1305 in TypeScript.

Installation

npm install --save node-text-from-image

Usage

This gives a promise which can be used further for various uses

import getTextFromImage from "node-text-from-image";

getTextFromImage("./image.png").then(text => {
    console.log(text);
}).catch(err => {
    console.log(err);
})

Please take care

  • Image can be any supported Image Format.
  • The clear the image the better.
  • You can use Sharp or other image processing library to modify image before sending it to the function

Issues

If you run into any problems, please create an issue.

Contributing

If you're interested in contributing, please follow the GitHub repository.

About

Quick wrapper for Tesseract.js to extract text from images


Languages

Language:TypeScript 100.0%