MGLiveActionManager.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // MGFaceActionManager.h
  3. // MGFaceDetection
  4. //
  5. // Created by megvii on 15/12/24.
  6. // Copyright © 2015Year megvii. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "LivenessEnumType.h"
  10. /**
  11. * 活体检测动作管理器
  12. */
  13. @interface MGLiveActionManager : NSObject
  14. /**
  15. * 初始化方法,指定动作是否随机
  16. *
  17. * @param actionRandom 是否动作随机
  18. * @param actionArray 指定动作数组(在非随机动作情况下)
  19. * @return 初始化对象
  20. */
  21. + (instancetype)LiveActionRandom:(BOOL)actionRandom
  22. actionArray:(NSArray *)actionArray
  23. actionCount:(NSUInteger)count;
  24. /**
  25. * 获取动作数量
  26. *
  27. * @return 动作数量
  28. */
  29. - (NSUInteger)getActionCount;
  30. /**
  31. * 恢复动作
  32. */
  33. - (void)resetAction;
  34. /**
  35. * 随机一个动作
  36. *
  37. * @return 动作
  38. */
  39. - (MGLivenessDetectionType)randomActionType;
  40. /**
  41. * 恢复所有动作并且返回一个动作
  42. *
  43. * @return 动作
  44. */
  45. - (MGLivenessDetectionType)resetAndRandomActionType;
  46. @end