Skip to content

macacajs/nodecv-server

Repository files navigation

nodecv-server

NPM version build status Test coverage node version npm download

nodecv server side

Usage

$ git clone git@github.com:macacajs/nodecv-server.git --depth=1
$ cd nodecv-server
$ npm i
$ make server

Please visit demo: http://localhost:9900/

API

POST /opencv/dissimilarity
POST /opencv/matchtemplate
POST /opencv/cascadedetect

Example:

request.post({
  url: `${remoteHost}/opencv/dissimilarity`,
  formData: formData
}, function(err, httpResponse, body) {
  if (err) {
    return console.error('upload failed:', err);
  }
  console.log('Server responded with:', body);
  try {
    const data = JSON.parse(body);
    console.log(`Dissimilarity is: ${data.dissimilarity}`);
  } catch (e) {
  }
});

More sample: macaca-sample

License

The MIT License (MIT)