« blib/lib/Paws/Rekognition/ImageQuality.pm
↑ Summary
blib/lib/Paws/Rekognition/IndexFacesResponse.pm »
| 1 | |||
| 2 | package Paws::Rekognition::IndexFaces; | ||
| 3 | use Moose; | ||
| 4 | has CollectionId => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has DetectionAttributes => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 6 | has ExternalImageId => (is => 'ro', isa => 'Str'); | ||
| 7 | has Image => (is => 'ro', isa => 'Paws::Rekognition::Image', required => 1); | ||
| 8 | has MaxFaces => (is => 'ro', isa => 'Int'); | ||
| 9 | has QualityFilter => (is => 'ro', isa => 'Str'); | ||
| 10 | |||
| 11 | use MooseX::ClassAttribute; | ||
| 12 | |||
| 13 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'IndexFaces'); | ||
| 14 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Rekognition::IndexFacesResponse'); | ||
| 15 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 16 | 1; | ||
| 17 | |||
| 18 | ### main pod documentation begin ### | ||
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | Paws::Rekognition::IndexFaces - Arguments for method IndexFaces on L<Paws::Rekognition> | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | This class represents the parameters used for calling the method IndexFaces on the | ||
| 27 | L<Amazon Rekognition|Paws::Rekognition> service. Use the attributes of this class | ||
| 28 | as arguments to method IndexFaces. | ||
| 29 | |||
| 30 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to IndexFaces. | ||
| 31 | |||
| 32 | =head1 SYNOPSIS | ||
| 33 | |||
| 34 | my $rekognition = Paws->service('Rekognition'); | ||
| 35 | # To add a face to a collection | ||
| 36 | # This operation detects faces in an image and adds them to the specified | ||
| 37 | # Rekognition collection. | ||
| 38 | my $IndexFacesResponse = $rekognition->IndexFaces( | ||
| 39 | 'CollectionId' => 'myphotos', | ||
| 40 | 'DetectionAttributes' => [ | ||
| 41 | |||
| 42 | ], | ||
| 43 | 'ExternalImageId' => 'myphotoid', | ||
| 44 | 'Image' => { | ||
| 45 | 'S3Object' => { | ||
| 46 | 'Bucket' => 'mybucket', | ||
| 47 | 'Name' => 'myphoto' | ||
| 48 | } | ||
| 49 | } | ||
| 50 | ); | ||
| 51 | |||
| 52 | # Results: | ||
| 53 | my $FaceRecords = $IndexFacesResponse->FaceRecords; | ||
| 54 | my $OrientationCorrection = $IndexFacesResponse->OrientationCorrection; | ||
| 55 | |||
| 56 | # Returns a L<Paws::Rekognition::IndexFacesResponse> 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/IndexFaces> | ||
| 60 | |||
| 61 | =head1 ATTRIBUTES | ||
| 62 | |||
| 63 | |||
| 64 | =head2 B<REQUIRED> CollectionId => Str | ||
| 65 | |||
| 66 | The ID of an existing collection to which you want to add the faces | ||
| 67 | that are detected in the input images. | ||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | =head2 DetectionAttributes => ArrayRef[Str|Undef] | ||
| 72 | |||
| 73 | An array of facial attributes that you want to be returned. This can be | ||
| 74 | the default list of attributes or all attributes. If you don't specify | ||
| 75 | a value for C<Attributes> or if you specify C<["DEFAULT"]>, the API | ||
| 76 | returns the following subset of facial attributes: C<BoundingBox>, | ||
| 77 | C<Confidence>, C<Pose>, C<Quality>, and C<Landmarks>. If you provide | ||
| 78 | C<["ALL"]>, all facial attributes are returned, but the operation takes | ||
| 79 | longer to complete. | ||
| 80 | |||
| 81 | If you provide both, C<["ALL", "DEFAULT"]>, the service uses a logical | ||
| 82 | AND operator to determine which attributes to return (in this case, all | ||
| 83 | attributes). | ||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | =head2 ExternalImageId => Str | ||
| 88 | |||
| 89 | The ID you want to assign to all the faces detected in the image. | ||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | =head2 B<REQUIRED> Image => L<Paws::Rekognition::Image> | ||
| 94 | |||
| 95 | The input image as base64-encoded bytes or an S3 object. If you use the | ||
| 96 | AWS CLI to call Amazon Rekognition operations, passing base64-encoded | ||
| 97 | image bytes isn't supported. | ||
| 98 | |||
| 99 | If you are using an AWS SDK to call Amazon Rekognition, you might not | ||
| 100 | need to base64-encode image bytes passed using the C<Bytes> field. For | ||
| 101 | more information, see Images in the Amazon Rekognition developer guide. | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | =head2 MaxFaces => Int | ||
| 106 | |||
| 107 | The maximum number of faces to index. The value of C<MaxFaces> must be | ||
| 108 | greater than or equal to 1. C<IndexFaces> returns no more than 100 | ||
| 109 | detected faces in an image, even if you specify a larger value for | ||
| 110 | C<MaxFaces>. | ||
| 111 | |||
| 112 | If C<IndexFaces> detects more faces than the value of C<MaxFaces>, the | ||
| 113 | faces with the lowest quality are filtered out first. If there are | ||
| 114 | still more faces than the value of C<MaxFaces>, the faces with the | ||
| 115 | smallest bounding boxes are filtered out (up to the number that's | ||
| 116 | needed to satisfy the value of C<MaxFaces>). Information about the | ||
| 117 | unindexed faces is available in the C<UnindexedFaces> array. | ||
| 118 | |||
| 119 | The faces that are returned by C<IndexFaces> are sorted by the largest | ||
| 120 | face bounding box size to the smallest size, in descending order. | ||
| 121 | |||
| 122 | C<MaxFaces> can be used with a collection associated with any version | ||
| 123 | of the face model. | ||
| 124 | |||
| 125 | |||
| 126 | |||
| 127 | =head2 QualityFilter => Str | ||
| 128 | |||
| 129 | A filter that specifies a quality bar for how much filtering is done to | ||
| 130 | identify faces. Filtered faces aren't indexed. If you specify C<AUTO>, | ||
| 131 | Amazon Rekognition chooses the quality bar. If you specify C<LOW>, | ||
| 132 | C<MEDIUM>, or C<HIGH>, filtering removes all faces that donE<rsquo>t | ||
| 133 | meet the chosen quality bar. The default value is C<AUTO>. The quality | ||
| 134 | bar is based on a variety of common use cases. Low-quality detections | ||
| 135 | can occur for a number of reasons. Some examples are an object that's | ||
| 136 | misidentified as a face, a face that's too blurry, or a face with a | ||
| 137 | pose that's too extreme to use. If you specify C<NONE>, no filtering is | ||
| 138 | performed. | ||
| 139 | |||
| 140 | To use quality filtering, the collection you are using must be | ||
| 141 | associated with version 3 of the face model or higher. | ||
| 142 | |||
| 143 | Valid values are: C<"NONE">, C<"AUTO">, C<"LOW">, C<"MEDIUM">, C<"HIGH"> | ||
| 144 | |||
| 145 | |||
| 146 | =head1 SEE ALSO | ||
| 147 | |||
| 148 | This class forms part of L<Paws>, documenting arguments for method IndexFaces in L<Paws::Rekognition> | ||
| 149 | |||
| 150 | =head1 BUGS and CONTRIBUTIONS | ||
| 151 | |||
| 152 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 153 | |||
| 154 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 155 | |||
| 156 | =cut | ||
| 157 |