image-to-text

1.0.8 • Public • Published

image-to-text

  • Simple object detection module. Reads Text/Numbers/Characters/Bar codes too.

  • Finds the object in an given image file and gives back the text description of it. (Uses api over internet)

  • Promise enabled.

Usage:

 var imageToTextDecoder = require('image-to-text');
 
 var file = {
   name: 'iphone.jpeg',
   path: './image/'
 };
 
 var key = 'ztEX9VMpdh3YbmiGfvlLDA'; //Your key registered from cloudsightapi @ https://cloudsightapi.com
 imageToTextDecoder.setAuth(key);
 imageToTextDecoder.getKeywordsForImage(file).then(function(keywords){
    console.log(keywords);
 },function(error){
    console.log(error);
 });
output

space gray iphone 6

input file - ./image/iphone.jpeg

iphone 6 image

Barcode/Character identification:

vin just do it

Output:

bar code 0 36000 29145 2

nike just do it logo

File specifications

  • File can we object with name and path mentioned
 var file = {
  name: 'iphone.jpeg',
  path: './image/'
};
  • Object with just name. Then path will be treated as root
var file = {
  name: 'iphone.jpeg'
};
  • Object with name, path and content. Content - buffer of the file
fs.readFile('./iphone.jpeg', function(err, content){
 
    var file = {
        name: 'iphone.jpeg',
        path: './',
        content: content
    }
}
  • String - just name of the file. Path will be treated as root.
var file = 'iphone.jpeg';

Package Sidebar

Install

npm i image-to-text

Weekly Downloads

26

Version

1.0.8

License

none

Last publish

Collaborators

  • kharish89
  • vics