MMBodyDetector
人体关键点检测器,回吐14个人体关键点。支持多人检测
1. 构造方法
同步构造方法
MMBodyDetector *detector = [[MCCDetectorsCenter sharedInstance] syncMakeFaceDetector:MCCFaceDetectorTypeBodyJoint];
异步构造方法
[[MCCDetectorsCenter sharedInstance] asyncMakeFaceDetector:MCCFaceDetectorTypeBodyJoint complete:^(NSObject * _Nullable detector) { MMBodyDetector *bodyDetector = detector; }];
2. 检测接口
//快捷接口,orientation == MMCVImageOrientationUp
- (NSArray<MMBodyFeature *> *)featuresInPixelBuffer:(CVPixelBufferRef)pixelBuffer;
- (NSArray<MMBodyFeature *> *)featuresInPixelBuffer:(CVPixelBufferRef)pixelBuffer options:(MMBodyDetectionOptions *)options;
3. MMBodyDetectionOptions 介绍
图片帧方向
@property (nonatomic, assign) MMCVImageOrientation orientation;
是否静态图
@property (nonatomic, assign) BOOL detectStillImage; // NO
4. MMBodyFeature 字段介绍
- 身体骨骼数据数组
@property (nonatomic,copy,readonly) NSArray<MMBodyJoint *> *joints;
4.0.1. MMBodyJoint
骨骼2D位置
@property (nonatomic,readonly) CGPoint location;
骨骼分数
@property (nonatomic,readonly) float score;