Home / All Integrations / Google Cloud Vision OCR

free

Connect Google Cloud Vision OCR to your chatbot

Detect text in images


Using Google Cloud Vision OCR (Optical Character Recognition), you can easily detect and extract text from images. For example, a photograph might contain a street sign or traffic sign. The JSON includes the entire extracted string, as well as individual words, and their bounding boxes.

Setup

In order to use this App, you need to create a Service Account from your Google Cloud account.

To do so, go to https://console.cloud.google.com/, create a project, enable the Google Cloud Vision API then create a Service Account with Project Editor access role, and retrieve a key in JSON format. This file contains your service account's client_email and private_key, which you will need to configure this App.

You can also choose a specific location by setting the API_ENDPOINT variable. Cloud Vision offers you some control over where the resources for your project are stored and processed. In particular, you can configure Cloud Vision to store and process your data only in the European Union. The default setting is vision.googleapis.com but you can also set it to eu-vision.googleapis.com or us-vision.googleapis.com to select one of the available locations.

Usage

To use this App, you simply need the publicly-accessible URL of an image you want to analyze:

do result = App("google/vision_ocr", url="https://cloud.google.com/vision/docs/images/sign_small.jpg")

The result will be a JSON that includes the entire extracted string, as well as individual words, and their bounding boxes. You can try the API on Google Cloud Console to discover the resulting JSON.

Join the Community
on Slack Slack

Come and learn all about CSML with other chatbot enthusiasts on the CSML Community Slack! ūü§ó