visageSDK
docs_VisageTrackerUnityPlugin.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 
6 
41 
53 void _initializeLicense(string license);
54 
60 void _grabFrame();
61 
62 
70 void _initTracker(string config, int numFaces);
71 
76 void _releaseTracker();
77 
82 void _track();
83 
106 void _getTrackerStatus(int[] tStatus);
107 
113 float _getTrackingQuality(int faceIndex);
114 
118 float _getFrameRate();
119 
123 int _getTimeStamp();
124 
129 int _getFaceScale(int faceIndex);
130 
139 void _getFaceBoundingBox(VsRect* rectangle, int faceIndex);
140 
152 void _getHeadTranslation(float* translation, int faceIndex);
153 
169 void _getHeadRotation(float* rotation, int faceIndex);
170 
186 void _getHeadRotationApparent(float* rotationApparent, int faceIndex);
187 
194 
201 
213 void _getFaceModelTriangles(int* triangles, int faceIndex);
214 
238 void _getFaceModelVertices(float* vertices, int faceIndex);
239 
263 void _getFaceModelVerticesProjected(float* verticesProjected, int faceIndex);
264 
288 void _getFaceModelTextureCoords(float* texCoord, int faceIndex);
289 
296 
297 
304 
305 
312 void _getGroupSizes(int* groupSizeArray, int length);
313 
322 void _getCameraInfo(out float focus, out int width, out int height);
323 
328 int _getActionUnitCount();
329 
335 string[] _getActionUnitName(int auIndex);
336 
342 bool _getActionUnitUsed(int auIndex);
343 
363 void _getActionUnitValues(float[] values, int faceIndex);
364 
386 bool _getGazeDirection(float[] direction, int faceIndex);
387 
409 bool _getGazeDirectionGlobal(float[] direction, int faceIndex);
410 
430 bool _getEyeClosure(float[] closure, int faceIndex);
431 
453 bool _getIrisRadius(float[] radius, int faceIndex);
454 
484 void _getAllFeaturePoints2D(float* featurePointArray, int length, int faceIndex);
485 
517 void _getAllFeaturePoints3D(float* featurePointArray, int length, int faceIndex);
518 
551 void _getAllFeaturePoints3DRelative(float* featurePointArray, int length, int faceIndex);
552 
590 void _getFeaturePoints2D(int N, int* groups, int* indices, float* positions, int* defined, int* detected, float* quality, int faceIndex);
591 
631 void _getFeaturePoints3D(int N, int* groups, int* indices, float* positions, int* defined, int* detected, float* quality, int faceIndex);
632 
674 void _getFeaturePoints3DRelative(int N, int* groups, int* indices, float* positions, int* defined, int* detected, float* quality, int faceIndex);
675 
686 void _setTrackerConfiguration(string trackerConfigFile, bool au_fitting_disabled, bool mesh_fitting_disabled);
687 
697 void _setIPD(float IPDvalue);
698 
706 float _getIPD();
707 
712 bool _frameChanged();
716 void _bindTexture(int texID);
717 
void _getAllFeaturePoints3DRelative(float *featurePointArray, int length, int faceIndex)
Returns for all feature points the position in 3D coordinates relative to the face origin...
int _getFP_END_GROUP_INDEX()
Index of the last feature point group.
void _getFaceBoundingBox(VsRect *rectangle, int faceIndex)
Returns the face bounding box for the given faceIndex.
void _getFaceModelTextureCoords(float *texCoord, int faceIndex)
Returns texture coordinates.
void _initializeLicense(string license)
Initializes the license.
void _getFaceModelVertices(float *vertices, int faceIndex)
Returns vertex coordinates of the 3D face model.
void _track()
Performs face tracking on current frame.
bool _getActionUnitUsed(int auIndex)
Returns true if the action unit is used.
int _getFaceScale(int faceIndex)
Returns size of face bounding box in pixels for the given faceIndex.
void _initTracker(string config, int numFaces)
Initialises the tracker with configuration file and a desired number of tracked faces.
void _getFaceModelVerticesProjected(float *verticesProjected, int faceIndex)
Returns projected (image space) vertex coordinates.
bool _getGazeDirectionGlobal(float[] direction, int faceIndex)
Returns the global gaze direction for the given faceIndex.
void _getHeadRotation(float *rotation, int faceIndex)
Returns the current head rotation in radians for the given faceIndex.
int _getFP_START_GROUP_INDEX()
Index of the first feature point group.
float _getTrackingQuality(int faceIndex)
Estimated tracking quality for the current frame for the given faceIndex.
float _getFrameRate()
Returns the frame rate of the tracker, in frames per second, measured over last 10 frames...
void _releaseTracker()
Releases memory allocated by the tracker in the _initTracker() function.
void _getHeadRotationApparent(float *rotationApparent, int faceIndex)
Returns the current apparent head rotation in radians for the given faceIndex.
void _getCameraInfo(out float focus, out int width, out int height)
Returns camera info.
bool _getGazeDirection(float[] direction, int faceIndex)
Returns the gaze direction for the given faceIndex.
float _getIPD()
Returns the current inter pupillary distance (IPD) setting.
void _getAllFeaturePoints2D(float *featurePointArray, int length, int faceIndex)
Returns for all feature points the position in normalized 2D screen coordinates, indicator whether th...
void _getAllFeaturePoints3D(float *featurePointArray, int length, int faceIndex)
Returns for all feature points the global 3D position in meters, indicator whether the point is defin...
void _setTrackerConfiguration(string trackerConfigFile, bool au_fitting_disabled, bool mesh_fitting_disabled)
Sets tracking configuration.
void _getTrackerStatus(int[] tStatus)
Returns tracker status.
void _getHeadTranslation(float *translation, int faceIndex)
Returns the current head translation in meters for the given faceIndex.
void _setIPD(float IPDvalue)
Sets the inter pupillary distance.
bool _frameChanged()
Returns information if frame parameters have changed, e.g.
void _getFaceModelTriangles(int *triangles, int faceIndex)
Returns triangles coordinates of the 3D face model.
void _getFeaturePoints3D(int N, int *groups, int *indices, float *positions, int *defined, int *detected, float *quality, int faceIndex)
Returns the global 3D feature point position in meters, indicator whether the point is defined...
int _getFaceModelVertexCount()
Returns number of vertices in the 3D face model.
void _bindTexture(int texID)
This functions binds a texture with the given native hardware texture id.
bool _getIrisRadius(float[] radius, int faceIndex)
Returns iris radius values in px for the given faceIndex.
void _grabFrame()
Grabs current frame from the camera.
int _getTimeStamp()
Returns timestamp of the current video frame, in milliseconds, measured from the moment when tracking...
string [] _getActionUnitName(int auIndex)
Returns the name of the action unit with the specified index.
int _getActionUnitCount()
Returns the action unit count.
int _getFaceModelTriangleCount()
Returns number of triangles in the 3D face model.
void _getGroupSizes(int *groupSizeArray, int length)
Get the size of all feature point groups.
void _getFeaturePoints2D(int N, int *groups, int *indices, float *positions, int *defined, int *detected, float *quality, int faceIndex)
Returns the feature points position in normalized 2D screen coordinates, indicator whether the point ...
bool _getEyeClosure(float[] closure, int faceIndex)
Returns eye closure value for the given faceIndex.
void _getFeaturePoints3DRelative(int N, int *groups, int *indices, float *positions, int *defined, int *detected, float *quality, int faceIndex)
Returns the 3D coordinates relative to the face origin, placed at the center between eyes in meters...
void _getActionUnitValues(float[] values, int faceIndex)
Returns all action unit values.