Class InferenceImageClassifier

    Definition

    Namespace:
    Tizen.Multimedia.Vision
    Assembly:
    Tizen.Multimedia.Vision.dll

    Provides the ability to classify image.

    public class InferenceImageClassifier : IDisposable
    Inheritance
    object
    InferenceImageClassifier
    Implements
    System.IDisposable

    Constructors

    View Source

    InferenceImageClassifier()

    Initializes a new instance of the InferenceImageClassifier class.

    Declaration
    public InferenceImageClassifier()
    Exceptions
    Type Condition
    System.NotSupportedException

    The required features are not supported.

    Methods

    View Source

    Dispose()

    Releases all resources used by the InferenceImageClassifier.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Releases the unmanaged resources used by the InferenceImageClassifier.

    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.

    View Source

    ~InferenceImageClassifier()

    Finalizes an instance of the InferenceImageClassifier class.

    Declaration
    protected ~InferenceImageClassifier()
    View Source

    GetRequestResults()

    Gets the labels as a result of RequestInference(MediaVisionSource).

    Declaration
    public 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
    RequestInference(MediaVisionSource)
    View Source

    Inference(MediaVisionSource)

    Classifies image synchronously.

    Declaration
    public 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

    source is null.

    View Source

    InferenceAsync(MediaVisionSource)

    Classifies image asynchronously.

    Declaration
    public 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

    source is null.

    View Source

    RequestInference(MediaVisionSource)

    Requests classifing image to get its labels asynchronously.

    Declaration
    public 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

    source is null.

    See Also
    GetRequestResults()

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX