Class InferenceFaceDetector
Definition
- Namespace:
- Tizen.Multimedia.Vision
- Assembly:
- Tizen.Multimedia.Vision.dll
Provides the ability to detect faces.
C#Copypublic class InferenceFaceDetector : IDisposable
- Inheritance
-
objectInferenceFaceDetector
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic InferenceFaceDetector()
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | The required features are not supported. |
Methods
Declaration
C#Copypublic void Dispose()
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Declaration
C#Copyprotected ~InferenceFaceDetector()
GetRequestResults()
Gets the bounding boxes as a result of RequestInference(MediaVisionSource).
Declaration
C#Copypublic InferenceFaceDetectorResult GetRequestResults()
Returns
| Type | Description |
|---|---|
| InferenceFaceDetectorResult | The bounding boxes of detected face. |
Remarks
If there's no detected face, BoundingBoxes will be empty.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFaceDetector already has been disposed. |
See Also
Declaration
C#Copypublic InferenceFaceDetectorResult Inference(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to detect faces. |
Returns
| Type | Description |
|---|---|
| InferenceFaceDetectorResult | The BoundingBoxes of detected face. |
Remarks
BoundingBoxes can be empty, if there's no detected face.
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFaceDetector already has been disposed. |
| System.ArgumentNullException |
|
Declaration
C#Copypublic Task<InferenceFaceDetectorResult> InferenceAsync(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to detect faces. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<TResult><InferenceFaceDetectorResult> |
Remarks
BoundingBoxes can be empty, if there's no detected face.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFaceDetector already has been disposed. |
| System.ArgumentNullException |
|
RequestInference(MediaVisionSource)
Requests detecting faces to get their bounding boxes asynchronously.
Declaration
C#Copypublic ulong RequestInference(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to detect faces. |
Returns
| Type | Description |
|---|---|
| ulong | The request ID that indicates the order of requests. |
Remarks
This function does not guarantee that inference is done when this method returns. The user can get the result by using GetRequestResults().
If the user calls this method again before the previous one is finished internally, the call will be ignored.
BoundingBoxes can be empty, if there's no detected face.
Note that this method could use about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFaceDetector already has been disposed. |
| System.ArgumentNullException |
|