tess-two

Android Tesseract App crashes on OCR Function

安稳与你 提交于 2019-12-09 23:25:18
问题 I am trying to implement Tesseract into my android project but am getting a crash when trying to complete the OCR. Here is how I'm setting up Tesseract: TessBaseAPI baseApi = new TessBaseAPI(); baseApi.setDebug(true); baseApi.init(imagePath, "eng"); baseApi.setImage(bitmap); String recognizedText = baseApi.getUTF8Text(); baseApi.end(); This is how I'm setting up the image information to pass into the TesseractAPI: destination = new File(Environment.getExternalStorageDirectory(), name + ".png"

NDK compile warnings on OCR tesseract libraries for android

谁说胖子不能爱 提交于 2019-12-08 13:55:48
问题 I am trying to compile android NDK version of OCR tesseract libraries tess-two but I am confused why I am getting the following warning. I have just downloaded the library from the github and trying to compile using NDK r9b. C:\NV_ANDROIDPACK_BACKUP\android-ndk-r9b\tess-two>C:\NV_ANDROIDPACK_BACKUP\andr id-ndk-r9b\ndk-build Android NDK: WARNING:jni/com_googlecode_tesseract_android/Android.mk:tess: non- ystem libraries in linker flags: -latomic Android NDK: This is likely to result in

Get path of data directory(android)

穿精又带淫゛_ 提交于 2019-12-08 03:12:11
问题 I am using tesseract ocr in my app. In order to use tesseract i need to use several language files that are located at a directory called - 'tessdata'. This is my method code: public String detectText(Bitmap bitmap) { TessBaseAPI tessBaseAPI = new TessBaseAPI(); String DATA_PATH = Environment.getRootDirectory().getPath() + "/tessdata/"; tessBaseAPI.setDebug(true); tessBaseAPI.init(DATA_PATH, "eng"); //Init the Tess with the trained data file, with english language tessBaseAPI.setImage(bitmap)

tess-two can't find libpng.so

怎甘沉沦 提交于 2019-12-07 16:44:42
问题 I have followed building instructions for tess-two on Github I build tess-two using NDK successfully and imported the library I am trying to run the test application provided on the same repository but whenever the application starts it gives the following exception: That error is caused once new TessBaseAPI(); is called. dlopen("/data/app-lib/com.datumdroid.android.ocr.simple-2/liblept.so") failed: Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libpng.so"

android - recognized text from tess-two library is wrong

…衆ロ難τιáo~ 提交于 2019-12-06 15:18:41
I am trying to use the tess-two library to recognize text from imagae. Here is my code: load.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // recognize text Bitmap temp = loadJustTakenImage(); //loads taken image from sdcard Bitmap rotatedImage = rotateIfNeeded(temp); // rotate method i found in some tutorial String text1 = recognizeText(rotatedImage); } }); Recognize text method: (tessdata folder is in Download with the eng.traineddata and other files) private String recognizeText(Bitmap bitmap) { // TODO Auto-generated method stub TessBaseAPI baseApi

Android OCR detecting digits only using popular tessercat fork tess-two

£可爱£侵袭症+ 提交于 2019-12-06 03:15:52
问题 I'm using the popular OCR tessercat fork for android tess-two https://github.com/rmtheis/tess-two. I integrated all the staff and it works etc... But I need to detect only digits, my code for now is: TessBaseAPI baseApi = new TessBaseAPI(); baseApi.init(pathToLngFile, langName); baseApi.setImage(bitmap); String recognizedText = baseApi.getUTF8Text(); baseApi.end(); doSomething(recognizedText); From here https://code.google.com/p/tesseract-ocr/wiki/FAQ#How_do_I_recognize_only_digits? I'm using

Android Tesseract App crashes on OCR Function

荒凉一梦 提交于 2019-12-04 18:13:24
I am trying to implement Tesseract into my android project but am getting a crash when trying to complete the OCR. Here is how I'm setting up Tesseract: TessBaseAPI baseApi = new TessBaseAPI(); baseApi.setDebug(true); baseApi.init(imagePath, "eng"); baseApi.setImage(bitmap); String recognizedText = baseApi.getUTF8Text(); baseApi.end(); This is how I'm setting up the image information to pass into the TesseractAPI: destination = new File(Environment.getExternalStorageDirectory(), name + ".png"); imagePath = destination.getAbsolutePath(); String name = dateToString(new Date(),"yyyy-MM-dd-hh-mm

Android OCR detecting digits only using popular tessercat fork tess-two

霸气de小男生 提交于 2019-12-04 09:11:10
I'm using the popular OCR tessercat fork for android tess-two https://github.com/rmtheis/tess-two . I integrated all the staff and it works etc... But I need to detect only digits, my code for now is: TessBaseAPI baseApi = new TessBaseAPI(); baseApi.init(pathToLngFile, langName); baseApi.setImage(bitmap); String recognizedText = baseApi.getUTF8Text(); baseApi.end(); doSomething(recognizedText); From here https://code.google.com/p/tesseract-ocr/wiki/FAQ#How_do_I_recognize_only_digits ? I'm using version V3, and there ain't code solution instead some command line solution - not relevant for

'TAG' has private access in 'android.support.v4.app.FragmentActivity'

a 夏天 提交于 2019-12-03 11:53:43
问题 Almost everything in my activity is working fine, except for wherever TAG is referenced. TAG gets a red line and says: 'TAG' has private access in 'android.support.v4.app.FragmentActivity' . MainActivity (without imports)- public class MainActivity extends AppCompatActivity { public static final String DATA_PATH = Environment .getExternalStorageDirectory().toString() + "/MainActivity"; public static final String lang = "eng"; protected Button _button; protected ImageView _image; protected

'TAG' has private access in 'android.support.v4.app.FragmentActivity'

安稳与你 提交于 2019-12-03 01:25:29
Almost everything in my activity is working fine, except for wherever TAG is referenced. TAG gets a red line and says: 'TAG' has private access in 'android.support.v4.app.FragmentActivity' . MainActivity (without imports)- public class MainActivity extends AppCompatActivity { public static final String DATA_PATH = Environment .getExternalStorageDirectory().toString() + "/MainActivity"; public static final String lang = "eng"; protected Button _button; protected ImageView _image; protected TextView _field; protected String _path; protected boolean _taken; @Override public void onCreate(Bundle