a
This commit is contained in:
parent
1ccafd13bd
commit
ddad227fb1
|
|
@ -61,6 +61,7 @@ class FacialVerificationAPI {
|
|||
* Utilisez Azure Face API, AWS Rekognition, ou une solution locale
|
||||
*/
|
||||
private function compareFaces($referenceImagePath, $capturedImageBase64) {
|
||||
/*
|
||||
var_dump(
|
||||
array(
|
||||
"referenceImagePath" => $referenceImagePath,
|
||||
|
|
@ -70,6 +71,7 @@ class FacialVerificationAPI {
|
|||
)
|
||||
);
|
||||
exit;
|
||||
*/
|
||||
|
||||
// Option 2: AWS Rekognition
|
||||
return $this->compareWithAWSRekognition($referenceImagePath, $capturedImageBase64);
|
||||
|
|
@ -101,21 +103,9 @@ class FacialVerificationAPI {
|
|||
'SimilarityThreshold' => 80
|
||||
]);
|
||||
|
||||
/*
|
||||
$result = $client->compareFaces
|
||||
(
|
||||
[
|
||||
'SimilarityThreshold' => 80,
|
||||
'SourceImage' => [
|
||||
'Bytes' => file_get_contents($sourceImage)
|
||||
],
|
||||
'TargetImage' => [
|
||||
//'Bytes' => file_get_contents($targetImage)
|
||||
'Bytes' => base64_decode($targetImage)
|
||||
],
|
||||
]
|
||||
);
|
||||
*/
|
||||
var_dump($result);
|
||||
exit;
|
||||
|
||||
if (empty($result['FaceMatches'])) {
|
||||
return [
|
||||
'match' => false,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user