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
|
* 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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user