visageSDK
Public Member Functions | Properties | List of all members
VisageCSWrapper.VisageConfiguration Class Reference

VisageConfiguration is a class used to change, apply, load and save configuration parameters used by VisageTracker. More...

Public Member Functions

 VisageConfiguration (String trackerConfigFile)
 Constructor. More...
 
 VisageConfiguration (const VisageConfiguration%configuration)
 Copy constructor. More...
 
VisageConfiguration operator= (VisageConfiguration%configuration)
 Copy assignment operator. More...
 

Properties

float CameraFocus [get, set]
 Value must be greater than zero. More...
 
float RecoveryTimeout [get, set]
 Value must be greater than or equal to zero and not a NaN value. More...
 
float[] SmoothingFactors [get, set]
 Values must not be a NaN value. More...
 
int EnableSmoothing [get, set]
 Value can be 0 or 1. More...
 
int TemporallyDenoiseInput [get, set]
 Value can be 0 or 1. More...
 
String VftDataPath [get, set]
 The path must be relative to the configuration file used for tracker initialization and not empty. More...
 
String VfdDataPath [get, set]
 The path must be relative to the configuration file used for tracker initialization and not empty. More...
 
String PrDataPath [get, set]
 The path must be relative to the configuration file used for tracker initialization and not empty. More...
 
String ErDataPath [get, set]
 The path must be relative to the configuration file used for tracker initialization and not empty. More...
 
int ProcessEyes [get, set]
 Value can only be 0 or 1. More...
 
int RefineEars [get, set]
 Value can only be 0 or 1. More...
 
float MinFaceScale [get, set]
 Value must be greater than 0.0 and less than or equal to 1.0. More...
 
float MaxFaceScale [get, set]
 Value must be greater than 0.0 and less than or equal to 1.0. More...
 
float FaceDetectorSensitivity [get, set]
 Value must be greater than 0.0 and less than or equal to 1.0. More...
 
String PoseFittingModelConfiguration [get, set]
 This function sets the .cfg (pose_fitting_model_configuration) file used for pose fitting. More...
 
String AuFittingModelConfiguration [get, set]
 This function sets the .cfg (au_fitting_model_configuration) file used for pose fitting. More...
 
String MeshFittingModelConfiguration [get, set]
 This function sets the .cfg (mesh_fitting_model_configuration) file used for pose fitting. More...
 
bool EnableAuModel [set]
 Enables or disables the use of the 3D model used to estimate action units (au_fitting_model_configuration configuration parameter). More...
 
bool EnableMeshModel [set]
 Enables or disables the use of the fine 3D mesh (mesh_fitting_model_configuration configuration parameter). More...
 
int UseVNN [get, set]
 Enables or disables the use of prototype tracking algorithm (use_vnn configuration parameter). More...
 
String ConfigurationFile [set]
 Reads and loads values from a specified configuration (*.cfg) file. More...
 

Detailed Description

VisageConfiguration is a class used to change, apply, load and save configuration parameters used by VisageTracker.

The idea behind this interface is for a user to:

As a direct result of this implementation, the VisageConfiguration default constructor is private and it is expected and encouraged that the initial copy is obtained from the VisageTracker. Alternatively, VisageConfiguration can also be constructed by passing a path to the valid .cfg file using VisageConfiguration::VisageConfiguration(String trackerConfigFile).

Setting and getting of the VisageConfiguration object is thread-safe, i.e. methods can be invoked from another thread.

Obtaining a copy of the VC object

A copy of the VisageTracker internal member can be obtained by calling VisageTracker::GetTrackerConfiguration() method as demonstrated in the code example below:

VisageTracker gVisageTracker;
//Obtain a copy of internal VisageConfiguration member
VisageConfiguration cfg = gVisageTracker.GetTrackerConfiguration();

Applying changes on the VC object

Changing configuration parameters is realized by modifying the values of member properties of the VisageConfiguration class. Most properties implement both get and set accessors, though some, like action unit counts, only implement a getter. After a local copy of the configuration is obtained, parameters can be changed by assigning values to the appropriate member.

Setter functions perform input validation to verify that the value passed to the function is: a) within a certain range, b) not empty, or c) otherwise valid. If the value passed as an argument is invalid, the setter function will throw an exception. Exception types are as follows:

A detailed description of each particular configuration parameter, including valid ranges and other specifics, are available in the VisageTracker Configuration Manual.

Parameters of the VisageConfiguration class can be divided into two categories:

Following code example demonstrates a modification of primitive type parameters by modifying the camera_focus configuration parameter:

//Obtain a copy of internal VisageConfiguration member
VisageConfiguration cfg = gVisageTracker.GetTrackerConfiguration();
try {
cfg.setCameraFocus(5.0f);
}
catch(Exception ex) {
//Handle the exception in some way
System.Console.WriteLine(ex.Message);
}

Following code example demonstrates a modification of array-type parameters by modifying the smoothing_factors configuration parameter:

//Obtain a copy of internal VisageConfiguration member
VisageConfiguration cfg = gVisageTracker.GetTrackerConfiguration();
float[] sf = cfg.SmoothingFactors;
sf[0] = 2.0f;
try {
cfg.SmoothingFactors = sf;
}
catch(Exception ex) {
//Handle the exception in some way
System.Console.WriteLine(ex.Message);
}

Once the changes have been applied, the local copy needs to be applied to the tracker for the changes to take effect.

Sending the object to VisageTracker

VisageTracker provides an overloaded method VisageTracker::SetTrackerConfiguration(VisageConfiguration configuration). The function takes a handle to a VisageConfiguration object and copies the configuration parameters internally. Usage is demonstrated in the code example below:

// Assuming VisageConfiguration (cfg) object has been obtained as above
gVisageTracker.SetTrackerConfiguration(cfg);

The parameters' values of the sent configuration object will be used in the next tracking session (i.e. when VisageTracker::Track() is called).

Definition at line 101 of file VisageConfiguration.cs.

Constructor & Destructor Documentation

VisageCSWrapper.VisageConfiguration.VisageConfiguration ( String  trackerConfigFile)

Constructor.

Creates a new instance of the VisageConfiguration class by reading a specified configuration (*.cfg) file.

Parameters
trackerConfigFilePath to a specified configuration (*.cfg) file.
VisageCSWrapper.VisageConfiguration.VisageConfiguration ( const VisageConfiguration%  configuration)

Copy constructor.

Creates a new instance of the VisageConfiguration class by copying an already existing instance.

Parameters
configurationReference to pre-existing VisageConfiguration object.

Member Function Documentation

VisageConfiguration VisageCSWrapper.VisageConfiguration.operator= ( VisageConfiguration%  configuration)

Copy assignment operator.

Copies the values of one VisageConfiguration object to another.

Parameters
configurationVisageConfiguration object to copy values from.

Property Documentation

String VisageCSWrapper.VisageConfiguration.AuFittingModelConfiguration
getset

This function sets the .cfg (au_fitting_model_configuration) file used for pose fitting.

The path to the model configuration must be relative to the configuration file used for tracker initialization. The model will be disabled if the passed string is empty ("") or "none".

NOTE: Changing the model configuration affects the sizes of arrays in the FaceData object populated with values from the model file.

Definition at line 209 of file VisageConfiguration.cs.

float VisageCSWrapper.VisageConfiguration.CameraFocus
getset

Value must be greater than zero.

Definition at line 126 of file VisageConfiguration.cs.

String VisageCSWrapper.VisageConfiguration.ConfigurationFile
set

Reads and loads values from a specified configuration (*.cfg) file.

Definition at line 239 of file VisageConfiguration.cs.

bool VisageCSWrapper.VisageConfiguration.EnableAuModel
set

Enables or disables the use of the 3D model used to estimate action units (au_fitting_model_configuration configuration parameter).

Definition at line 223 of file VisageConfiguration.cs.

bool VisageCSWrapper.VisageConfiguration.EnableMeshModel
set

Enables or disables the use of the fine 3D mesh (mesh_fitting_model_configuration configuration parameter).

Definition at line 228 of file VisageConfiguration.cs.

int VisageCSWrapper.VisageConfiguration.EnableSmoothing
getset

Value can be 0 or 1.

Definition at line 141 of file VisageConfiguration.cs.

String VisageCSWrapper.VisageConfiguration.ErDataPath
getset

The path must be relative to the configuration file used for tracker initialization and not empty.

Definition at line 166 of file VisageConfiguration.cs.

float VisageCSWrapper.VisageConfiguration.FaceDetectorSensitivity
getset

Value must be greater than 0.0 and less than or equal to 1.0.

Definition at line 191 of file VisageConfiguration.cs.

float VisageCSWrapper.VisageConfiguration.MaxFaceScale
getset

Value must be greater than 0.0 and less than or equal to 1.0.

Definition at line 186 of file VisageConfiguration.cs.

String VisageCSWrapper.VisageConfiguration.MeshFittingModelConfiguration
getset

This function sets the .cfg (mesh_fitting_model_configuration) file used for pose fitting.

The path to the model configuration must be relative to the configuration file used for tracker initialization. The model will be disabled if the passed string is empty ("") or "none".

NOTE: Changing the model configuration affects the sizes of arrays in the FaceData object populated with values from the model file.

Definition at line 218 of file VisageConfiguration.cs.

float VisageCSWrapper.VisageConfiguration.MinFaceScale
getset

Value must be greater than 0.0 and less than or equal to 1.0.

Definition at line 181 of file VisageConfiguration.cs.

String VisageCSWrapper.VisageConfiguration.PoseFittingModelConfiguration
getset

This function sets the .cfg (pose_fitting_model_configuration) file used for pose fitting.

The path to the model configuration must be relative to the configuration file used for tracker initialization. The model will be disabled if the passed string is empty ("") or "none".

NOTE: Changing the model configuration affects the sizes of arrays in the FaceData object populated with values from the model file.

Definition at line 200 of file VisageConfiguration.cs.

String VisageCSWrapper.VisageConfiguration.PrDataPath
getset

The path must be relative to the configuration file used for tracker initialization and not empty.

Definition at line 161 of file VisageConfiguration.cs.

int VisageCSWrapper.VisageConfiguration.ProcessEyes
getset

Value can only be 0 or 1.

Definition at line 171 of file VisageConfiguration.cs.

float VisageCSWrapper.VisageConfiguration.RecoveryTimeout
getset

Value must be greater than or equal to zero and not a NaN value.

Definition at line 131 of file VisageConfiguration.cs.

int VisageCSWrapper.VisageConfiguration.RefineEars
getset

Value can only be 0 or 1.

Definition at line 176 of file VisageConfiguration.cs.

float [] VisageCSWrapper.VisageConfiguration.SmoothingFactors
getset

Values must not be a NaN value.

Definition at line 136 of file VisageConfiguration.cs.

int VisageCSWrapper.VisageConfiguration.TemporallyDenoiseInput
getset

Value can be 0 or 1.

Definition at line 146 of file VisageConfiguration.cs.

int VisageCSWrapper.VisageConfiguration.UseVNN
getset

Enables or disables the use of prototype tracking algorithm (use_vnn configuration parameter).

Value can be 0, 1 or 2.

Definition at line 234 of file VisageConfiguration.cs.

String VisageCSWrapper.VisageConfiguration.VfdDataPath
getset

The path must be relative to the configuration file used for tracker initialization and not empty.

Definition at line 156 of file VisageConfiguration.cs.

String VisageCSWrapper.VisageConfiguration.VftDataPath
getset

The path must be relative to the configuration file used for tracker initialization and not empty.

Definition at line 151 of file VisageConfiguration.cs.


The documentation for this class was generated from the following file: