This commit is contained in:
KANE LAZENI 2026-02-24 00:43:50 +00:00
parent 1ccafd13bd
commit ddad227fb1

View File

@ -61,6 +61,7 @@ class FacialVerificationAPI {
* Utilisez Azure Face API, AWS Rekognition, ou une solution locale * Utilisez Azure Face API, AWS Rekognition, ou une solution locale
*/ */
private function compareFaces($referenceImagePath, $capturedImageBase64) { private function compareFaces($referenceImagePath, $capturedImageBase64) {
/*
var_dump( var_dump(
array( array(
"referenceImagePath" => $referenceImagePath, "referenceImagePath" => $referenceImagePath,
@ -70,6 +71,7 @@ class FacialVerificationAPI {
) )
); );
exit; exit;
*/
// Option 2: AWS Rekognition // Option 2: AWS Rekognition
return $this->compareWithAWSRekognition($referenceImagePath, $capturedImageBase64); return $this->compareWithAWSRekognition($referenceImagePath, $capturedImageBase64);
@ -101,21 +103,9 @@ class FacialVerificationAPI {
'SimilarityThreshold' => 80 'SimilarityThreshold' => 80
]); ]);
/* var_dump($result);
$result = $client->compareFaces exit;
(
[
'SimilarityThreshold' => 80,
'SourceImage' => [
'Bytes' => file_get_contents($sourceImage)
],
'TargetImage' => [
//'Bytes' => file_get_contents($targetImage)
'Bytes' => base64_decode($targetImage)
],
]
);
*/
if (empty($result['FaceMatches'])) { if (empty($result['FaceMatches'])) {
return [ return [
'match' => false, 'match' => false,