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
let pixelBuffer = sceneView?.session.currentFrame?.capturedImage | |
let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: .up) |
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
let requestHandler = VNImageRequestHandler(url: inputImageURL) | |
let request = VNDetectRectanglesRequest { request, error in | |
self.completedVisionRequest(request, error: error) | |
} | |
// perform additional request configuration | |
request.usesCPUOnly = false //allow Vision to utilize the GPU | |
DispatchQueue.global().async { | |
do { |
NewerOlder