LargeFaceListClient.AddFace Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddFace(RequestContent, IEnumerable<Int32>, String, String, RequestContext) |
[Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces.
|
AddFace(BinaryData, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken) |
Add a face to a specified Large Face List, up to 1,000,000 faces. |
AddFace(Uri, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken) |
Add a face to a specified Large Face List, up to 1,000,000 faces. |
AddFace(RequestContent, IEnumerable<Int32>, String, String, RequestContext)
- Source:
- LargeFaceListClient.cs
[Protocol Method] Add a face to a specified Large Face List, up to 1,000,000 faces.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler AddFace(BinaryData, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response AddFace (Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable<int> targetFace = default, string detectionModel = default, string userData = default, Azure.RequestContext context = default);
abstract member AddFace : Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> Azure.Response
override this.AddFace : Azure.Core.RequestContent * seq<int> * string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function AddFace (content As RequestContent, Optional targetFace As IEnumerable(Of Integer) = Nothing, Optional detectionModel As String = Nothing, Optional userData As String = Nothing, Optional context As RequestContext = Nothing) As Response
Parameters
- content
- RequestContent
The content to send as the body of the request.
- targetFace
- IEnumerable<Int32>
A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'.
- detectionModel
- String
The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'. Allowed values: "detection_01" | "detection_02" | "detection_03".
- userData
- String
User-provided data attached to the face. The size limit is 1K.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
content
is null.
Service returned a non-success status code.
Applies to
AddFace(BinaryData, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken)
- Source:
- LargeFaceListClient.cs
Add a face to a specified Large Face List, up to 1,000,000 faces.
public virtual Azure.Response<Azure.AI.Vision.Face.AddFaceResult> AddFace (BinaryData imageContent, System.Collections.Generic.IEnumerable<int> targetFace = default, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default, string userData = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFace : BinaryData * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
override this.AddFace : BinaryData * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
Public Overridable Function AddFace (imageContent As BinaryData, Optional targetFace As IEnumerable(Of Integer) = Nothing, Optional detectionModel As Nullable(Of FaceDetectionModel) = Nothing, Optional userData As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AddFaceResult)
Parameters
- imageContent
- BinaryData
The image to be analyzed.
- targetFace
- IEnumerable<Int32>
A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'.
- detectionModel
- Nullable<FaceDetectionModel>
The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'.
- userData
- String
User-provided data attached to the face. The size limit is 1K.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
imageContent
is null.
Remarks
Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face for more details.
Applies to
AddFace(Uri, IEnumerable<Int32>, Nullable<FaceDetectionModel>, String, CancellationToken)
- Source:
- LargeFaceListClient.cs
Add a face to a specified Large Face List, up to 1,000,000 faces.
public virtual Azure.Response<Azure.AI.Vision.Face.AddFaceResult> AddFace (Uri uri, System.Collections.Generic.IEnumerable<int> targetFace = default, Azure.AI.Vision.Face.FaceDetectionModel? detectionModel = default, string userData = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFace : Uri * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
override this.AddFace : Uri * seq<int> * Nullable<Azure.AI.Vision.Face.FaceDetectionModel> * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.AddFaceResult>
Public Overridable Function AddFace (uri As Uri, Optional targetFace As IEnumerable(Of Integer) = Nothing, Optional detectionModel As Nullable(Of FaceDetectionModel) = Nothing, Optional userData As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AddFaceResult)
Parameters
- uri
- Uri
URL of input image.
- targetFace
- IEnumerable<Int32>
A face rectangle to specify the target face to be added to a person, in the format of 'targetFace=left,top,width,height'.
- detectionModel
- Nullable<FaceDetectionModel>
The 'detectionModel' associated with the detected faceIds. Supported 'detectionModel' values include 'detection_01', 'detection_02' and 'detection_03'. The default value is 'detection_01'.
- userData
- String
User-provided data attached to the face. The size limit is 1K.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
uri
is null.
Remarks
Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/add-large-face-list-face-from-url for more details.
Applies to
Azure SDK for .NET