OpenCv-人脸裁剪:自动检测并裁剪图像中的人脸(Node.js)
该软件包可帮助您自动检测图片中的脸部并将其裁剪掉。
安装
从命令行安装:
npm install --save opencv-facecrop
基本用法
const facecrop = require ( 'opencv-facecrop' ) ;
facecrop ( './image-file.jpg' , './dest/output.jpg' , "image/jpeg" , 0.95 , 1.5 ) ;
/*
Outputs image with file name output.jpg in 'dest' folder with the face cropped out.
If multiple faces are detected, the files will be automatically
1