facedetector php
1.0.0
GD 를 이용해 이미지의 얼굴 위치를 식별합니다.
$ php composer.phar require "crucifyer/facedetector-php" "dev-main"
$detector = new XenoImageFaceDetector(imagefile or gdresource or imagebinary);
$face = $detector->FaceDetect();
['x' => int, 'y' => int, 'w' => int]
$faces = $detector->FaceDetect(true);
[
['x' => int, 'y' => int, 'w' => int],
['x' => int, 'y' => int, 'w' => int],
['x' => int, 'y' => int, 'w' => int],
['x' => int, 'y' => int, 'w' => int],
['x' => int, 'y' => int, 'w' => int],
]
FaceDetector::FaceDetect([multiplue bool], [resSize int])
$face = $detector->FaceDetect();
$size = $detector->getImageSize();
$direction = XenoImageFaceDetector::AlignDirection($size['width'], $size['height'], $face['x'], $face['y'], $face['w']);
$faces = XenoImageFaceDetector::FilterSmallFaces($faces);
$detector = new XenoImageFaceDetector(imagefile or gdresource or imagebinary);
$direction = $detector->getDirection();
$detector = new XenoImageFaceDetector(imagefile or gdresource or imagebinary);
[gd resource or boolean] = $detector->cropThumbnail(size, [direction], [file], [type]);