Skip to content

Instantly share code, notes, and snippets.

@brunomunizaf
Last active August 21, 2018 14:31
Show Gist options
  • Select an option

  • Save brunomunizaf/4942bbafa68bbffd811f9d9cc7c44ecc to your computer and use it in GitHub Desktop.

Select an option

Save brunomunizaf/4942bbafa68bbffd811f9d9cc7c44ecc to your computer and use it in GitHub Desktop.
UpdateCoreML()
// MARK: - Private
extension ViewController {
private func updateCoreML() {
let pixbuff : CVPixelBuffer? = (sceneView.session.currentFrame?.capturedImage)
if pixbuff == nil { return }
let ciImage = CIImage(cvPixelBuffer: pixbuff!)
let imageRequestHandler = VNImageRequestHandler(ciImage: ciImage, options: [:])
do {
try imageRequestHandler.perform(self.visionRequests)
} catch {
print(error)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment