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 
75 void _openCamera(int orientation, int deviceID, int width, int height, int isMirrored);
76 
79 void _closeCamera();
80 
84 void _bindTexture(int texID);
85 
89 void _bindTextureMetal(void* texID);
90 
98 void _initTracker(string config, int numFaces);
99 
104 void _releaseTracker();
105 
110 void _track();
111 
134 void _getTrackerStatus(int[] tStatus);
135 
141 float _getTrackingQuality(int faceIndex);
142 
146 float _getFrameRate();
147 
151 int _getTimeStamp();
152 
157 int _getFaceScale(int faceIndex);
158 
167 void _getFaceBoundingBox(VsRect* rectangle, int faceIndex);
168 
180 void _getHeadTranslation(float* translation, int faceIndex);
181 
197 void _getHeadRotation(float* rotation, int faceIndex);
198 
214 void _getHeadRotationApparent(float* rotationApparent, int faceIndex);
215 
222 
229 
241 void _getFaceModelTriangles(int* triangles, int faceIndex);
242 
266 void _getFaceModelVertices(float* vertices, int faceIndex);
267 
291 void _getFaceModelVerticesProjected(float* verticesProjected, int faceIndex);
292 
316 void _getFaceModelTextureCoords(float* texCoord, int faceIndex);
317 
324 
325 
332 
333 
340 void _getGroupSizes(int* groupSizeArray, int length);
341 
350 void _getCameraInfo(out float focus, out int width, out int height);
351 
356 int _getActionUnitCount();
357 
363 string[] _getActionUnitName(int auIndex);
364 
370 bool _getActionUnitUsed(int auIndex);
371 
391 void _getActionUnitValues(float[] values, int faceIndex);
392 
414 bool _getGazeDirection(float[] direction, int faceIndex);
415 
437 bool _getGazeDirectionGlobal(float[] direction, int faceIndex);
438 
458 bool _getEyeClosure(float[] closure, int faceIndex);
459 
481 bool _getIrisRadius(float[] radius, int faceIndex);
482 
512 void _getAllFeaturePoints2D(float* featurePointArray, int length, int faceIndex);
513 
545 void _getAllFeaturePoints3D(float* featurePointArray, int length, int faceIndex);
546 
579 void _getAllFeaturePoints3DRelative(float* featurePointArray, int length, int faceIndex);
580 
618 void _getFeaturePoints2D(int N, int* groups, int* indices, float* positions, int* defined, int* detected, float* quality, int faceIndex);
619 
659 void _getFeaturePoints3D(int N, int* groups, int* indices, float* positions, int* defined, int* detected, float* quality, int faceIndex);
660 
702 void _getFeaturePoints3DRelative(int N, int* groups, int* indices, float* positions, int* defined, int* detected, float* quality, int faceIndex);
703 
714 void _setTrackerConfiguration(string trackerConfigFile, bool au_fitting_disabled, bool mesh_fitting_disabled);
715 
725 void _setIPD(float IPDvalue);
726 
734 float _getIPD();
735 
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 _closeCamera()
Closes camera and clears memory allocated by the camera API.
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.
void _getFaceModelTriangles(int *triangles, int faceIndex)
Returns triangles coordinates of the 3D face model.
void _openCamera(int orientation, int deviceID, int width, int height, int isMirrored)
Initializes camera using native OSXInput library with given orientation, camera width and height,...
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)
Binds a texture with the given native hardware texture id through OpenGL.
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.
void _bindTextureMetal(void *texID)
Binds a texture with the given native hardware texture id through OpenGL.
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.