get-face
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

get-face

use wasm opencv.js to get face!

use

npm i get-face

example

const getFace = require('get-face');
const fs = require('fs');
const faceImgBufList = await getFace.getFace(fs.readFileSync('./imgInput.jpg'),'image/jpeg');
for(let i=0;i<faceImgBufList.length;i++) {
    fs.writeFileSync(`./imgOnput${i}.jpeg`,faceImgBufList[i]);
}

imgInput.jpg

imgInput.jpg

imgOnput0.jpeg

imgOnput0.jpeg

API

Function

getFace @return Promise<Array> (face photo's buffer )

ParamName Must Type Default Remark
srcBuffer yes Buffer / photo's buffer
mime no string "image/jpeg" alltype: "image/png","image/jpeg","image/bmp"
top no number 0
right no number 0
bottom no number 0
left no number 0

Readme

Keywords

Package Sidebar

Install

npm i get-face

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

9.23 MB

Total Files

11

Last publish

Collaborators

  • zy445566