Cloud OCR SDK Documentation

Quick Start with OCR SDK for Python

Use our code sample in Python to get your application which uses Cloud OCR SDK up and running.

Prerequisites to using the sample are:

  • Python 2 or 3 installed on the workstation (the sample was tested on versions 2.7 and 3.6).
  • Application ID and Password, which can be received through an account with ABBYY Cloud OCR SDK. If you do not have one, register here.

Now you are ready to start. Perform the following steps:

  1. Download and unzip the sample.
  2. Go to the sample folder and run the following command line to install the required packages:
    pip install -r requirements.txt
  3. Set the environment variables: ABBYY_APPID to your Application ID, ABBYY_PWD to the Application Password. The processing server requires the Application ID and Password for each request. More details can be found in Authentication.
    On Windows operating system, this is done with the following commands:
    set ABBYY_APPID=YourApplicationId
    set ABBYY_PWD=YourPassword
    On Linux operating system, use these commands:
    export ABBYY_APPID=YourApplicationId
    export ABBYY_PWD=YourPassword
  4. Run image recognition:
    python "image.jpg" result.txt
    This is what you will see as a result:
    Running the Python sample
  5. By default, the sample is configured to recognize documents in English and export them to plain text format (TXT). Other languages and settings are available through command-ine options. To see the possible options, run
    python -h
    Python sample help screen
  6. Change the code of the sample to integrate OCR with other functionality your application will provide and create the best solution for your scenario.

The basics of using Cloud OCR SDK are explained in How to Work with Cloud OCR SDK, and detailed information on the processing and service methods is given in API Reference.