Created
June 12, 2020 04:28
-
-
Save jbadger3/f6aa954b0c0a4235e80c3b1b29b153bc to your computer and use it in GitHub Desktop.
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 { | |
try requestHandler.perform([request]) | |
} catch { | |
print("Error: Rectangle detection failed - vision request failed.") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment