Skip to content

csvignesh/image-to-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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';

About

finds the object in the image file which you provide and gives back the text description of the same

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published