visageSDK
FDP.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 namespace VisageCSWrapper
7 {
17  struct FeaturePoint
18  {
24  int defined;
25 
32  int detected;
33 
39  float[] pos;
40 
49  float quality;
50 
56  int vert;
57 
58  float[] norm;
59  int animated;
60  int normalizing;
61  }
62 
63 
102  class FDP
103  {
108  public FDP();
109 
110 
116  public FDP(FDP featurePoints);
117 
118 
126  public int readFromFile(String name);
127 
128 
133  public void saveToFile(String fileName);
134 
135 
142  public FeaturePoint getFP(int group, int n);
143 
144 
150  public const FeaturePoint getFP(String name);
151 
152 
159  public void setFP(int group, int n, FeaturePoint f);
160 
161 
167  public void setFP (String name, FeaturePoint fp);
168 
169 
176  public float[] getFPPos (int group, int n);
177 
178 
184  public float[] getFPPos (String name);
185 
186 
193  public void setFPPos (int group, int n, float[] pos);
194 
195 
201  public void setFPPos (String name, float[] pos);
202 
203 
212  public void setFPPos (int group, int n, float x, float y, float z);
213 
214 
222  public void setFPPos (String name, float x, float y, float z);
223 
224 
231  public float getFPQuality(int group, int n);
232 
233 
239  public float getFPQuality(String name);
240 
241 
248  public void setFPQuality(int group, int n, float quality);
249 
250 
256  public void setFPQuality(String name, float quality);
257 
258 
264  public void reset();
265 
266 
273  public bool FPIsDefined(int group, int n);
274 
275 
281  public bool FPIsDefined(String name);
282 
289  public bool FPIsDetected(int group, int n);
290 
296  public bool FPIsDetected(String name);
297 
298 
302  public FeaturePoint[] ul;
303 
304 
308  public FeaturePoint[] ll;
309 
310 
317  public static void parseFPName (String name, ref int group, ref int n);
318 
319 
326  public static String getFPName (int group, int n);
327 
328 
335  public static bool FPIsValid(int group, int n);
336 
337 
344  public static bool FPIsValid (String name);
345 
346 
353  public static int GroupSize (int group);
354 
355 
357  public static int FP_START_GROUP_INDEX = 2;
358 
359 
361  public static int FP_END_GROUP_INDEX = 17;
362 
363 
365  public static int FP_NUMBER_OF_GROUPS = 16;
366  }
367 }
float getFPQuality(int group, int n)
Get the quality of a feature point specified by its group and index.
static int FP_NUMBER_OF_GROUPS
Number of groups.
Definition: FDP.cs:365
void saveToFile(String fileName)
Write feature point definitions to the FDP file, changing the FDP file name.
static bool FPIsValid(int group, int n)
Returns true if specified feature point identifier is valid.
static void parseFPName(String name, ref int group, ref int n)
Get feature point group and index from its name.
bool FPIsDefined(int group, int n)
Returns true if the feature point is defined.
static String getFPName(int group, int n)
Get feature point name from group and index.
void reset()
Resets all feature points.
float quality
Information about the accuracy of the tracking algorithm for this feature point in the current frame...
Definition: FDP.cs:49
Feature points of a face.
Definition: FDP.cs:102
static int FP_END_GROUP_INDEX
Index of the last feature point group.
Definition: FDP.cs:361
int vert
Identifier of the vertex to which the vertex corresponding to the feature point belongs.
Definition: FDP.cs:56
int readFromFile(String name)
Read from an FDP file.
FeaturePoint[] ul
Vertices that are part of the upper lip region.
Definition: FDP.cs:302
int defined
Set with regards to the 3D model used.
Definition: FDP.cs:24
FDP()
Constructor.
Feature point.
Definition: FDP.cs:17
static int GroupSize(int group)
Get the size of the specified feature point group.
void setFPPos(int group, int n, float[] pos)
Set the position of a feature point specified by its group and index.
int detected
Set with regards to the tracking algorithm used.
Definition: FDP.cs:32
float[] getFPPos(int group, int n)
Get the position of a feature point specified by its group and index.
void setFP(int group, int n, FeaturePoint f)
Set a feature specified by its group and index.
FeaturePoint getFP(int group, int n)
Get a feature point by its group and index.
float[] pos
Position.
Definition: FDP.cs:39
void setFPQuality(int group, int n, float quality)
Set the quality of a feature point specified by its group and index.
static int FP_START_GROUP_INDEX
Index of the first feature point group.
Definition: FDP.cs:357
FeaturePoint[] ll
Vertices that are part of the lower lip region.
Definition: FDP.cs:308
bool FPIsDetected(int group, int n)
Returns true if the feature point is detected.