Created
June 12, 2020 04:42
-
-
Save jbadger3/46b27ce416b28fffbe809adf19f27661 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
func completedVisionRequest(_ request: VNRequest?, error: Error?) { | |
// Only proceed if a rectangular image was detected. | |
guard let rectangles = request?.results as? [VNRectangleObservation] else { | |
guard let error = error else { return } | |
print("Error: Rectangle detection failed - Vision request returned an error. \(error.localizedDescription)") | |
return | |
} | |
// do stuff with your rectangles | |
for rectangle in rectangles { | |
print(rectangle.boundingBox) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment