This is a B4A + B4i solution. It recognizes text in images based on Google ML Kit.
Dependencies:
- B4i (local Mac only): https://www.b4x.com/b4i/files/MLKit.zip
- B4A: open B4A Sdk Manager - search for mlkit and install all items. Also search and install odml.
Don't miss:
- B4i dependencies + #PlistExtra (for MediaChooser) in Main module.
- B4i bundle files under Files\Special. The example includes bundles for Latin and Chinese. Other bundles are available here: https://www.b4x.com/b4i/files/MLKit_Bundles.zip
- B4A dependencies in Main module.
- B4A manifest editor. 2 snippets for MLKit and one snippet for FileProvider (MediaChooser).
Usage itself is very simple. See the example:
Updates:
- v1.10:
Support for non-Latin languages added. There are 5 language models: Latin, Chinese, Devanagari, Japanese, Korean
Recognizing non-Latin languages requires some configuration:
Dependencies:
- B4i (local Mac only): https://www.b4x.com/b4i/files/MLKit.zip
- B4A: open B4A Sdk Manager - search for mlkit and install all items. Also search and install odml.
Don't miss:
- B4i dependencies + #PlistExtra (for MediaChooser) in Main module.
- B4i bundle files under Files\Special. The example includes bundles for Latin and Chinese. Other bundles are available here: https://www.b4x.com/b4i/files/MLKit_Bundles.zip
- B4A dependencies in Main module.
- B4A manifest editor. 2 snippets for MLKit and one snippet for FileProvider (MediaChooser).
Usage itself is very simple. See the example:
Updates:
- v1.10:
Support for non-Latin languages added. There are 5 language models: Latin, Chinese, Devanagari, Japanese, Korean
Recognizing non-Latin languages requires some configuration:
- Initialize the recognizer with the correct model.
- B4A: add reference with #AdditionalJar: com.google.android.gmslay-services-mlkit-text-recognition-chinese (replace chinese with the relevant lowercased model name).
- B4i: add the bundle of the relevant model: https://www.b4x.com/b4i/files/MLKit_Bundles.zip
Last edited: