BuildIt.CognitiveServices.FaceAPIV10Extensions.FaceListAddaFacetoaFaceList C# (CSharp) Method

FaceListAddaFacetoaFaceList() public static method

<p>Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire. Note persistedFaceId is different from faceId which represents the detected face by <a href="/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236">Face - Detect</a>. <ul> <li>The persistedFaceId of face list is used in <a href="/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395251">Face List - Delete a Face from a Face List</a> to remove face from a face list, or the output JSON of <a href="/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237">Face - Find Similar</a> </li> <li>JPEG, PNG, GIF(the first frame), and BMP are supported. The image file size should be larger than or equal to 1KB but no larger than 4MB.</li> <li>The detectable face size is between 36x36 to 4096x4096 pixels. The faces out of this range will not be detected.</li> <li>Rectangle specified by targetFace should contain exactly one face. Zero or multiple faces will be regarded as an error. Out of detectable face size, large head-pose, or very large occlusions will also result in fail to add a person face.</li> <li>The given rectangle specifies both face location and face size at the same time. There is no guarantee of correct result if you are using rectangle which are not returned from <a href="/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236">Face - Detect</a>. </li> </ul> <p> Face list is a group of faces, and these faces will not expire. Face list is used as a parameter of source faces in <a href="/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395237">Face - Find Similar</a>. Face List is useful when to find similar faces in a fixed face set very often, e.g. to find a similar face in a face list of celebrities, friends, or family members.</p> <p> A face list can have a maximum of 1000 faces. </p> <h4>Http Method</h4> POST
public static FaceListAddaFacetoaFaceList ( this operations, string faceListId, string userData = default(string), string targetFace = default(string), string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string) ) : void
operations this /// The operations group for this extension method. ///
faceListId string /// Valid character is letter in lower case or digit or '-' or '_', maximum /// length is 64. ///
userData string /// User-specified data about the face list for any purpose. The maximum /// length is 1KB. ///
targetFace string /// A face rectangle to specify the target face to be added into the face /// list, in the format of "targetFace=left,top,width,height". E.g. /// "targetFace=10,10,100,100". If there is more than one face in the image, /// targetFace is required to specify which face to add. No targetFace means /// there is only one face detected in the entire image. ///
subscriptionKey string /// subscription key in url ///
ocpApimSubscriptionKey string /// subscription key in header ///
return void
            public static void FaceListAddaFacetoaFaceList(this IFaceAPIV10 operations, string faceListId, string userData = default(string), string targetFace = default(string), string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string))
            {
                System.Threading.Tasks.Task.Factory.StartNew(s => ((IFaceAPIV10)s).FaceListAddaFacetoaFaceListAsync(faceListId, userData, targetFace, subscriptionKey, ocpApimSubscriptionKey), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None,  System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }