B4A Library OCR

This library will extract text from images via OCR.

Requirements:

1- B4A 3.82.

2- Get an API Key HERE (you need to create an account).

3- Internet connection.


How to install:

- Copy the OCR.jar and OCR.xml to your additional libraries directory.

Usage:
B4X:
Private myOCR As OCR

myOCR.Initialize(Me, "myOCR", "<YOUR_API_KEY>")

myOCR.ExtractFromImage(File.Combine(File.DirAssets, "sample.gif"), "", "scene", 20000)

That's it.

You can upload an image or reference one via a URL, the service will return the extracted text (if any).


NOTES:

- OCR is not perfect, so, expect some weird results or no results at all.

- It is a free service but some quotas apply.


For more details, see the attached project.
 

Attachments

  • OCR_Sample_Project.zip
    22.8 KB · Views: 453
  • OCR_Library_1.2.zip
    7.6 KB · Views: 462
Last edited:

MarcoRome

Expert
Licensed User
Hi NJDude.
One question... but work only with characters latin. Because with russian , chinese characters dont work.
Any idea ?
Thank's
 

angel

Member
Licensed User
Hello

When start get this error

B4X:
Private myOCR As OCR

myOCR.Initialize(Me, "myOCR", "<6a5bb8d9-e85d-46b5-b1b1-202ae15e0f10>")

myOCR.ExtractFromImage(File.Combine(File.DirAssets, "sample.gif"), "", "scene", 20000)


Thanks


For more details, see the attached project.[/QUOTE]
 

Attachments

  • Screenshot_2018-12-22-11-31-49-1831964341.png
    Screenshot_2018-12-22-11-31-49-1831964341.png
    167 KB · Views: 80

Almog

Active Member
Licensed User
Hello

When start get this error

B4X:
Private myOCR As OCR

myOCR.Initialize(Me, "myOCR", "<6a5bb8d9-e85d-46b5-b1b1-202ae15e0f10>")

myOCR.ExtractFromImage(File.Combine(File.DirAssets, "sample.gif"), "", "scene", 20000)


Thanks


For more details, see the attached project.
[/QUOTE]

Maybe try without < and > , but for me the same error happened today even without <>...
 
Top