MediaPipeTasksVision Framework Reference

MPPPoseLandmarkerLiveStreamDelegate

@protocol MPPPoseLandmarkerLiveStreamDelegate <NSObject>

This protocol defines an interface for the delegates of PoseLandmarker to receive results of performing asynchronous pose landmark detection on images (i.e, when runningMode = .liveStream).

The delegate of PoseLandmarker must adopt PoseLandmarkerLiveStreamDelegate protocol. The methods in this protocol are optional.

  • This method notifies a delegate that the results of asynchronous pose landmark detection of an image submitted to the PoseLandmarker is available.

    This method is called on a private serial dispatch queue created by the PoseLandmarker for performing the asynchronous delegates calls.

    Declaration

    Objective-C

    - (void)poseLandmarker:(nonnull MPPPoseLandmarker *)poseLandmarker
        didFinishDetectionWithResult:(nullable MPPPoseLandmarkerResult *)result
             timestampInMilliseconds:(NSInteger)timestampInMilliseconds
                               error:(nullable NSError *)error;

    Parameters

    poseLandmarker

    The pose landmarker which performed the pose landmark detection. This is useful to test equality when there are multiple instances of PoseLandmarker.

    result

    The PoseLandmarkerResult object that contains a list of landmark.

    timestampInMilliseconds

    The timestamp (in milliseconds) which indicates when the input image was sent to the pose landmarker.

    error

    An optional error parameter populated when there is an error in performing pose landmark detection on the input live stream image data.