#import #import @interface IntPoint : NSObject @property(nonatomic) NSInteger x; @property(nonatomic) NSInteger y; - (instancetype)initWithX:(NSInteger)x y:(NSInteger)y; @end @interface NSValue (IntPoint) + (instancetype)valuewithIntPoint:(IntPoint *)value; @property (readonly) IntPoint* intPointValue; @end @interface FaceMeshLandmarkPoint : NSObject @property(nonatomic) float x; @property(nonatomic) float y; @property(nonatomic) float z; @end @interface FaceMeshNormalizedRect : NSObject @property(nonatomic) float centerX; @property(nonatomic) float centerY; @property(nonatomic) float height; @property(nonatomic) float width; @property(nonatomic) float rotation; @end @protocol FaceMeshDelegate @optional /** * Array of faces, with faces represented by arrays of face landmarks */ - (void)didReceiveFaces:(NSArray *> *)faces; - (void)didSavedRegions:(NSArray *)foreheadURLs leftcheekURLs:(NSArray *)leftcheekURLs rightcheekURLs:(NSArray *)rightcheekURLs; @end @interface FaceMesh : NSObject - (instancetype)init; - (void)startGraph; - (void)processVideoFrame:(CVPixelBufferRef)imageBuffer; - (CVPixelBufferRef)resize:(CVPixelBufferRef)pixelBuffer width:(int)width height:(int)height; - (uint8_t **)buffer2Array2D:(CVPixelBufferRef)pixelBuffer; - (void)extractRegions:(NSURL *)fileName foreheadBoxes:(NSArray *> *)foreheadBoxes leftCheekBoxes:(NSArray *> *)leftCheekBoxes rightCheekBoxes:(NSArray *> *)rightCheekBoxes totalFramesNeedProcess:(NSInteger)totalFramesNeedProcess skipNFirstFrames:(NSInteger)skipNFirstFrames; @property(weak, nonatomic) id delegate; @property(nonatomic) size_t timestamp; @end