3DiVi Face SDK  3.24.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
RawSample.h
1 #import <Foundation/Foundation.h>
2 #import "RawImage.h"
3 #import "Point.h"
4 
15 typedef NS_ENUM(int32_t, SampleType){
21  SAMPLE_TYPE_FRONTAL = 0,
22 
28  SAMPLE_TYPE_LEFT_PROFILE = 1,
29 
35  SAMPLE_TYPE_RIGHT_PROFILE = 2,
36 };
37 
43 typedef NS_ENUM(int32_t, ImageFromat){
49  IMAGE_FORMAT_JPG = 0,
50 
56  IMAGE_FORMAT_PNG = 1,
57 
63  IMAGE_FORMAT_TIF = 2,
64 
70  IMAGE_FORMAT_BMP = 3,
71 };
72 
78 typedef NS_ENUM(int32_t, FaceCutType){
79  FACE_CUT_BASE = 0,
80  FACE_CUT_FULL_FRONTAL = 1,
81  FACE_CUT_TOKEN_FRONTAL = 2,
82 };
83 
89 @interface Angles : NSObject
90 {
91  float yaw;
92  float pitch;
93  float roll;
94 }
95 
96 -(nonnull instancetype) init: (float) yaw : (float) pitch : (float) roll;
97 
103 @property float yaw;
104 
110 @property float pitch;
111 
117 @property float roll;
118 @end
119 
125 @interface RawSample : NSObject
126 {
127  void *raw_sample;
128 }
129 -(nonnull instancetype)init: (void* _Nonnull) sample;
130 -(void) dealloc;
131 
147 -(nonnull Rectangle *) getRectangle;
148 
164 -(nonnull NSMutableArray *) getLandmarks;
165 
181 -(nonnull Point2 *) getLeftEye;
182 
198 -(nonnull Point2 *) getRightEye;
199 
215 -(nonnull Angles *) getAngles;
216 
234 -(int) getID;
235 
261 -(int) getFrameID;
262 
283 -(bool) hasOriginalImage;
284 
300 -(SampleType) getType;
301 
327 -(nonnull RawImage *) cutFaceRawImage;
328 
351 -(void) save: (const char*_Nullable) file_path;
352 
374 -(nonnull NSMutableArray *) getFaceCutRectangle: (FaceCutType) cut_type;
375 
376 
377 @property (readonly, nonnull) void* raw_sample;
378 @end
379 
float yaw
Yaw angle in degrees.
Definition: RawSample.h:91
3D point.
Definition: Point.h:13
float pitch
Pitch angle in degrees.
Definition: RawSample.h:92
typedef NS_ENUM(int32_t, SampleType)
Sample types (see also Capturer::CapturerType).
Definition: RawSample.h:15
float roll
Roll angle in degrees.
Definition: RawSample.h:93
Interface object that stores a captured face sample.
Definition: RawSample.h:125
Struct that provides raw image data and optional cropping information.
Definition: RawImage.h:113
Face orientation angles.
Definition: RawSample.h:89
Rectangle in an image.
Definition: RawImage.h:58