3

I am working on OCR detection and have implemented tesseract OCR with this code.

But I have heard about google docs API which will provide services.

But as per this link the api will save only to google docs?

Has any one implemented or used this feature in your applications, and where can I get some sample usagof this API?

Community
  • 1
  • 1
2vision2
  • 4,933
  • 16
  • 83
  • 164
  • 1
    What does Tesseract to do with it? Isn't this a question about Google Docs API? – Karol S Aug 18 '14 at 22:10
  • Tesseract is kinda Google docs API and its an open source OCR component. I am looking for a google service for a better reliability. Any help? – 2vision2 Aug 22 '14 at 06:09

1 Answers1

0

I am, right now, using Google Vision API to do OCR in my application. It's pretty easy. You have plenty of documentation at https://cloud.google.com/vision/ itself.

But to answer your question, the API-response is a JSON, from which you can filter whatever you need, which, in your case I am assuming is text.

Like this:

response = client.text_detection(image= image)
texts = response.text_annotations
print('Texts:')
for text in texts:
    print('\n"{}"'.format(text.description))

    vertices = (['({},{})'.format(vertex.x, vertex.y)
                 for vertex in text.bounding_poly.vertices])

    print('bounds: {}'.format(','.join(vertices)))

So basically you can do whatever you want with the response. You will have to make an account, provide billing info and so some setup etc. before you can use it. But if I'm not mistaken, up to 2000 images per month are free, something like that.

KVG
  • 59
  • 8