I am following this tutorial and manage to build the library just fine.
My State Now:
I take a photo, save it to the external memory (here is the directory path)
static String directoryPath = Environment.getExternalStorageDirectory().toString() + "/saved_images";
In the directory there are currently only pictures I took in jpg format.
I can load a bitmap from the saved image.
The problem-
I couldn't understand how do I use this piece of code:
TessBaseAPI baseApi = new TessBaseAPI();
// DATA_PATH = Path to the storage
// lang = for which the language data exists, usually "eng"
baseApi.init(DATA_PATH, lang);
// Eg. baseApi.init("/mnt/sdcard/tesseract/tessdata/eng.traineddata", "eng");
baseApi.setImage(bitmap);
String recognizedText = baseApi.getUTF8Text();
baseApi.end();
- What is the
DATA_PATH
variable? - also read something about creating a folder named tesseract and putting there language files?
not really sure what I need to do and the tutorial doesn't explain it.
any help would be appreciated!