HOG detector also must return the rectangles of the detections.

This commit is contained in:
Matias De lellis
2020-02-29 14:04:41 -03:00
parent 1e492f2e12
commit afc9164127
5 changed files with 41 additions and 14 deletions

View File

@@ -0,0 +1,18 @@
--TEST--
Frontal face detection.
--SKIPIF--
<?php if (!extension_loaded("pdlib") print "skip"; ?>
--FILE--
<?php
printf("Detection\n");
$detected_faces = dlib_face_detection(__DIR__ . "/lenna.jpg");
printf("Faces found = %d\n", count($detected_faces));
foreach($detected_faces as $index => $detected_face) {
printf("Face[%d] in bounding box (left=%d, top=%d, right=%d, bottom=%d)\n", $index,
$detected_face["left"], $detected_face["top"], $detected_face["right"], $detected_face["bottom"]);
}
?>
--EXPECT--
Detection
Faces found = 1
Face[0] in bounding box (left=214, top=194, right=393, bottom=373)