承接 softon/laravel-face-detect 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Edit the composer.json add to the require array & run composer update
     "softon/laravel-face-detect": "dev-master" 
     composer update 
  2. Add the service provider to the config/app.php file in Laravel
     'Softon\LaravelFaceDetect\FaceDetectServiceProvider', 
  3. Add an alias for the Facade to the config/app.php file in Laravel
     'FaceDetect' => 'Softon\LaravelFaceDetect\Facades\FaceDetect', 
  4. 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

GitHub 信息

  • Stars: 57
  • Watchers: 6
  • Forks: 25
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-09