项目作者: geraldoramos

项目描述 :
A simple module to detect faces from an image URL or file (path)
高级语言: JavaScript
项目地址: git://github.com/geraldoramos/face-detector.git
创建时间: 2017-07-11T22:15:00Z
项目社区:https://github.com/geraldoramos/face-detector

开源协议:GNU General Public License v3.0

下载


face-detector

A simple NPM module to detect faces. The module will return the number of recognizable faces from a given image URL or path.

Opencv is required.

Usage

Install the Module

  1. npm install face-detector

Example Using an URL

  1. const face = require('face-detector')
  2. var imageUrl = 'https://avatars2.githubusercontent.com/u/5693297?v=3&s=400'
  3. face.detect(imageUrl,function(result){
  4. console.log(result)
  5. })

Example Using a Path

  1. const face = require('face-detector')
  2. var imagePath = './image.jpg'
  3. face.detect(imagePath,function(result){
  4. console.log(result)
  5. })