get-face
use wasm opencv.js to get face!
use
npm i get-face
example
const getFace = ;const fs = ;const faceImgBufList = await getFace;forlet i=0;i<faceImgBufListlength;i++ fs;
imgInput.jpg
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 |