Last active
August 24, 2022 09:00
-
-
Save hietalajulius/c3f4dd7e759012bb4a09a9d3e78697e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate { | |
var bufferSize: CGSize = .zero | |
var inferenceTime: CFTimeInterval = 0; | |
private let session = AVCaptureSession() | |
@IBOutlet weak var previewView: UIView! | |
var rootLayer: CALayer! = nil | |
private var previewLayer: AVCaptureVideoPreviewLayer! = nil | |
private var detectionLayer: CALayer! = nil | |
private var inferenceTimeLayer: CALayer! = nil | |
private var inferenceTimeBounds: CGRect! = nil | |
private var requests = [VNRequest]() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment