Class FaceRecognitionModel
Definition
- Namespace:
- Tizen.Multimedia.Vision
- Assembly:
- Tizen.Multimedia.Vision.dll
- API Level:
- 4
- Feature:
- http://tizen.org/feature/vision.face_recognition
Represents the face recognition model interface.
C#Copypublic class FaceRecognitionModel : IDisposable
- Inheritance
-
FaceRecognitionModel
Constructors
Declaration
C#Copypublic FaceRecognitionModel()
API Level: 4
FaceRecognitionModel(String)
Initializes a new instance of the FaceRecognitionModel class with the specified path.
Declaration
C#Copypublic FaceRecognitionModel(string modelPath)
Parameters
Type | Name | Description |
---|---|---|
String | modelPath | Path to the model to load. |
Remarks
Models saved by Save(String) can be loaded.
See Also
API Level: 4
Properties
Declaration
C#Copypublic int[] Labels { get; }
Property Value
Type | Description |
---|---|
Int32[] |
API Level: 4
Methods
Add(MediaVisionSource, Int32)
Adds the face image example to be used for face recognition model learning.
Declaration
C#Copypublic void Add(MediaVisionSource source, int label)
Parameters
Type | Name | Description |
---|---|---|
MediaVisionSource | source | The MediaVisionSource that contains face image. |
Int32 | label | The label that identifies face for which example is adding. Specify the same labels for the face images of a single person when calling this method. Has to be unique for each face. |
See Also
API Level: 4
Add(MediaVisionSource, Int32, Rectangle)
Adds the face image example to be used for face recognition model learning.
Declaration
C#Copypublic void Add(MediaVisionSource source, int label, Rectangle area)
Parameters
Type | Name | Description |
---|---|---|
MediaVisionSource | source | The MediaVisionSource that contains face image. |
Int32 | label | The label that identifies face for which example is adding. Specify the same labels for the face images of a single person when calling this method. Has to be unique for each face. |
Rectangle | area | The rectangular region of the face image at the source image. |
See Also
API Level: 4
Declaration
C#Copypublic void Dispose()
API Level: 4
Declaration
C#Copyprotected 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
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic void Learn()
Remarks
Before you start the learning process, face recognition models have to be filled with the training data - face image examples. These examples have to be provided by Add(MediaVisionSource, Int32) or Add(MediaVisionSource, Int32, Rectangle). Recognition accuracy is usually increased when the different examples of the identical faces are added more and more. But it depends on the used learning algorithm.
API Level: 4
Learn(FaceRecognitionConfiguration)
Learns the face recognition model with FaceRecognitionConfiguration.
Declaration
C#Copypublic void Learn(FaceRecognitionConfiguration config)
Parameters
Type | Name | Description |
---|---|---|
FaceRecognitionConfiguration | config | The configuration used for learning of the recognition models. This value can be null. |
Remarks
Before you start the learning process, face recognition models have to be filled with the training data - face image examples. These examples have to be provided by Add(MediaVisionSource, Int32) or Add(MediaVisionSource, Int32, Rectangle). Recognition accuracy is usually increased when the different examples of the identical faces are added more and more. But it depends on the used learning algorithm.
API Level: 4
Declaration
C#Copypublic bool Remove(int label)
Parameters
Type | Name | Description |
---|---|---|
Int32 | label | The label that identifies face for which examples will be removed. |
Returns
Type | Description |
---|---|
Boolean | true if the examples are successfully removed; otherwise, false if there is no example labeled with the specified label. |
API Level: 4
Declaration
C#Copypublic void Reset()
API Level: 4
Declaration
C#Copypublic void Save(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | Path to the file to save the model. |