-
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.
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);
});
space gray iphone 6
bar code 0 36000 29145 2
nike just do it logo
- 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';