Instantly share code, notes, and snippets.

Embed
What would you like to do?
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) -> Void
{
// 1
guard let image = info[UIImagePickerControllerOriginalImage] as? UIImage,
let ciImage = image.ciImage
else
{
return
}
// 2
let imageRequest = VNImageRequestHandler(ciImage: ciImage)
// 3
do
{
try imageRequest.perform([ self.requestText ])
}
catch error
{
print("No podemos procesar la imagen del Carrete de Fotos. \(error.localizedDescription)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment