visageSDK
objc_FaceData.h
1 //
2 // objc_FaceData.h
3 // SwiftWrapper
4 //
5 // Created by Visage Technologies on 27/08/2020.
6 // Copyright © 2020 Visage Technologies. All rights reserved.
7 //
8 
9 #ifndef objc_FaceData_h
10 #define objc_FaceData_h
11 
12 #import "objc_FDP.h"
13 
14 #ifdef __cplusplus
15 #include "FaceData.h"
16 #endif
17 
18 typedef struct VisageRect
19 {
20  int x;
21  int y;
22  int width;
23  int height;
24 }
25 VisageRect;
26 
29 @interface FaceData : NSObject <NSCopying> {
30  @private
31  #ifdef __cplusplus
32  VisageSDK::FaceData* faceData;
33  #endif
34 }
35 
41 @property (readonly) float trackingQuality;
42 
46 @property (readonly) float frameRate;
47 
55 @property (readonly) long timeStamp;
56 
57 /* Estimated probability of wearing a protective face mask.
58  * <i>This variable is set only while tracker is tracking (TRACK_STAT_OK) or if the detector has detected a face.</i>
59  *
60  * The probability is a value between 0.0 and 1.0.
61  *
62  */
63 @property (readonly) float hasMask;
64 
90 @property (readonly) float* faceTranslation;
91 
92 /* Translation of the head, compensated.
93  * <i>This variable is set only while tracker is tracking (TRACK_STAT_OK).</i>
94  *
95  * Translation is expressed with three coordinates x, y, z.
96  * The coordinate system is such that when looking towards the camera, the direction of x is to the
97  * left, y iz up, and z points towards the viewer. The global origin (0,0,0) is placed at the camera.
98  *
99  * Translation of the head relative to its position in the first video frame.
100  * This is compensated translation estimated by the tracker.
101  * Compensated translation values take into account the fact that the tracker
102  * uses a relatively flat face model for tracking, so the center of rotation of this model
103  * is in the front area of the head, while the anatomical center
104  * of rotation is behind, in the base of the neck. Therefore, when the rotation
105  * is applied to a 3D head model with anatomically correct center of rotation, the
106  * face naturally translates as well. When this translation is compounded with
107  * the translation values obtained from the tracker, the total resulting translation
108  * is exaggerated. To avoid this exaggerated translation of the animated head,
109  * the translation can be compensated. The compensation algorithm
110  * estimates how much the translation would be exaggerated, and makes it that much
111  * smaller. The compensated translation can directly be applied to animated head
112  * models that use the neck base as the center of rotation, and is expected to give
113  * better results than the uncompensated translation.
114  *
115  * @see faceTranslation, faceRotation
116  */
117 @property (readonly) float* faceTranslationCompensated;
118 
139 @property (readonly) float* faceRotation;
156 @property (readonly) float* faceRotationApparent;
157 
168 @property (readonly) float* gazeDirection;
169 
204 @property (readonly) float* gazeDirectionGlobal;
205 
212 @property (readonly) float* eyeClosure;
213 
220 @property (readonly) float* irisRadius;
221 
229 @property (readonly) int shapeUnitCount;
230 
242 @property (readonly) float* shapeUnits;
243 
252 @property (readonly) int actionUnitCount;
253 
263 @property (readonly) int* actionUnitsUsed;
264 
277 @property (readonly) float* actionUnits;
278 
286 @property (readonly) const char** actionUnitsNames;
287 
336 @property (readonly) FDP* featurePoints3D;
337 
383 @property (readonly) FDP* featurePoints3DRelative;
384 
425 @property (readonly) FDP* featurePoints2D;
426 
432 @property (readonly) int faceModelVertexCount;
433 
453 @property (readonly) float* faceModelVertices;
454 
464 @property (readonly) float* faceModelVerticesProjected;
465 
466 
472 @property (readonly) int faceModelTriangleCount;
473 
481 @property (readonly) int* faceModelTriangles;
482 
491 @property (readonly) float* faceModelTextureCoords;
492 
501 @property (readonly) float* faceModelTextureCoordsStatic;
502 
504 @property (readonly) int faceScale;
505 
510 @property (readonly) VisageRect faceBoundingBox;
511 
528 @property (readonly) float cameraFocus;
529 
530 //@property (readonly) ScreenSpaceGazeData gazeData;
531 
536 @property (readonly) float gazeQuality;
537 
538 #ifdef __cplusplus
539 - (FaceData *)initWithFaceData:(const VisageSDK::FaceData *)data;
540 - (VisageSDK::FaceData *)getNativeData;
541 #endif
542 - (id)copyWithZone:(NSZone *)zone;
543 @end
544 
545 #endif /* objc_FaceData_h */
Namespace.
Definition: ios_header.h:1
Face data structure, used as container for all face tracking and detection results.
Definition: FaceData.h:259
Objective-C wrapper of the VisageSDK::FDP class.
Definition: objc_FDP.h:21
Objective-C wrapper of the VisageSDK::FaceData class.
Definition: objc_FaceData.h:29