Skip to content

Instantly share code, notes, and snippets.

@elvismetaphor
Created July 12, 2018 16:33
Show Gist options
  • Save elvismetaphor/9d506dfa31d3facc469499903bfdfae2 to your computer and use it in GitHub Desktop.
Save elvismetaphor/9d506dfa31d3facc469499903bfdfae2 to your computer and use it in GitHub Desktop.
Add cloud text recognition (iOS)
laze var cloudTextDetector: VisionCloudTextDetector = Vision.vision().cloudTextDetector()
func runCloudTextRecognition(with image: UIImage) {
let visionImage = VisionImage(image: image)
cloudTextDetector.detect(in: visionImage) { (features, error) in
if let error = error {
print("Received error: \(error)")
}
self.processCloudResult(from: features, error: error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment