Class InferenceFacialLandmarkDetector
Definition
- Namespace:
- Tizen.Multimedia.Vision
- Assembly:
- Tizen.Multimedia.Vision.dll
Provides the ability to detect facial landmarks.
public class InferenceFacialLandmarkDetector : IDisposable
- Inheritance
-
objectInferenceFacialLandmarkDetector
- Implements
-
System.IDisposable
Constructors
View SourceInferenceFacialLandmarkDetector()
Initializes a new instance of the InferenceFacialLandmarkDetector class.
Declaration
public InferenceFacialLandmarkDetector()
Exceptions
| Type | Condition |
|---|---|
| System.NotSupportedException | The required features are not supported. |
Methods
View SourceDispose()
Releases all resources used by the InferenceFacialLandmarkDetector.
Declaration
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by the InferenceFacialLandmarkDetector.
Declaration
protected 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. |
~InferenceFacialLandmarkDetector()
Finalizes an instance of the InferenceFacialLandmarkDetector class.
Declaration
protected ~InferenceFacialLandmarkDetector()
GetRequestResults()
Gets the points as a result of RequestInference(MediaVisionSource).
Declaration
public InferenceFacialLandmarkDetectorResult GetRequestResults()
Returns
| Type | Description |
|---|---|
| InferenceFacialLandmarkDetectorResult | The points of detected facial landmarks. |
Remarks
If there's no detected facial landmark, Points will be empty.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFacialLandmarkDetector already has been disposed. |
See Also
View SourceInference(MediaVisionSource)
Detects facial landmarks on the source image synchronously.
Declaration
public InferenceFacialLandmarkDetectorResult Inference(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to detect facial landmarks. |
Returns
| Type | Description |
|---|---|
| InferenceFacialLandmarkDetectorResult | The coordinates of detected facial landmarks. |
Remarks
Points can be empty, if there's no detected facial landmark.
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFacialLandmarkDetector already has been disposed. |
| System.ArgumentNullException |
|
InferenceAsync(MediaVisionSource)
Detects facial landmarks on the source image asynchronously.
Declaration
public Task<InferenceFacialLandmarkDetectorResult> InferenceAsync(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to detect facial landmarks. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<TResult><InferenceFacialLandmarkDetectorResult> |
Remarks
Points can be empty, if there's no detected facial landmark.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFacialLandmarkDetector already has been disposed. |
| System.ArgumentNullException |
|
RequestInference(MediaVisionSource)
Requests detecting facial landmarks to get their points asynchronously.
Declaration
public ulong RequestInference(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to detect facial landmarks. |
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.
Points can be empty, if there's no detected facial landmark.
Note that this method could use about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceFacialLandmarkDetector already has been disposed. |
| System.ArgumentNullException |
|