Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mateioprea/node-oxford
Small library that incorporates Microsoft's project Oxford Emotion Recognition
https://github.com/mateioprea/node-oxford
Last synced: 3 months ago
JSON representation
Small library that incorporates Microsoft's project Oxford Emotion Recognition
- Host: GitHub
- URL: https://github.com/mateioprea/node-oxford
- Owner: mateioprea
- License: mit
- Created: 2015-11-11T19:00:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-13T15:18:08.000Z (about 9 years ago)
- Last Synced: 2024-10-03T16:16:43.994Z (4 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/node-oxford-emotion
- Size: 0 Bytes
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Node JS - Oxford Emotion
=========Small library that incorporates Microsoft's project Oxford Emotion Recognition
## Installation
npm install node-oxford-emotion --save
## Usage
URL:
```javascript
var oxfordEemotion = require("node-oxford-emotion")(api-key)
var emotion = oxfordEmotion.recognize("url", image-url, function(cb) {
console.log(cb);
});
```
Local Image:
```javascript
var oxfordEemotion = require("node-oxford-emotion")(api-key)
var emotion = oxfordEmotion.recognize("image", imageData, function(cb) {
console.log(cb);
});
```You need to read the file as binary data. You can use this function:
```javascript
function binaryRead(file) {
var bitmap = fs.readFileSync(file);
return new Buffer(bitmap.toString('binary'),'binary');
}
```
You also need to parse the response using JSON.parse() if you input binary file.## TODOS
Nothing.## Project Oxford Documentation
[Project Oxford](https://dev.projectoxford.ai/docs/services/5639d931ca73072154c1ce89/operations/563b31ea778daf121cc3a5fa)
## Release History
* 1.0.0 Initial Release
* 1.0.1 Add callback
* 1.0.2 Add support for local images
* 1.0.4 Fix typo in README