| | | 1 | | // <auto-generated> |
| | | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | | 4 | | // license information. |
| | | 5 | | // |
| | | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | | 8 | | // regenerated. |
| | | 9 | | // </auto-generated> |
| | | 10 | | |
| | | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.Face |
| | | 12 | | { |
| | | 13 | | using Models; |
| | | 14 | | using System.Collections; |
| | | 15 | | using System.Collections.Generic; |
| | | 16 | | using System.IO; |
| | | 17 | | using System.Threading; |
| | | 18 | | using System.Threading.Tasks; |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Extension methods for PersonGroupPerson. |
| | | 22 | | /// </summary> |
| | | 23 | | public static partial class PersonGroupPersonExtensions |
| | | 24 | | { |
| | | 25 | | /// <summary> |
| | | 26 | | /// Create a new person in a specified person group. |
| | | 27 | | /// </summary> |
| | | 28 | | /// <param name='operations'> |
| | | 29 | | /// The operations group for this extension method. |
| | | 30 | | /// </param> |
| | | 31 | | /// <param name='personGroupId'> |
| | | 32 | | /// Id referencing a particular person group. |
| | | 33 | | /// </param> |
| | | 34 | | /// <param name='name'> |
| | | 35 | | /// User defined name, maximum length is 128. |
| | | 36 | | /// </param> |
| | | 37 | | /// <param name='userData'> |
| | | 38 | | /// User specified data. Length should not exceed 16KB. |
| | | 39 | | /// </param> |
| | | 40 | | /// <param name='cancellationToken'> |
| | | 41 | | /// The cancellation token. |
| | | 42 | | /// </param> |
| | | 43 | | public static async Task<Person> CreateAsync(this IPersonGroupPerson operations, string personGroupId, strin |
| | | 44 | | { |
| | 10 | 45 | | using (var _result = await operations.CreateWithHttpMessagesAsync(personGroupId, name, userData, null, c |
| | | 46 | | { |
| | 10 | 47 | | return _result.Body; |
| | | 48 | | } |
| | 10 | 49 | | } |
| | | 50 | | |
| | | 51 | | /// <summary> |
| | | 52 | | /// List all persons in a person group, and retrieve person information |
| | | 53 | | /// (including personId, name, userData and persistedFaceIds of registered |
| | | 54 | | /// faces of the person). |
| | | 55 | | /// </summary> |
| | | 56 | | /// <param name='operations'> |
| | | 57 | | /// The operations group for this extension method. |
| | | 58 | | /// </param> |
| | | 59 | | /// <param name='personGroupId'> |
| | | 60 | | /// Id referencing a particular person group. |
| | | 61 | | /// </param> |
| | | 62 | | /// <param name='start'> |
| | | 63 | | /// Starting person id to return (used to list a range of persons). |
| | | 64 | | /// </param> |
| | | 65 | | /// <param name='top'> |
| | | 66 | | /// Number of persons to return starting with the person id indicated by the |
| | | 67 | | /// 'start' parameter. |
| | | 68 | | /// </param> |
| | | 69 | | /// <param name='cancellationToken'> |
| | | 70 | | /// The cancellation token. |
| | | 71 | | /// </param> |
| | | 72 | | public static async Task<IList<Person>> ListAsync(this IPersonGroupPerson operations, string personGroupId, |
| | | 73 | | { |
| | 0 | 74 | | using (var _result = await operations.ListWithHttpMessagesAsync(personGroupId, start, top, null, cancell |
| | | 75 | | { |
| | 0 | 76 | | return _result.Body; |
| | | 77 | | } |
| | 0 | 78 | | } |
| | | 79 | | |
| | | 80 | | /// <summary> |
| | | 81 | | /// Delete an existing person from a person group. The persistedFaceId, |
| | | 82 | | /// userData, person name and face feature in the person entry will all be |
| | | 83 | | /// deleted. |
| | | 84 | | /// </summary> |
| | | 85 | | /// <param name='operations'> |
| | | 86 | | /// The operations group for this extension method. |
| | | 87 | | /// </param> |
| | | 88 | | /// <param name='personGroupId'> |
| | | 89 | | /// Id referencing a particular person group. |
| | | 90 | | /// </param> |
| | | 91 | | /// <param name='personId'> |
| | | 92 | | /// Id referencing a particular person. |
| | | 93 | | /// </param> |
| | | 94 | | /// <param name='cancellationToken'> |
| | | 95 | | /// The cancellation token. |
| | | 96 | | /// </param> |
| | | 97 | | public static async Task DeleteAsync(this IPersonGroupPerson operations, string personGroupId, System.Guid p |
| | | 98 | | { |
| | 0 | 99 | | (await operations.DeleteWithHttpMessagesAsync(personGroupId, personId, null, cancellationToken).Configur |
| | 0 | 100 | | } |
| | | 101 | | |
| | | 102 | | /// <summary> |
| | | 103 | | /// Retrieve a person's information, including registered persisted faces, name |
| | | 104 | | /// and userData. |
| | | 105 | | /// </summary> |
| | | 106 | | /// <param name='operations'> |
| | | 107 | | /// The operations group for this extension method. |
| | | 108 | | /// </param> |
| | | 109 | | /// <param name='personGroupId'> |
| | | 110 | | /// Id referencing a particular person group. |
| | | 111 | | /// </param> |
| | | 112 | | /// <param name='personId'> |
| | | 113 | | /// Id referencing a particular person. |
| | | 114 | | /// </param> |
| | | 115 | | /// <param name='cancellationToken'> |
| | | 116 | | /// The cancellation token. |
| | | 117 | | /// </param> |
| | | 118 | | public static async Task<Person> GetAsync(this IPersonGroupPerson operations, string personGroupId, System.G |
| | | 119 | | { |
| | 2 | 120 | | using (var _result = await operations.GetWithHttpMessagesAsync(personGroupId, personId, null, cancellati |
| | | 121 | | { |
| | 2 | 122 | | return _result.Body; |
| | | 123 | | } |
| | 2 | 124 | | } |
| | | 125 | | |
| | | 126 | | /// <summary> |
| | | 127 | | /// Update name or userData of a person. |
| | | 128 | | /// </summary> |
| | | 129 | | /// <param name='operations'> |
| | | 130 | | /// The operations group for this extension method. |
| | | 131 | | /// </param> |
| | | 132 | | /// <param name='personGroupId'> |
| | | 133 | | /// Id referencing a particular person group. |
| | | 134 | | /// </param> |
| | | 135 | | /// <param name='personId'> |
| | | 136 | | /// Id referencing a particular person. |
| | | 137 | | /// </param> |
| | | 138 | | /// <param name='name'> |
| | | 139 | | /// User defined name, maximum length is 128. |
| | | 140 | | /// </param> |
| | | 141 | | /// <param name='userData'> |
| | | 142 | | /// User specified data. Length should not exceed 16KB. |
| | | 143 | | /// </param> |
| | | 144 | | /// <param name='cancellationToken'> |
| | | 145 | | /// The cancellation token. |
| | | 146 | | /// </param> |
| | | 147 | | public static async Task UpdateAsync(this IPersonGroupPerson operations, string personGroupId, System.Guid p |
| | | 148 | | { |
| | 0 | 149 | | (await operations.UpdateWithHttpMessagesAsync(personGroupId, personId, name, userData, null, cancellatio |
| | 0 | 150 | | } |
| | | 151 | | |
| | | 152 | | /// <summary> |
| | | 153 | | /// Delete a face from a person in a person group by specified personGroupId, |
| | | 154 | | /// personId and persistedFaceId. |
| | | 155 | | /// <br /> Adding/deleting faces to/from a same person will be processed |
| | | 156 | | /// sequentially. Adding/deleting faces to/from different persons are processed |
| | | 157 | | /// in parallel. |
| | | 158 | | /// </summary> |
| | | 159 | | /// <param name='operations'> |
| | | 160 | | /// The operations group for this extension method. |
| | | 161 | | /// </param> |
| | | 162 | | /// <param name='personGroupId'> |
| | | 163 | | /// Id referencing a particular person group. |
| | | 164 | | /// </param> |
| | | 165 | | /// <param name='personId'> |
| | | 166 | | /// Id referencing a particular person. |
| | | 167 | | /// </param> |
| | | 168 | | /// <param name='persistedFaceId'> |
| | | 169 | | /// Id referencing a particular persistedFaceId of an existing face. |
| | | 170 | | /// </param> |
| | | 171 | | /// <param name='cancellationToken'> |
| | | 172 | | /// The cancellation token. |
| | | 173 | | /// </param> |
| | | 174 | | public static async Task DeleteFaceAsync(this IPersonGroupPerson operations, string personGroupId, System.Gu |
| | | 175 | | { |
| | 0 | 176 | | (await operations.DeleteFaceWithHttpMessagesAsync(personGroupId, personId, persistedFaceId, null, cancel |
| | 0 | 177 | | } |
| | | 178 | | |
| | | 179 | | /// <summary> |
| | | 180 | | /// Retrieve information about a persisted face (specified by persistedFaceId, |
| | | 181 | | /// personId and its belonging personGroupId). |
| | | 182 | | /// </summary> |
| | | 183 | | /// <param name='operations'> |
| | | 184 | | /// The operations group for this extension method. |
| | | 185 | | /// </param> |
| | | 186 | | /// <param name='personGroupId'> |
| | | 187 | | /// Id referencing a particular person group. |
| | | 188 | | /// </param> |
| | | 189 | | /// <param name='personId'> |
| | | 190 | | /// Id referencing a particular person. |
| | | 191 | | /// </param> |
| | | 192 | | /// <param name='persistedFaceId'> |
| | | 193 | | /// Id referencing a particular persistedFaceId of an existing face. |
| | | 194 | | /// </param> |
| | | 195 | | /// <param name='cancellationToken'> |
| | | 196 | | /// The cancellation token. |
| | | 197 | | /// </param> |
| | | 198 | | public static async Task<PersistedFace> GetFaceAsync(this IPersonGroupPerson operations, string personGroupI |
| | | 199 | | { |
| | 2 | 200 | | using (var _result = await operations.GetFaceWithHttpMessagesAsync(personGroupId, personId, persistedFac |
| | | 201 | | { |
| | 2 | 202 | | return _result.Body; |
| | | 203 | | } |
| | 2 | 204 | | } |
| | | 205 | | |
| | | 206 | | /// <summary> |
| | | 207 | | /// Add a face to a person into a person group for face identification or |
| | | 208 | | /// verification. To deal with an image contains multiple faces, input face can |
| | | 209 | | /// be specified as an image with a targetFace rectangle. It returns a |
| | | 210 | | /// persistedFaceId representing the added face. No image will be stored. Only |
| | | 211 | | /// the extracted face feature will be stored on server until [PersonGroup |
| | | 212 | | /// PersonFace - |
| | | 213 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e), |
| | | 214 | | /// [PersonGroup Person - |
| | | 215 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) |
| | | 216 | | /// or [PersonGroup - |
| | | 217 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) |
| | | 218 | | /// is called. |
| | | 219 | | /// <br /> Note persistedFaceId is different from faceId generated by |
| | | 220 | | /// [Face - |
| | | 221 | | /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). |
| | | 222 | | /// * Higher face image quality means better recognition precision. Please |
| | | 223 | | /// consider high-quality faces: frontal, clear, and face size is 200x200 |
| | | 224 | | /// pixels (100 pixels between eyes) or bigger. |
| | | 225 | | /// * Each person entry can hold up to 248 faces. |
| | | 226 | | /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The |
| | | 227 | | /// allowed image file size is from 1KB to 6MB. |
| | | 228 | | /// * "targetFace" rectangle should contain one face. Zero or multiple faces |
| | | 229 | | /// will be regarded as an error. If the provided "targetFace" rectangle is not |
| | | 230 | | /// returned from [Face - |
| | | 231 | | /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), |
| | | 232 | | /// there’s no guarantee to detect and add the face successfully. |
| | | 233 | | /// * Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, |
| | | 234 | | /// or large occlusions will cause failures. |
| | | 235 | | /// * Adding/deleting faces to/from a same person will be processed |
| | | 236 | | /// sequentially. Adding/deleting faces to/from different persons are processed |
| | | 237 | | /// in parallel. |
| | | 238 | | /// </summary> |
| | | 239 | | /// <param name='operations'> |
| | | 240 | | /// The operations group for this extension method. |
| | | 241 | | /// </param> |
| | | 242 | | /// <param name='personGroupId'> |
| | | 243 | | /// Id referencing a particular person group. |
| | | 244 | | /// </param> |
| | | 245 | | /// <param name='personId'> |
| | | 246 | | /// Id referencing a particular person. |
| | | 247 | | /// </param> |
| | | 248 | | /// <param name='persistedFaceId'> |
| | | 249 | | /// Id referencing a particular persistedFaceId of an existing face. |
| | | 250 | | /// </param> |
| | | 251 | | /// <param name='userData'> |
| | | 252 | | /// User-provided data attached to the face. The size limit is 1KB. |
| | | 253 | | /// </param> |
| | | 254 | | /// <param name='cancellationToken'> |
| | | 255 | | /// The cancellation token. |
| | | 256 | | /// </param> |
| | | 257 | | public static async Task UpdateFaceAsync(this IPersonGroupPerson operations, string personGroupId, System.Gu |
| | | 258 | | { |
| | 0 | 259 | | (await operations.UpdateFaceWithHttpMessagesAsync(personGroupId, personId, persistedFaceId, userData, nu |
| | 0 | 260 | | } |
| | | 261 | | |
| | | 262 | | /// <summary> |
| | | 263 | | /// Add a face to a person into a person group for face identification or |
| | | 264 | | /// verification. To deal with an image contains multiple faces, input face can |
| | | 265 | | /// be specified as an image with a targetFace rectangle. It returns a |
| | | 266 | | /// persistedFaceId representing the added face. No image will be stored. Only |
| | | 267 | | /// the extracted face feature will be stored on server until [PersonGroup |
| | | 268 | | /// PersonFace - |
| | | 269 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e), |
| | | 270 | | /// [PersonGroup Person - |
| | | 271 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) |
| | | 272 | | /// or [PersonGroup - |
| | | 273 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) |
| | | 274 | | /// is called. |
| | | 275 | | /// <br /> Note persistedFaceId is different from faceId generated by |
| | | 276 | | /// [Face - |
| | | 277 | | /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). |
| | | 278 | | /// * Higher face image quality means better recognition precision. Please |
| | | 279 | | /// consider high-quality faces: frontal, clear, and face size is 200x200 |
| | | 280 | | /// pixels (100 pixels between eyes) or bigger. |
| | | 281 | | /// * Each person entry can hold up to 248 faces. |
| | | 282 | | /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The |
| | | 283 | | /// allowed image file size is from 1KB to 6MB. |
| | | 284 | | /// * "targetFace" rectangle should contain one face. Zero or multiple faces |
| | | 285 | | /// will be regarded as an error. If the provided "targetFace" rectangle is not |
| | | 286 | | /// returned from [Face - |
| | | 287 | | /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), |
| | | 288 | | /// there’s no guarantee to detect and add the face successfully. |
| | | 289 | | /// * Out of detectable face size (36x36 - 4096x4096 pixels), large |
| | | 290 | | /// head-pose, or large occlusions will cause failures. |
| | | 291 | | /// * Adding/deleting faces to/from a same person will be processed |
| | | 292 | | /// sequentially. Adding/deleting faces to/from different persons are processed |
| | | 293 | | /// in parallel. |
| | | 294 | | /// * The minimum detectable face size is 36x36 pixels in an image no larger |
| | | 295 | | /// than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels |
| | | 296 | | /// will need a proportionally larger minimum face size. |
| | | 297 | | /// * Different 'detectionModel' values can be provided. To use and compare |
| | | 298 | | /// different detection models, please refer to [How to specify a detection |
| | | 299 | | /// model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-det |
| | | 300 | | /// | Model | Recommended use-case(s) | |
| | | 301 | | /// | ---------- | -------- | |
| | | 302 | | /// | 'detection_01': | The default detection model for [PersonGroup Person - |
| | | 303 | | /// Add |
| | | 304 | | /// Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b). |
| | | 305 | | /// Recommend for near frontal face detection. For scenarios with exceptionally |
| | | 306 | | /// large angle (head-pose) faces, occluded faces or wrong image orientation, |
| | | 307 | | /// the faces in such cases may not be detected. | |
| | | 308 | | /// | 'detection_02': | Detection model released in 2019 May with improved |
| | | 309 | | /// accuracy especially on small, side and blurry faces. | |
| | | 310 | | /// </summary> |
| | | 311 | | /// <param name='operations'> |
| | | 312 | | /// The operations group for this extension method. |
| | | 313 | | /// </param> |
| | | 314 | | /// <param name='personGroupId'> |
| | | 315 | | /// Id referencing a particular person group. |
| | | 316 | | /// </param> |
| | | 317 | | /// <param name='personId'> |
| | | 318 | | /// Id referencing a particular person. |
| | | 319 | | /// </param> |
| | | 320 | | /// <param name='url'> |
| | | 321 | | /// Publicly reachable URL of an image |
| | | 322 | | /// </param> |
| | | 323 | | /// <param name='userData'> |
| | | 324 | | /// User-specified data about the face for any purpose. The maximum length is |
| | | 325 | | /// 1KB. |
| | | 326 | | /// </param> |
| | | 327 | | /// <param name='targetFace'> |
| | | 328 | | /// A face rectangle to specify the target face to be added to a person in the |
| | | 329 | | /// format of "targetFace=left,top,width,height". E.g. |
| | | 330 | | /// "targetFace=10,10,100,100". If there is more than one face in the image, |
| | | 331 | | /// targetFace is required to specify which face to add. No targetFace means |
| | | 332 | | /// there is only one face detected in the entire image. |
| | | 333 | | /// </param> |
| | | 334 | | /// <param name='detectionModel'> |
| | | 335 | | /// Name of detection model. Detection model is used to detect faces in the |
| | | 336 | | /// submitted image. A detection model name can be provided when performing |
| | | 337 | | /// Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add |
| | | 338 | | /// Face. The default value is 'detection_01', if another model is needed, |
| | | 339 | | /// please explicitly specify it. Possible values include: 'detection_01', |
| | | 340 | | /// 'detection_02' |
| | | 341 | | /// </param> |
| | | 342 | | /// <param name='cancellationToken'> |
| | | 343 | | /// The cancellation token. |
| | | 344 | | /// </param> |
| | | 345 | | public static async Task<PersistedFace> AddFaceFromUrlAsync(this IPersonGroupPerson operations, string perso |
| | | 346 | | { |
| | 0 | 347 | | using (var _result = await operations.AddFaceFromUrlWithHttpMessagesAsync(personGroupId, personId, url, |
| | | 348 | | { |
| | 0 | 349 | | return _result.Body; |
| | | 350 | | } |
| | 0 | 351 | | } |
| | | 352 | | |
| | | 353 | | /// <summary> |
| | | 354 | | /// Add a face to a person into a person group for face identification or |
| | | 355 | | /// verification. To deal with an image contains multiple faces, input face can |
| | | 356 | | /// be specified as an image with a targetFace rectangle. It returns a |
| | | 357 | | /// persistedFaceId representing the added face. No image will be stored. Only |
| | | 358 | | /// the extracted face feature will be stored on server until [PersonGroup |
| | | 359 | | /// PersonFace - |
| | | 360 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523e), |
| | | 361 | | /// [PersonGroup Person - |
| | | 362 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523d) |
| | | 363 | | /// or [PersonGroup - |
| | | 364 | | /// Delete](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395245) |
| | | 365 | | /// is called. |
| | | 366 | | /// <br /> Note persistedFaceId is different from faceId generated by |
| | | 367 | | /// [Face - |
| | | 368 | | /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236). |
| | | 369 | | /// * Higher face image quality means better recognition precision. Please |
| | | 370 | | /// consider high-quality faces: frontal, clear, and face size is 200x200 |
| | | 371 | | /// pixels (100 pixels between eyes) or bigger. |
| | | 372 | | /// * Each person entry can hold up to 248 faces. |
| | | 373 | | /// * JPEG, PNG, GIF (the first frame), and BMP format are supported. The |
| | | 374 | | /// allowed image file size is from 1KB to 6MB. |
| | | 375 | | /// * "targetFace" rectangle should contain one face. Zero or multiple faces |
| | | 376 | | /// will be regarded as an error. If the provided "targetFace" rectangle is not |
| | | 377 | | /// returned from [Face - |
| | | 378 | | /// Detect](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236), |
| | | 379 | | /// there’s no guarantee to detect and add the face successfully. |
| | | 380 | | /// * Out of detectable face size (36x36 - 4096x4096 pixels), large |
| | | 381 | | /// head-pose, or large occlusions will cause failures. |
| | | 382 | | /// * Adding/deleting faces to/from a same person will be processed |
| | | 383 | | /// sequentially. Adding/deleting faces to/from different persons are processed |
| | | 384 | | /// in parallel. |
| | | 385 | | /// * The minimum detectable face size is 36x36 pixels in an image no larger |
| | | 386 | | /// than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels |
| | | 387 | | /// will need a proportionally larger minimum face size. |
| | | 388 | | /// * Different 'detectionModel' values can be provided. To use and compare |
| | | 389 | | /// different detection models, please refer to [How to specify a detection |
| | | 390 | | /// model](https://docs.microsoft.com/en-us/azure/cognitive-services/face/face-api-how-to-topics/specify-det |
| | | 391 | | /// | Model | Recommended use-case(s) | |
| | | 392 | | /// | ---------- | -------- | |
| | | 393 | | /// | 'detection_01': | The default detection model for [PersonGroup Person - |
| | | 394 | | /// Add |
| | | 395 | | /// Face](/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f3039523b). |
| | | 396 | | /// Recommend for near frontal face detection. For scenarios with exceptionally |
| | | 397 | | /// large angle (head-pose) faces, occluded faces or wrong image orientation, |
| | | 398 | | /// the faces in such cases may not be detected. | |
| | | 399 | | /// | 'detection_02': | Detection model released in 2019 May with improved |
| | | 400 | | /// accuracy especially on small, side and blurry faces. | |
| | | 401 | | /// </summary> |
| | | 402 | | /// <param name='operations'> |
| | | 403 | | /// The operations group for this extension method. |
| | | 404 | | /// </param> |
| | | 405 | | /// <param name='personGroupId'> |
| | | 406 | | /// Id referencing a particular person group. |
| | | 407 | | /// </param> |
| | | 408 | | /// <param name='personId'> |
| | | 409 | | /// Id referencing a particular person. |
| | | 410 | | /// </param> |
| | | 411 | | /// <param name='image'> |
| | | 412 | | /// An image stream. |
| | | 413 | | /// </param> |
| | | 414 | | /// <param name='userData'> |
| | | 415 | | /// User-specified data about the face for any purpose. The maximum length is |
| | | 416 | | /// 1KB. |
| | | 417 | | /// </param> |
| | | 418 | | /// <param name='targetFace'> |
| | | 419 | | /// A face rectangle to specify the target face to be added to a person in the |
| | | 420 | | /// format of "targetFace=left,top,width,height". E.g. |
| | | 421 | | /// "targetFace=10,10,100,100". If there is more than one face in the image, |
| | | 422 | | /// targetFace is required to specify which face to add. No targetFace means |
| | | 423 | | /// there is only one face detected in the entire image. |
| | | 424 | | /// </param> |
| | | 425 | | /// <param name='detectionModel'> |
| | | 426 | | /// Name of detection model. Detection model is used to detect faces in the |
| | | 427 | | /// submitted image. A detection model name can be provided when performing |
| | | 428 | | /// Face - Detect or (Large)FaceList - Add Face or (Large)PersonGroup - Add |
| | | 429 | | /// Face. The default value is 'detection_01', if another model is needed, |
| | | 430 | | /// please explicitly specify it. Possible values include: 'detection_01', |
| | | 431 | | /// 'detection_02' |
| | | 432 | | /// </param> |
| | | 433 | | /// <param name='cancellationToken'> |
| | | 434 | | /// The cancellation token. |
| | | 435 | | /// </param> |
| | | 436 | | public static async Task<PersistedFace> AddFaceFromStreamAsync(this IPersonGroupPerson operations, string pe |
| | | 437 | | { |
| | 18 | 438 | | using (var _result = await operations.AddFaceFromStreamWithHttpMessagesAsync(personGroupId, personId, im |
| | | 439 | | { |
| | 18 | 440 | | return _result.Body; |
| | | 441 | | } |
| | 18 | 442 | | } |
| | | 443 | | |
| | | 444 | | } |
| | | 445 | | } |