I am trying to create an app that use the Vision SDK to track a face in real time, using the camera.
So far, it's only working when I hold the iPad in landscape right mode.
The process is the following:
// This is the AVCaptureVideoDataOutputSampleBufferDelegate
func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
if let imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) {
sequenceHandler.perform(requests, on: imageBuffer)
}
}
Is there a way to rotate the stream easily, or hint the Vision SDK the correct orientation ?