« blib/lib/Paws/Rekognition/CelebrityRecognition.pm
↑ Summary
blib/lib/Paws/Rekognition/CompareFacesMatch.pm »
| 1 | |||
| 2 | package Paws::Rekognition::CompareFaces; | ||
| 3 | use Moose; | ||
| 4 | has QualityFilter => (is => 'ro', isa => 'Str'); | ||
| 5 | has SimilarityThreshold => (is => 'ro', isa => 'Num'); | ||
| 6 | has SourceImage => (is => 'ro', isa => 'Paws::Rekognition::Image', required => 1); | ||
| 7 | has TargetImage => (is => 'ro', isa => 'Paws::Rekognition::Image', required => 1); | ||
| 8 | |||
| 9 | use MooseX::ClassAttribute; | ||
| 10 | |||
| 11 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CompareFaces'); | ||
| 12 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Rekognition::CompareFacesResponse'); | ||
| 13 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 14 | 1; | ||
| 15 | |||
| 16 | ### main pod documentation begin ### | ||
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | Paws::Rekognition::CompareFaces - Arguments for method CompareFaces on L<Paws::Rekognition> | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | This class represents the parameters used for calling the method CompareFaces on the | ||
| 25 | L<Amazon Rekognition|Paws::Rekognition> service. Use the attributes of this class | ||
| 26 | as arguments to method CompareFaces. | ||
| 27 | |||
| 28 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CompareFaces. | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | my $rekognition = Paws->service('Rekognition'); | ||
| 33 | # To compare two images | ||
| 34 | # This operation compares the largest face detected in the source image with | ||
| 35 | # each face detected in the target image. | ||
| 36 | my $CompareFacesResponse = $rekognition->CompareFaces( | ||
| 37 | 'SimilarityThreshold' => 90, | ||
| 38 | 'SourceImage' => { | ||
| 39 | 'S3Object' => { | ||
| 40 | 'Bucket' => 'mybucket', | ||
| 41 | 'Name' => 'mysourceimage' | ||
| 42 | } | ||
| 43 | }, | ||
| 44 | 'TargetImage' => { | ||
| 45 | 'S3Object' => { | ||
| 46 | 'Bucket' => 'mybucket', | ||
| 47 | 'Name' => 'mytargetimage' | ||
| 48 | } | ||
| 49 | } | ||
| 50 | ); | ||
| 51 | |||
| 52 | # Results: | ||
| 53 | my $FaceMatches = $CompareFacesResponse->FaceMatches; | ||
| 54 | my $SourceImageFace = $CompareFacesResponse->SourceImageFace; | ||
| 55 | |||
| 56 | # Returns a L<Paws::Rekognition::CompareFacesResponse> object. | ||
| 57 | |||
| 58 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 59 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/rekognition/CompareFaces> | ||
| 60 | |||
| 61 | =head1 ATTRIBUTES | ||
| 62 | |||
| 63 | |||
| 64 | =head2 QualityFilter => Str | ||
| 65 | |||
| 66 | A filter that specifies a quality bar for how much filtering is done to | ||
| 67 | identify faces. Filtered faces aren't compared. If you specify C<AUTO>, | ||
| 68 | Amazon Rekognition chooses the quality bar. If you specify C<LOW>, | ||
| 69 | C<MEDIUM>, or C<HIGH>, filtering removes all faces that donE<rsquo>t | ||
| 70 | meet the chosen quality bar. The quality bar is based on a variety of | ||
| 71 | common use cases. Low-quality detections can occur for a number of | ||
| 72 | reasons. Some examples are an object that's misidentified as a face, a | ||
| 73 | face that's too blurry, or a face with a pose that's too extreme to | ||
| 74 | use. If you specify C<NONE>, no filtering is performed. The default | ||
| 75 | value is C<NONE>. | ||
| 76 | |||
| 77 | To use quality filtering, the collection you are using must be | ||
| 78 | associated with version 3 of the face model or higher. | ||
| 79 | |||
| 80 | Valid values are: C<"NONE">, C<"AUTO">, C<"LOW">, C<"MEDIUM">, C<"HIGH"> | ||
| 81 | |||
| 82 | =head2 SimilarityThreshold => Num | ||
| 83 | |||
| 84 | The minimum level of confidence in the face matches that a match must | ||
| 85 | meet to be included in the C<FaceMatches> array. | ||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | =head2 B<REQUIRED> SourceImage => L<Paws::Rekognition::Image> | ||
| 90 | |||
| 91 | The input image as base64-encoded bytes or an S3 object. If you use the | ||
| 92 | AWS CLI to call Amazon Rekognition operations, passing base64-encoded | ||
| 93 | image bytes is not supported. | ||
| 94 | |||
| 95 | If you are using an AWS SDK to call Amazon Rekognition, you might not | ||
| 96 | need to base64-encode image bytes passed using the C<Bytes> field. For | ||
| 97 | more information, see Images in the Amazon Rekognition developer guide. | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head2 B<REQUIRED> TargetImage => L<Paws::Rekognition::Image> | ||
| 102 | |||
| 103 | The target image as base64-encoded bytes or an S3 object. If you use | ||
| 104 | the AWS CLI to call Amazon Rekognition operations, passing | ||
| 105 | base64-encoded image bytes is not supported. | ||
| 106 | |||
| 107 | If you are using an AWS SDK to call Amazon Rekognition, you might not | ||
| 108 | need to base64-encode image bytes passed using the C<Bytes> field. For | ||
| 109 | more information, see Images in the Amazon Rekognition developer guide. | ||
| 110 | |||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | =head1 SEE ALSO | ||
| 115 | |||
| 116 | This class forms part of L<Paws>, documenting arguments for method CompareFaces in L<Paws::Rekognition> | ||
| 117 | |||
| 118 | =head1 BUGS and CONTRIBUTIONS | ||
| 119 | |||
| 120 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 121 | |||
| 122 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 123 | |||
| 124 | =cut | ||
| 125 |