Code Monkey home page Code Monkey logo

tess-two's People

Contributors

aaargh20318 avatar alexcohn avatar andrzejressel avatar brnhffmnn avatar cdv1010 avatar fdim avatar ivankolev avatar jackfan-z avatar megabytefisher avatar n3utrino avatar renard314 avatar rmtheis avatar robyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tess-two's Issues

Library lept not found

I am using Eclipse IDE and Windows XP

I imported tess-two library project in Eclipse IDE and then I imported GautamGupta-Simple-Android-OCR-8a4d86d project. When I run it then it gives following runtime exception after photo taken from camera and my application crashed:

FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
at com.datumdroid.android.ocr.simple.SimpleAndroidOCRActivity.onPhotoTaken(SimpleAndroidOCRActivity.java:211)
02-08 11:35:29.322: ERROR/AndroidRuntime(6918): at com.datumdroid.android.ocr.simple.SimpleAndroidOCRActivity.onActivityResult(SimpleAndroidOCRActivity.java:135)

02-08 11:35:29.322: ERROR/AndroidRuntime(6918): Caused by: java.lang.UnsatisfiedLinkError: Library lept not found
02-08 11:35:29.322: ERROR/AndroidRuntime(6918): at java.lang.Runtime.loadLibrary(Runtime.java:461)
02-08 11:35:29.322: ERROR/AndroidRuntime(6918): at java.lang.System.loadLibrary(System.java:557)
02-08 11:35:29.322: ERROR/AndroidRuntime(6918): at com.googlecode.tesseract.android.TessBaseAPI.(TessBaseAPI.java:47)
02-08 11:35:29.322: ERROR/AndroidRuntime(6918): ... 15 more

Please give me the needed steps to make project working successfully.

Could not find tess-two.apk!

Hi I have imported this project and try to run tess-two-test file but there is no any application is executing in Android, this is because in AndroidManifiest.xml file

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name" >
    <uses-library android:name="android.test.runner" />
</application>

There is no activity is loading can anybody help me how to use this app and what activity i need to lanuch so i can see demo

Some methods have a bad delay time, such as meanConfidence,wordConfidences,getUTF8Text

I use the trained data from tessarect.I don't know why these methods need spent so much time.
Sometimes, the delay time is up to 2s.
The following is the way I ues it:
baseApi = new TessBaseAPI();
baseApi.init(FileManagerTool.getSystemPath(),CommonConstant.OCR_LANGUAGE);
baseApi.setImage(bitmap);
baseApi.meanConfidence();
ResultIterator resultIterator = baseApi.getResultIterator();
resultIterator.begin();

if I do not call meanConfidence or wordConfidences, the variable resultIterator will be null.
Could you tell us how to use the api?
Plealse give us some demos!
Thx,a lot.

init() crashes when used with custom training file

Whenever I try to initialize a tessbaseAPI with a custom language file (for an MICR font), it crashes with a SIGSEGV. I am able to init with other language files (I have tried english and swedish). The mcr.traineddata file works fine with other builds of tesseract (an iphone compile I found and tesseract installed locally on my machine). Any thoughts?

A crash bug

log :

05-27 15:08:42.100 8288-8313/cn.dictcn.android.digitize.sw_hy A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000030 (code=1), thread 8313 (AsyncTask #2)
05-27 15:08:42.220 145-145/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** ** ***
05-27 15:08:42.220 145-145/? I/DEBUG﹕ Build fingerprint: 'Xiaomi/mione_plus/mione_plus:4.1.2/JZO54K/4.5.23:user/release-keys'
05-27 15:08:42.220 145-145/? I/DEBUG﹕ pid: 8288, tid: 8313, name: AsyncTask #2 >>> cn.dictcn.android.digitize.sw_hy <<<
05-27 15:08:42.220 145-145/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000030
05-27 15:08:42.600 145-145/? I/DEBUG﹕ r0 00000000 r1 5cfb6008 r2 00000000 r3 00000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ r4 5e2d8008 r5 00000000 r6 00000000 r7 00000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ r8 5cfb6008 r9 00000000 sl 00000000 fp 5c60a010
05-27 15:08:42.600 145-145/? I/DEBUG﹕ ip 7fe6eeee sp 5e2d7798 lr 5f157a9c pc 5f06a3d6 cpsr 08000030
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d0 0000000000000000 d1 413b02203d579436
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d2 0000000000000000 d3 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d4 0000000000000000 d5 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d6 0000000000000000 d7 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d8 0000000000000000 d9 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d10 0000000000000000 d11 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d12 0000000000000000 d13 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d14 0000000000000000 d15 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d16 405d000000000000 d17 7e37e43c8800759c
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d18 0000000000000000 d19 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d20 0000000000000000 d21 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d22 0000000000000000 d23 0000000000000000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d24 0000000000010000 d25 fffe0000ffff0000
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d26 0000003600000036 d27 0000003600000036
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d28 0100010001000100 d29 0100010001000100
05-27 15:08:42.600 145-145/? I/DEBUG﹕ d30 ffffffffffffffff d31 ffffffffffffffff
05-27 15:08:42.600 145-145/? I/DEBUG﹕ scr 20000010
05-27 15:08:42.610 145-145/? I/DEBUG﹕ backtrace:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ #00 pc 000a93d6 /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (tesseract::Classify::AddNewResult(ADAPT_RESULTS_, int, float, int, int, int, int)+113)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ #1 pc 000a950f /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (tesseract::Classify::ClassifyAsNoise(ADAPT_RESULTS_)+94)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ #2 pc 000ab88b /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (tesseract::Classify::DoAdaptiveMatch(TBLOB_, ADAPT_RESULTS_)+66)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ #3 pc 000acd15 /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (tesseract::Classify::AdaptiveClassifier(TBLOB_, BLOB_CHOICE_LIST_, CP_RESULT_STRUCT_)+100)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ stack:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7758 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d775c 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7760 4021d6b8
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7764 00000002
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7768 c0000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d776c 00000040
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7770 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7774 5fc62d3c
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7778 0000004b
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d777c 401e95db /system/lib/libc.so (dlmalloc+5326)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7780 c0000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7784 00000001
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7788 66666666
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d778c 5f157b00 /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (aeabi_dcmpgt+8)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7790 df0027ad
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7794 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ #00 5e2d7798 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d779c 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77a0 5fc62d38
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77a4 00000001
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77a8 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77ac 5c612d08
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77b0 5c60a280
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77b4 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77b8 5c60a010
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77bc 5e2d8008
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77c0 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77c4 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77c8 5cfb6008
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77cc 5f06a513 /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (tesseract::Classify::ClassifyAsNoise(ADAPT_RESULTS
)+98)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ #1 5e2d77d0 ffffffff
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77d4 ffffffff
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77d8 fffffffe
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77dc fffffffe
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77e0 5c60a010
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77e4 5cfb6008
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77e8 5e2d8008
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77ec 5c60a280
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77f0 00000630
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77f4 5f06c88f /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (tesseract::Classify::DoAdaptiveMatch(TBLOB
, ADAPT_RESULTS_)+70)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ #2 5e2d77f8 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77fc 5c60a010
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7800 00000000
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7804 5e2d8008
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7808 5cfb6008
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d780c 5f1a31bc /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7810 00000630
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7814 5f06dd19 /data/data/cn.dictcn.android.digitize.sw_hy/lib/libtess.so (tesseract::Classify::AdaptiveClassifier(TBLOB_, BLOB_CHOICE_LIST_, CP_RESULT_STRUCT
)+104)
05-27 15:08:42.610 145-145/? I/DEBUG﹕ memory near r1:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb5fe8 ffffffff ffffffff ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb5ff8 ffffffff ffffffff 00000000 0000bcc9 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb6008 5cfb6000 5cfb6000 00000000 00000000 ..\..........
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb6018 5fcdb920 0000000e 00000054 00000000 ......T.......
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb6028 000007c4 00000000 ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ memory near r4:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7fe8 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7ff8 00000000 00000000 00000001 00040ff2 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d8008 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d8018 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d8028 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ memory near r8:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb5fe8 ffffffff ffffffff ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb5ff8 ffffffff ffffffff 00000000 0000bcc9 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb6008 5cfb6000 5cfb6000 00000000 00000000 ..\..........
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb6018 5fcdb920 0000000e 00000054 00000000 ..
....T.......
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5cfb6028 000007c4 00000000 ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ memory near fp:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5c609ff0 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5c60a000 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5c60a010 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5c60a020 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5c60a030 00000000 00000000 00000000 00000000 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ memory near ip:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 7fe6eecc ffffffff ffffffff ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 7fe6eedc ffffffff ffffffff ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 7fe6eeec ffffffff ffffffff ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 7fe6eefc ffffffff ffffffff ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 7fe6ef0c ffffffff ffffffff ffffffff ffffffff ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ memory near sp:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7778 0000004b 401e95db c0000000 00000001 K......@........
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7788 66666666 5f157b00 df0027ad 00000000 ffff.{..'......
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d7798 00000000 00000000 5fc62d38 00000001 ........8-.
....
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77a8 00000000 5c612d08 5c60a280 00000000 .....-a..\.... 05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5e2d77b8 5c60a010 5e2d8008 00000000 00000000 ....-^........
05-27 15:08:42.610 145-145/? I/DEBUG﹕ code around pc:
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5f06a3b4 2f00d13d 6878d005 f0ed1c29 2800ef52 =../..xh)...R..(
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5f06a3c4 2334d135 43701c18 23904641 468158cb 5.4#..pCAF.#.X.F
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5f06a3d4 6b1b444b d04a2b00 d02f2e00 46404b30 KD.k.+J.../.0K@F
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5f06a3e4 58c31cb2 58d30092 d0272b00 041b9b0e ...X...X.+'.....
05-27 15:08:42.610 145-145/? I/DEBUG﹕ 5f06a3f4 93030c1b 041b9b0f 93000c1b 041b9b10 ................
05-27 15:08:42.610 145-145/? I/DEBUG﹕ code around lr:
05-27 15:08:42.620 145-145/? I/DEBUG﹕ 5f157a7c e1a00002 e1a0200c e1a0c001 e1a01003 ..... ..........
05-27 15:08:42.620 145-145/? I/DEBUG﹕ 5f157a8c e1a0300c eaffffff e92d4001 ebffffd4 .0.......@-.....
05-27 15:08:42.620 145-145/? I/DEBUG﹕ 5f157a9c e3500000 43700000 e8bd8001 e52de008 ..P...pC......-.
05-27 15:08:42.620 145-145/? I/DEBUG﹕ 5f157aac ebfffff8 03a00001 13a00000 e49df008 ................
05-27 15:08:42.620 145-145/? I/DEBUG﹕ 5f157abc e52de008 ebfffff3 33a00001 23a00000 ..-........3...#

Has anyone tried the multi-language support featured in tesseract 3.02?

I tried the new multi-language feature in tesseract 3.02 but it doesn't seem to work.

For example, the image contains english and japanese words so during initialization I put in english + japanese combo:
_tesseract = new TessBaseAPI();
_tesseract.init(tesseractDatapath, "eng+jpn");
_tesseract.setImage(_imageToProcess);

The ocr result seems to be the same whether i use "eng" or "eng+jpn", english seems to dominate and the japanese words become random symbols. If i just use "jpn" the japanese words do get ocr'ed nicely into text but obviously the english words doesn't get ocr'ed well.

At this point I'm not sure if multi-language a false advertising on Google's side, or is the android version tess-two doesn't support multi-language?

Thanks in advance!
Bruce

Unable to start the program

I am getting error as unable to start program G:...\vs2010\Debug\cntraining-debug.exe

This application has failed to start the application configuration is incorrect. Review the manifest file for possible errors
Reinstallinh the application may fix this problem .. please help

How to use EYES-TWO..?

hi,,,
i am able to use tess-two lib...but i m not getting any way in which or how i can use eyes-two or tess-two-test...
What is use of above ...?
How we can use in Android-OCR?
What is diffrent output we get thn tess-two..?
Please Explain guys.

Build fails on Window windows-x86_64

To build eyes-two
F:\android\tess-two-master\eyes-two>ndk-build
[armeabi] Compile++ thumb: hydrogen <= clusterer.cpp
[armeabi] Compile++ thumb: hydrogen <= hydrogentextdetector.cpp
[armeabi] Compile++ thumb: hydrogen <= thresholder.cpp
[armeabi] Compile++ thumb: hydrogen <= utilities.cpp
[armeabi] Compile++ thumb: hydrogen <= validator.cpp
[armeabi] Compile++ thumb: hydrogen <= hydrogentextdetector.cpp
[armeabi] Compile++ thumb: hydrogen <= thresholder.cpp
[armeabi] Compile++ thumb: hydrogen <= jni.cpp
make.exe: *** No rule to make target jni/../../tess-two/libs/armeabi/liblept.so ', needed byobj/local/armeabi/libhydrogen.so'. Stop.

Getting Fatal signal 11 error while capture line of numbers

I captured a pic with about 16 number no characters between them.
image size x = 500 , y = 100
decoded to bitmap with options.inSampleSize = 2;
the line divided into 3 words e.g. 32130 22121 21691

capturing an image with line of characters works without errors

32130 22121 21691 this give error.
asdfag grdad fgefgt this dont give error.

please if you have the app try capture this line and see yourself.

Tess-two performance comparing with original

I try to use this library since I want to implement OCR on my Android application. But, when I try it, the performance is worse than the original one. I have some image, it's very simple image with 1 sentence. I feed it to tess-two, it give me nothing. I feed it to original tesseract, it give very correct output. Then, I realize that traineddata used on tess-two is different, then I replace it from the original one. But, the result is still bad. Do tess-two using completely original engine or not? Anybody can give some suggestion?

tess-two (or Tesseract) crashing with large images

Hi,

I'm using tess-two without problems since March/April. As you upgraded to Tesseract 3.02 I downloaded the new source code, but I get errors with large images (about 1000x1000px)

10-11 11:13:13.135: I/Tesseract(native)(15675): Initialized Tesseract API with language=eng
10-11 11:13:13.255: D/memalloc(15675): /dev/pmem: Mapped buffer base:0x5612c000 size:21106688 offset:20811776 fd:75
10-11 11:13:13.365: D/memalloc(15675): /dev/pmem: Mapped buffer base:0x5760e000 size:21401600 offset:21106688 fd:82
10-11 11:13:13.795: D/memalloc(15675): /dev/pmem: Unmapping buffer base:0x548fa000 size:20811776 offset:20639744
10-11 11:13:14.696: D/dalvikvm(15675): Trying to load lib /data/data/com.matpergo.androcr/lib/liblept.so 0x40da57f0
10-11 11:13:14.696: D/dalvikvm(15675): Shared lib '/data/data/com.matpergo.androcr/lib/liblept.so' already loaded in same CL 0x40da57f0
10-11 11:13:14.786: D/dalvikvm(15675): Trying to load lib /data/data/com.matpergo.androcr/lib/liblept.so 0x40da57f0
10-11 11:13:14.786: D/dalvikvm(15675): Shared lib '/data/data/com.matpergo.androcr/lib/liblept.so' already loaded in same CL 0x40da57f0
10-11 11:13:15.727: A/libc(15675): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)

The previous version works flawlessy with the same images...

Thanks for your great work, bye.

TessBaseAPI.OEM_TESSERACT_CUBE_COMBINED raise error in android

Hi..
I am working on OCR app and using github's tess-two of Tesserect library
But when i set TessBaseAPI.OEM_TESSERACT_CUBE_COMBINED in init method it raise fatel error..

i dont know why this happen.
To use TessBaseAPI.OEM_TESSERACT_CUBE_COMBINED mode need anything extra to add in app.
Help me for find solution

ndk-build fail, .o.d file is generated after compile instead of .o file

I am using windows 8.1 64 bit and android ndk r9c. I am using Git shell to ndk-build tess-two. Some error occur like below:
picture1
The object directory show .o.d file.
picture2

Any reason to this problem. Thanks. I am still a beginner in this, so there might be some silly mistake i have done. Truly appreciate for any advice.

Build error.

I'm new to the android development game and I'm getting this error after I set up the NDK_Builder:
Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'tess-two'.
Exception occurred executing command line.
Cannot run program "C:\Users\Sheridjohn\Desktop\workspace\tess-two-master\tess-two\build.xml" (in directory "C:\Users\Sheridjohn\Desktop\workspace\tess-two-master\tess-two"): CreateProcess error=193, %1 is not a valid Win32 application

MIPS Build fails

Prebuilt : libgnustl_static.a <= /sources/cxx-stl/gnu-libstdc++/libs/mips/
SharedLibrary : liblept.so
/home/z/Library/ProgramFiles/android-ndk-r7bm/toolchains/mips-linux-android-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/mips-linux-android/4.4.3/../../../../mips-linux-android/bin/ld: ./obj/local/mips/libgnustl_static.a(math_stubs_float.o): relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used when making a shared object; recompile with -fPIC
./obj/local/mips/libgnustl_static.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [obj/local/mips/liblept.so] Error 1

ndk-build fails

when I run ndk-build, it complains from the following errors:

$ ndk-build
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
Compile arm : jpeg <= jcapimin.c
make: /home/maryam/tools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
make: *** [obj/local/armeabi/objs/jpeg/jcapimin.o] Error 127


The problem is that although it says "command not found", "arm-linux-androideabi-gcc" exists in the above path. Even when I run "arm-linux-androideabi-gcc" directly from /.../toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/ it gives the same error of "command not found"

I also added ./toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin to my PATH but still getting the same error. Even I tried different versions of ndk (7, 7b, 6b) still same error! seems to me the above gcc is meant for 32bit machines whereas my machine is "Linux 2.6.32-37-server x86_64". but I guess the ndk package should work for both 32 and 64bit. am I right? do I need to compile or build ndk before using it? I assume downloading and unpacking is all I have to do. right? how about sdk? I just downloaded and unpacked it at the same folder that I have my ndk. do I need to configure them to work with each other?

Couldn't load lept: findLibrary returned null

I've followed the build instructions but when the application tries to create an instance of the class TessBaseAPI I get an error.

11-24 20:38:21.219: E/AndroidRuntime(11472): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load lept: findLibrary returned null

I have tried cleaning all projects but received no results.

Any ideas?

java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared: findLibrary returned null

I am using sqlcipher.jar for encrypting database in android and also using it's native library in

libs/armeabi folder

1)libdatabase_sqlcipher.so

2)libsqlcipher_android.so

3)libstlport_shared.so

and

libs/x86 folder

1)libdatabase_sqlcipher.so

2)libsqlcipher_android.so

3)libstlport_shared.so

and jar file named sqlcipher.jar in libs/ folder all i have imported

now every thing is working fine it's going good database is fetching and reading from sqlite is also working fine and also i am not getting any kind of error in SQLiteDatabase.loadLibs(context); line

but i want to implement also OCR in my project to do that i am importing project named tess-two from this http://code.google.com/p/tesseract-ocr/ and https://github.com/rmtheis/tess-two in that there is a library named tess-two folder

and i am importing that project library into my android project and i cleaned my project and run it at that time i got the error in line SQLiteDatabase.loadLibs(context);

again when i removed tess-two library and doing uninstall from device and doing clean and build and run it's working fine no error is occurring, i want OCR functionality also in my project can anybody help me

Add Maven support pom.xml to project

Please add Maven pom.xml to project, as described in docs.

It's a pain to manually add it each time project is checked out - and prevents smooth automatic build.

binaraize image help

I want to know if the Binarize.java in the tess-two project is working,
and if so how to use it to binarize image befor OCR it ?? I tried alot but I couldn't use it.
thank you

Could not find tess-two.apk!

1.I complie in cygwin follow the readm steps..
2. and import in my project(myocr) as library project.
3. now when i try to run the program my application myocr.apk goes in android emulator and install but when the tes-two project library turns come it display the error that

"Could not find tess-two.apk!"

:(
Please Help

Getting result words array

Hi, i have a problem, and need your help. I need to get an array of words after calling getUTF8Text(), not just a string. When i'm trying to do it by myself the size of this array does not match the size of boundingBoxes array(for example). Please, can you explain me how can i do this& Thank a lot and sorry for my bad English.Platform: Android (Java)

Tesserect : Recognized Text From Image come up with very Poor Quality

Hi..Guys
Now a days i am working on OCR app and i am using the Tesserect Tess-two Library.
I am set up everything and i am run my ocr app with no error.
But when i scan image the extracted text come up with less than 50% accuracy.
I am not get exact result as printed text from an image.
How can i get accuracte result or better result.
I am also apply image pre-processing ( Make image black and white) but still no result)
So please help me and suggest me how to improve the accuracy of result of ocr.

Tess-two for android studio

Am a noob at this and am trying to setup tess two along with the ndk for use in android studio. can u please. thanks in advance

Could not initialize Tesseract API with language=eng!

I am getting the above error message when I try to use tess-two in my Android application. I am able use the Simple-Android-OCR application and I have used some of the code from it in my own application. This is where I try to initialize the API:

TessBaseAPI baseApi = new TessBaseAPI();
baseApi.setDebug(true);
baseApi.init(path.getAbsolutePath(), lang);

Here are the variables used:

public static File path = getExternalFilesDir(Environment.DIRECTORY_PICTURES);
public static final String lang = "eng";

I don't know why I am getting this error and I don't know how to go about fixing it. I have done some searches but I didn't turn up anything useful. I did look at some of the source code and I saw where this error is printed, but I couldn't find the api.Init(c_dir, c_lang) method that it refers to. I would appreciate any help in tracking this error down.

UnsatisfiedLinkError

I am getting this error:

03-09 21:49:57.368: E/AndroidRuntime(27702): java.lang.UnsatisfiedLinkError: Couldn't load lept from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.datumdroid.android.ocr.simple-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.datumdroid.android.ocr.simple-2, /vendor/lib, /system/lib]]]: findLibrary returned null

This happens here:

03-09 21:49:57.368: E/AndroidRuntime(27702):    at com.datumdroid.android.ocr.simple.SimpleAndroidOCRActivity.onPhotoTaken(SimpleAndroidOCRActivity.java:211)

Which is this code:

TessBaseAPI baseApi = new TessBaseAPI();

From previous issues, they have said to make sure the build target is the same in the library as the project, but it is, as seen in these screenshots:
capture
capture1

ndk-build problems

While we reference tess-two project to Android-simple-ocr app it raise unsatisfiedLinkError and says tess library gives null value.
i am build tess-two on ndk-8rb but it only generated the lept.so file not tess.so
how can i build tess so that the problem could solve
need help please

user_patterns_suffix

Hi,
I would like to use the Tesseract feature described here in "CONFIG FILES AND AUGMENTING WITH USER DATA" : http://tesseract-ocr.googlecode.com/svn-history/r719/trunk/doc/tesseract.1.html

I need to specify a regex to match the recognition of a particular set of words.
In the doc they said that this can be done setting the variable "user_patterns_suffix" that takes as value the name of a file "user-patterns" where I need to put the regex.
I created a config file and put it in configs/ dir, then I loaded it with the ReadConfigFile() method of tess-two API.
This doesn't seem to work as expected.
I'm sure that the config file is correctly loaded because if I try to set in the file the "tessedit_char_whitelist" property, this works as expected.
So I think that the problem is in the "user_patterns_suffix".

Any idea?
Is there any alternative tess-two API method to limit the recognition of Tesseract to a set of words given a regex?

Thanks in advance for your help

text to png

I want to know if there is any method that I can use to convert/save the OCR-ed text into png format?
In my project I want to save the ocr-ed text so that I can use it for AR purpose.
thank you!

Tesseract not building

Hi.. I am trying to build ndk. I am working on Windows 7 64-bit version. And ndk r7c. I am able to build Leptonia files but not Tesseract. Please help me with the issue.
ebf6b87e-85f3-11e3-8198-f4f399518eb1

WriteFile don't work as expected

Hi all,

I'm tring to create a OCR program using your code, but I'm having a lot of unexpected trouble and decided to create a JUnit test file to validate the class com.googlecode.leptonica.android.WriteFile.

The result of the tests follow below:

. The two writeBytes8 methods creates a invalid file format with 4.9Mb. I tried to open the file using Gimp 2.6 (attached image) but received a error dialog;
. The method writeFiles throw a RuntimeException with the message "writeFiles() is not currently supported". It is ok to me, because if the API say do not use, is supposed to don't use;
. The method writeMem always return null;
. The two methods writeImpliedFormat return true - that means success - but the files don't exist anywhere;
. The only method that works is the writeBitmap method.

The image used for test was taken from the camera and is a valid image.

Environment ---------------------------------------------------
Darwin Eduardo-Mac 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

Eclipse Android Developer Tools: Build: v21.1.0-569685
Android Debug Bridge version 1.0.31
ndk-build version: GNU Make 3.81 (This program built for i386-apple-darwin10.8.0)

JUnit ---------------------------------------------------
package com.googlecode.leptonica.android.test;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import junit.framework.Assert;
import junit.framework.TestCase;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory.Options;
import android.graphics.BitmapFactory;
import android.os.Environment;
import android.util.Log;

import com.googlecode.leptonica.android.Constants;
import com.googlecode.leptonica.android.Pix;
import com.googlecode.leptonica.android.Pixa;
import com.googlecode.leptonica.android.ReadFile;
import com.googlecode.leptonica.android.WriteFile;

public class WriteFileFullTest extends TestCase {

private static final String WRITE_FILES = "WriteFiles.jpg";
private static final String WRITE_BYTES8 = "WriteBytes8Pix.jpg";
private static final String WRITE_BYTE_ARRAY = "WriteBytes8PixByteArray.jpg";
private static final String WRITE_MEM = "WriteMem.jpg";
private static final String WRITE_IMPLIED_FORMAT2 = "WriteImpliedFormat.jpg";
private static final String WRITE_IMPLIED_FORMAT = "WriteImpliedFormat2.jpg";
private static final String WRITE_BITMAP_JPG = "WriteBitmap.jpg";

private Bitmap bitmap;
private File dir;

public WriteFileFullTest() {
}

@Override
protected void setUp() throws Exception {
    this.dir = Environment.getExternalStorageDirectory();

    Log.i("WriteFileFullTest", "getExternalStorageDirectory: " + dir.getAbsolutePath());

    String pathName = dir.getAbsolutePath() + "/image.jpg";
    Log.i("WriteFileFullTest", "Bitmap pathName: " + pathName);

    Options options = new Options();
    options.inPreferredConfig = Bitmap.Config.ARGB_8888;
    bitmap = BitmapFactory.decodeFile( pathName, options);
}

@Override
protected void tearDown() throws Exception {
    bitmap.recycle();
}

public void testWriteBytes8Pix() throws IOException {
    Pix pixs = ReadFile.readBitmap(bitmap);
    try {
        byte[] buffer = WriteFile.writeBytes8(pixs);

        FileOutputStream out = new FileOutputStream( new File( dir, WRITE_BYTES8) );
        try {
            out.write(buffer);
        } finally {
            out.close();
        }
    } finally {
        pixs.recycle();
    }
}

public void testWriteBytes8PixByteArray() throws IOException {
    Pix pixs = ReadFile.readBitmap(bitmap);
    try {
        int size = pixs.getWidth() * pixs.getHeight();
        byte[] buffer = new byte[size];
        int written = WriteFile.writeBytes8(pixs, buffer);

        Assert.assertEquals(size, written);

        FileOutputStream out = new FileOutputStream( new File( dir, WRITE_BYTE_ARRAY) );
        try {
            out.write(buffer);
        } finally {
            out.close();
        }
    } finally {
        pixs.recycle();
    }
}

public void testWriteFiles() {
    Pix pixs = ReadFile.readBitmap(bitmap);
    try {
        Pixa pixa = Pixa.createPixa(pixs.getWidth() * pixs.getHeight(), pixs.getWidth(), pixs.getHeight());
        pixa.addPix(pixs, Constants.L_CLONE);

        boolean success = WriteFile.writeFiles(pixa, new File(dir, WRITE_FILES), "pre", Constants.IFF_JP2);
        if (!success) {
            fail("testWriteFiles fail!");
        }
    } finally {
        pixs.recycle();
    }
}

public void testWriteMem() throws IOException {
    Pix pixs = ReadFile.readBitmap(bitmap);
    try {
        // Constants.IFF_JP2 returns null
        // Constants.IFF_JFIF_JPEG returns null
        // Constants.IFF_PNG returns null
        byte[] buffer = WriteFile.writeMem(pixs, Constants.IFF_GIF);
        if (buffer == null) {
            fail("testWriteMem fail!");
        }

        FileOutputStream out = new FileOutputStream( new File( dir, WRITE_MEM) );
        try {
            out.write(buffer);
        } finally {
            out.close();
        }
    } finally {
        pixs.recycle();
    }
}

public void testWriteImpliedFormatPixFile() {
    Pix pixs = ReadFile.readBitmap(bitmap);
    try {
        boolean success = WriteFile.writeImpliedFormat(pixs, new File(dir, WRITE_IMPLIED_FORMAT2));
        if (!success) {
            fail("testWriteImpliedFormatPixFile fail!!");
        }
    } finally {
        pixs.recycle();
    }
}

public void testWriteImpliedFormatPixFileIntBoolean() {
    Pix pixs = ReadFile.readBitmap(bitmap);
    try {
        boolean success = WriteFile.writeImpliedFormat(pixs, new File(dir, WRITE_IMPLIED_FORMAT), 100, true);
        if (!success) {
            fail("testWriteImpliedFormatPixFile fail!!");
        }
    } finally {
        pixs.recycle();
    }
}

public void testWriteBitmap() throws IOException {
    Pix pixs = ReadFile.readBitmap(bitmap);
    try {
        Bitmap bmp = WriteFile.writeBitmap(pixs);
        FileOutputStream out = new FileOutputStream( new File( dir, WRITE_BITMAP_JPG) );
        try {
            bmp.compress(CompressFormat.JPEG, 100, out);
        } finally {
            out.close();
        }
    } finally {
        pixs.recycle();
    }
}

}

Thanks in advance for any help!!
screen shot 2013-05-20 at 12 00 41 am

Building Tess-Two Error

i want solution for that error while building tess-two for Google OCR
Errors running builder 'Integrated External Tool Builder' on project 'tess-two'.
Exception occurred executing command line.
Cannot run program "D:\ezzat\android-ndk-r9d\ndk-build" (in directory "C:\Users\eeissa\Desktop\tess-two-master\tess-two"): CreateProcess error=193, %1 is not a valid Win32 application

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.