Class FaceTrackingModel

    Definition

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

    Represents the face tracking model.

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

    Constructors

    View Source

    FaceTrackingModel()

    Initializes a new instance of the FaceTrackingModel class.

    Declaration
    public FaceTrackingModel()
    Exceptions
    Type Condition
    System.NotSupportedException

    The feature is not supported.

    View Source

    FaceTrackingModel(string)

    Initializes a new instance of the FaceTrackingModel class with the specified path.

    Declaration
    public FaceTrackingModel(string modelPath)
    Parameters
    Type Name Description
    string modelPath

    Path to the model to load.

    Remarks

    Models saved by Save(string) can be loaded.

    Exceptions
    Type Condition
    System.ArgumentNullException

    modelPath is null.

    System.IO.FileNotFoundException

    modelPath is invalid.

    System.NotSupportedException

    The feature is not supported.
    -or-
    modelPath is not supported format.

    System.UnauthorizedAccessException

    No permission to access the specified file.

    See Also
    Save(string)

    Methods

    View Source

    Dispose()

    Releases all the resources used by the FaceTrackingModel object.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Releases the resources used by the FaceTrackingModel object.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true to release both managed and unmanaged resources; otherwise false to release only unmanaged resources.

    View Source

    ~FaceTrackingModel()

    Finalizes an instance of the FaceTrackingModel class.

    Declaration
    protected ~FaceTrackingModel()
    View Source

    Prepare(MediaVisionSource, Quadrangle)

    Initializes the tracking model by the location of the face to be tracked.

    It is usually called once after the tracking model is created, and each time before tracking is started for the new sequence of sources, which is not the direct continuation of the sequence for which tracking has been performed before. But, it is allowed to call it between tracking sessions to allow Media Vision start to track more accurately.

    Declaration
    public void Prepare(MediaVisionSource source, Quadrangle region)
    Parameters
    Type Name Description
    MediaVisionSource source

    The source where face location is specified. Usually it is the first frame of the video or the first image in the continuous image sequence planned to be used for tracking.

    Quadrangle region

    The region determining position of the face to be tracked on the source. If null, then tracking model will try to find previously tracked face by itself.

    Remarks

    region needs to be the position of the face to be tracked when called first time for the tracking model. region is fitted to the valid region of source if region has invalid points.

    Exceptions
    Type Condition
    System.ArgumentNullException

    source is null.

    System.ObjectDisposedException

    The FaceTrackingModel has already been disposed of.
    -or-
    source has already bean disposed of.

    View Source

    Save(string)

    Saves the tracking model to the file.

    Declaration
    public void Save(string path)
    Parameters
    Type Name Description
    string path

    Path to the file to save the model.

    Exceptions
    Type Condition
    System.ArgumentNullException

    path is null.

    System.UnauthorizedAccessException

    No permission to write to the specified path.

    System.ObjectDisposedException

    The FaceTrackingModel has already been disposed of.

    System.IO.DirectoryNotFoundException

    The directory for path does not exist.

    Implements

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