Last active
August 21, 2018 14:31
-
-
Save brunomunizaf/4942bbafa68bbffd811f9d9cc7c44ecc to your computer and use it in GitHub Desktop.
UpdateCoreML()
This file contains hidden or 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
| // 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