softon/laravel-face-detect
最新稳定版本:v0.2.2
Composer 安装命令:
composer require softon/laravel-face-detect
包简介
A Laravel Package for Face Detection and Cropping in Images.
README 文档
README
A Laravel Package for Face Detection and Cropping in Images.
Installation
- Edit the composer.json add to the require array & run composer update
"softon/laravel-face-detect": "dev-master"composer update - Add the service provider to the config/app.php file in Laravel
'Softon\LaravelFaceDetect\FaceDetectServiceProvider', - Add an alias for the Facade to the config/app.php file in Laravel
'FaceDetect' => 'Softon\LaravelFaceDetect\Facades\FaceDetect', - Publish the config file by running
php artisan vendor:publish
Usage
To extract the Face and save the cropped image use...
use \Softon\LaravelFaceDetect\Facades\FaceDetect; FaceDetect::extract($imagefilepath)->save($savefilepath);
To extract the Face and return the cropping coordinates without cropping the image...
use \Softon\LaravelFaceDetect\Facades\FaceDetect; $crop_params = FaceDetect::extract($imagefilepath)->face; // return array with x,y,width
To detect if face is found in a image...
use \Softon\LaravelFaceDetect\Facades\FaceDetect; $crop_params = FaceDetect::extract($imagefilepath)->face_found; // returns true/false
You may edit the config file facedetect.php in the config directory to add aditional padding to the cropped Images.
统计信息
- 总下载量: 26.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 61
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-09