MGFaceInfo.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // MGFaceModel.h
  3. // LandMask
  4. //
  5. // Created by 张英堂 on 16/7/11.
  6. // Copyright © 2016年 megvii. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #import "MGFaceppCommon.h"
  11. typedef NS_ENUM(NSInteger, MGGender) {
  12. MGFemale = 0,
  13. MGMale = 1,
  14. };
  15. @interface MGFaceInfo : NSObject
  16. /** tracking ID */
  17. @property (nonatomic, assign) NSInteger trackID;
  18. /** 在该张图片中人脸序号 */
  19. @property (nonatomic, assign) int index;
  20. /** 人脸的rect */
  21. @property (nonatomic, assign) CGRect rect;
  22. /** 人脸点坐标 (NSValue -> CGPoints)*/
  23. @property (nonatomic, strong) NSArray <NSValue *>*points;
  24. /** 该张人脸质量 */
  25. @property (nonatomic, assign) CGFloat confidence;
  26. #pragma mark 以下属性需要SDK版本支持 请使用 [MGAlgorithmInfo SDKAbility] 属性,获取SDK支持功能
  27. #pragma mark 需要主动调用 MGFacepp 相关方法获取
  28. //3D info
  29. @property (nonatomic, assign) float pitch;
  30. @property (nonatomic, assign) float yaw;
  31. @property (nonatomic, assign) float roll;
  32. /** 年龄 */
  33. @property (nonatomic, assign) float age;
  34. /** 性别 */
  35. @property (nonatomic, assign) MGGender gender;
  36. /** blurness */
  37. @property (nonatomic, assign) float blurness;
  38. /** minority */
  39. @property (nonatomic, assign) float minority;
  40. /** 眼状态 */
  41. @property (nonatomic, assign) MGEyeStatus leftEyesStatus;
  42. @property (nonatomic, assign) MGEyeStatus rightEyesStatus;
  43. /** 嘴状态 */
  44. @property (nonatomic, assign) MGMouthStatus mouseStatus;
  45. #pragma mark -
  46. /**
  47. 人脸的 feature
  48. */
  49. @property (nonatomic, strong, readonly) NSData *featureData;
  50. @end