PoseDetector

public interface PoseDetector extends Closeable, LifecycleObserver

A PoseDetection client for finding Pose in a supplied image.

A PoseDetector is created via PoseDetection.getClient(PoseDetectorOptionsBase). For example:

 PoseDetector poseDetector = PoseDetection.getClient(options); 
To perform pose detection in an image, you first need to create an instance of InputImage from a Bitmap, ByteBuffer, Image etc. See InputImage documentation for more details. For example, the code below creates a InputImage from a Bitmap.
 InputImage image = InputImage.fromBitmap(bitmap, rotationDegrees); 
Then the code below can detect Pose in the supplied InputImage.
 Task<Pose> task = poseDetector.process(image);
 task.addOnSuccessListener(...).addOnFailureListener(...); 

Public Method Summary

abstract void
close()
Closes the detector and releases its resources.
abstract Task<Pose>
process(InputImage image)
Detects human pose from the supplied image.

Inherited Method Summary

Public Methods

public abstract void close ()

Closes the detector and releases its resources.

public abstract Task<Pose> process (InputImage image)

Detects human pose from the supplied image.

Create an InputImage object using one of InputImage's factory methods. See InputImage documentation for more details.

Returns
  • a Task that asynchronously returns a detected Pose