Slide 20
Slide 20 text
public func captureOutput(
_ output: AVCaptureOutput,
didOutput sampleBuffer: CMSampleBuffer,
from connection: AVCaptureConnection
) {
var handPoseRequest = VNDetectHumanHandPoseRequest()
let handler = VNImageRequestHandler(cmSampleBuffer: sampleBuffer, …)
try handler.perform([handPoseRequest])
let observation = handPoseRequest.results?.first as! VNRecognizedPointsObservation
}
AVCaptureVideoDataOutputSampleBufferDelegate AVCaptureSession
AVCaptureVideoDataOutput