承接 freearhey/laravel-face-detection 相关项目开发

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

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

freearhey/laravel-face-detection

最新稳定版本:v1.4.0

Composer 安装命令:

composer require freearhey/laravel-face-detection

包简介

A Laravel Package for Face Detection and Cropping in Images.

README 文档

README

A Laravel Package for Face Detection.

Installation

  1. Install the package via composer:
composer require freearhey/laravel-face-detection
  1. Add the service provider to the config/app.php file in Laravel:
'providers' => [
  ...
  Arhey\FaceDetection\FaceDetectionServiceProvider::class,
  ...
],
  1. Publish the config file by running:
php artisan vendor:publish

Usage

use Arhey\FaceDetection\Facades\FaceDetection;

$face = FaceDetection::extract('path/to/image.jpg');

To detect if face is found in a image:

if($face->found) {
  // face found
} else {
  // face not found
}

To get the facial boundaries:

var_dump($face->bounds);

/*
  array(
    'x' => 292.0,
    'y' => 167.0,
    'w' => 204.8,
    'h' => 204.8,
  )
*/

To save the found face image:

$face->save('path/to/output.jpg');

Testing

vendor/bin/phpunit

License

MIT

统计信息

  • 总下载量: 2.15k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 39
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 39
  • Watchers: 3
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-07