PHP code example of softon / laravel-face-detect
1. Go to this page and download the library: Download softon/laravel-face-detect library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
softon / laravel-face-detect example snippets
use \Softon\LaravelFaceDetect\Facades\FaceDetect;
FaceDetect::extract($imagefilepath)->save($savefilepath);
use \Softon\LaravelFaceDetect\Facades\FaceDetect;
$crop_params = FaceDetect::extract($imagefilepath)->face; // return array with x,y,width
use \Softon\LaravelFaceDetect\Facades\FaceDetect;
$crop_params = FaceDetect::extract($imagefilepath)->face_found; // returns true/false