Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.
A framework to use Cloud Vision API by Google in Swift.
CocoaPods:
pod 'GoogleVision'
Manual:
Copy GoogleVision.swift to your project.
First of all you have to generate API key to use Google Cloud services in the console. And then use the following code:
GoogleVision.init(apiKey: "")
let gv = GoogleVision.init(apiKey: "")
let img = UIImage(named: "Image")
gv.run(image:img) { (text, err) in
guard let text = text, err == nil else {
print(err?.localizedDescription)
return
}
print(text)
}
GoogleVision is available under the MIT license. See the LICENSE file for more info.