Class InferenceImageClassifier
Definition
- Namespace:
- Tizen.Multimedia.Vision
- Assembly:
- Tizen.Multimedia.Vision.dll
Provides the ability to classify image.
C#Copypublic class InferenceImageClassifier : IDisposable
- Inheritance
-
objectInferenceImageClassifier
- Implements
-
System.IDisposable
Constructors
InferenceImageClassifier()
Initializes a new instance of the InferenceImageClassifier class.
Declaration
C#Copypublic InferenceImageClassifier()
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. |
~InferenceImageClassifier()
Finalizes an instance of the InferenceImageClassifier class.
Declaration
C#Copyprotected ~InferenceImageClassifier()
Declaration
C#Copypublic InferenceImageClassifierResult GetRequestResults()
Returns
| Type | Description |
|---|---|
| InferenceImageClassifierResult | The labels of classified image. |
Remarks
If image is not classified, Labels will be empty.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
See Also
Declaration
C#Copypublic InferenceImageClassifierResult Inference(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to classify. |
Returns
| Type | Description |
|---|---|
| InferenceImageClassifierResult | The labels of classified image. |
Remarks
Labels can be empty, if image is not classified.
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
| System.ArgumentNullException |
|
Declaration
C#Copypublic Task<InferenceImageClassifierResult> InferenceAsync(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to classify. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<TResult><InferenceImageClassifierResult> |
Remarks
Labels can be empty, if image is not classified.
This method uses about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
| System.ArgumentNullException |
|
RequestInference(MediaVisionSource)
Requests classifing image to get its labels asynchronously.
Declaration
C#Copypublic ulong RequestInference(MediaVisionSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaVisionSource | source | The image data to classify. |
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.
Labels can be empty, if image is not classified.
Note that this method could use about twice as much memory as Inference(MediaVisionSource).
Exceptions
| Type | Condition |
|---|---|
| System.ObjectDisposedException | The InferenceImageClassifier already has been disposed. |
| System.ArgumentNullException |
|