HandLandmarker
final class HandLandmarkerDetects 2D normalized hand landmarks, 3D world landmarks, and handedness across images, video frames, and live camera streams.
-
Complete skeleton topology combining palm and all five finger connection lists.
Declaration
Swift
static let handConnections: [Connection] -
Connections linking landmarks along the index finger (
5through8).Declaration
Swift
static let handIndexFingerConnections: [Connection] -
Connections linking landmarks along the middle finger (
9through12).Declaration
Swift
static let handMiddleFingerConnections: [Connection] -
Connections linking landmarks across the palm (
wristand finger bases).Declaration
Swift
static let handPalmConnections: [Connection] -
Connections linking landmarks along the pinky finger (
17through20).Declaration
Swift
static let handPinkyConnections: [Connection] -
Connections linking landmarks along the ring finger (
13through16).Declaration
Swift
static let handRingFingerConnections: [Connection] -
Connections linking landmarks along the thumb (
1through4).Declaration
Swift
static let handThumbConnections: [Connection] -
Creates a
HandLandmarkerin.imagemode using the model asset bundle atmodelPath.Declaration
Swift
convenience init(modelPath: String) throws -
Creates a
HandLandmarkerconfigured withoptions.Declaration
Swift
init(options: HandLandmarkerOptions) throws -
Detects hand landmarks in a standalone
image(.imagerunning mode only).Declaration
Swift
final func detect(image: MPImage, imageProcessingOptions: ImageProcessingOptions? = nil) throws -> HandLandmarkerResult -
Detects hand landmarks in a sequential
videoFrameat monotonically increasingtimestampInMilliseconds(.videorunning mode only).Declaration
Swift
final func detect(videoFrame: MPImage, timestampInMilliseconds: Int, imageProcessingOptions: ImageProcessingOptions? = nil) throws -> HandLandmarkerResult -
Submits a live camera
imageat monotonically increasingtimestampInMillisecondsfor asynchronous result delivery (.liveStreamrunning mode only).Declaration
Swift
final func detectAsync(image: MPImage, timestampInMilliseconds: Int, imageProcessingOptions: ImageProcessingOptions? = nil) throws