Class ImageObject

Definition

Namespace:
Tizen.Multimedia.Vision
Assembly:
Tizen.Multimedia.Vision.dll
API Level:
4
Feature:
http://tizen.org/feature/vision.image_recognition

Represents an image object.

C#
Copy
public class ImageObject : IDisposable
Inheritance
System.Object
ImageObject
Implements
System.IDisposable

Constructors

View Source

ImageObject()

Initializes a new instance of the ImageObject class.

Declaration
C#
Copy
public ImageObject()
Exceptions
Type Condition
System.NotSupportedException

The feature is not supported.

API Level: 4
View Source

ImageObject(String)

Initializes a new instance of the ImageObject class from the specified file.

Declaration
C#
Copy
public ImageObject(string path)
Parameters
Type Name Description
System.String path

Path to the image object to load.

Remarks

ImageObject has been saved by Save(String) can be loaded.

Exceptions
Type Condition
System.ArgumentNullException

path is null.

System.IO.FileNotFoundException

path is invalid.

System.NotSupportedException

The feature is not supported.
-or-
path is not supported file.

UnauthorizedAccessException

No permission to access the specified file.

See Also
API Level: 4

Properties

View Source

RecognitionRate

Gets a value that determines how well an image object can be recognized.

Declaration
C#
Copy
public double RecognitionRate { get; }
Property Value
Type Description
System.Double

Recognition rate determines how well an image object can be recognized. This value can be from 0 to 1. If the recognition rate is 0 object can not be recognized and the bigger it is the more likely to recognize the object.

Remarks

If recognition rate is too low, try to use another image or change some configuration parameters and fill the image object again.

Exceptions
Type Condition
ObjectDisposedException

The ImageObject has already been disposed of.

API Level: 4

Methods

View Source

Dispose()

Releases all the resources used by the ImageObject object.

Declaration
C#
Copy
public void Dispose()
API Level: 4
View Source

Dispose(Boolean)

Releases the resources used by the ImageObject object.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

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

API Level: 4
View Source

Fill(MediaVisionSource)

Fills the image object.
Extracts data from source image which will be needed for recognition of depicted object.

Declaration
C#
Copy
public void Fill(MediaVisionSource source)
Parameters
Type Name Description
MediaVisionSource source

The source image where image object is depicted.

Exceptions
Type Condition
System.ArgumentNullException

source is null.

ObjectDisposedException

The ImageObject has already been disposed of.
-or-
source has already been disposed of.

API Level: 4
View Source

Fill(MediaVisionSource, Rectangle)

Fills the image object.
Extracts data from source image which will be needed for recognition of depicted object in location.

Declaration
C#
Copy
public void Fill(MediaVisionSource source, Rectangle rect)
Parameters
Type Name Description
MediaVisionSource source

The source image where image object is depicted.

Rectangle rect

Rectangular bound of the image object on the source image.

Exceptions
Type Condition
System.ArgumentNullException

source is null.

ObjectDisposedException

The ImageObject has already been disposed of.
-or-
source has already been disposed of.

API Level: 4
View Source

Fill(MediaVisionSource, ImageFillConfiguration)

Fills the image object.
Extracts data from source image which will be needed for recognition of depicted object.

Declaration
C#
Copy
public void Fill(MediaVisionSource source, ImageFillConfiguration config)
Parameters
Type Name Description
MediaVisionSource source

The source image where image object is depicted.

ImageFillConfiguration config

The configuration used for extract recognition data from source. This value can be null.

Exceptions
Type Condition
System.ArgumentNullException

source is null.

ObjectDisposedException

The ImageObject has already been disposed of.
-or-
source has already been disposed of.
-or-
config has already been disposed of.

API Level: 4
View Source

Fill(MediaVisionSource, ImageFillConfiguration, Rectangle)

Fills the image object.
Extracts data from source image which will be needed for recognition of depicted object in location.

Declaration
C#
Copy
public void Fill(MediaVisionSource source, ImageFillConfiguration config, Rectangle rect)
Parameters
Type Name Description
MediaVisionSource source

The source image where image object is depicted.

ImageFillConfiguration config

The configuration used for extract recognition data from source. This value can be null.

Rectangle rect

Rectangular bound of the image object on the source image.

Exceptions
Type Condition
System.ArgumentNullException

source is null.

ObjectDisposedException

The ImageObject has already been disposed of.
-or-
source has already been disposed of.
-or-
config has already been disposed of.

API Level: 4
View Source

Finalize()

Finalizes an instance of the ImageObject class.

Declaration
C#
Copy
protected void Finalize()
View Source

GetLabel()

Gets the label for the image object.

Declaration
C#
Copy
public int? GetLabel()
Returns
Type Description
System.Nullable<Int32>

The label value if the ImageObject has label, otherwise null.

Exceptions
Type Condition
ObjectDisposedException

The ImageObject has already been disposed of.

See Also
API Level: 4
View Source

Save(String)

Saves the image object.

Declaration
C#
Copy
public void Save(string path)
Parameters
Type Name Description
System.String path

Path to the file to save the model.

Exceptions
Type Condition
System.ArgumentNullException

path is null.

UnauthorizedAccessException

No permission to write to the specified path.

ObjectDisposedException

The ImageObject has already been disposed of.

DirectoryNotFoundException

The directory for path does not exist.

API Level: 4
View Source

SetLabel(Int32)

Sets the label for the ImageObject.

Declaration
C#
Copy
public void SetLabel(int label)
Parameters
Type Name Description
Int32 label

The label which will be assigned to the image object.

See Also
API Level: 4

Implements

System.IDisposable