Comments (14)
From the original post...
couldn't find "libpngt.so"
I ran into this before. In Android studio, right click the module, select "Open Module Settings", click the "Dependencies" tab, remove the "easy_ocr_library", click "OK". Then right click the "easy_ocr_library" in your project, select "Open Module Settings" and remove the "easy_ocr_library" module by using the red "-". Close Android Studio then go to your folder that contains the "easy_ocr_library" and delete the whole "easy_ocr_library" folder and rebuild it from new.
This doesn't solve the core problem but gets you back to where you were I've found.
from easy-ocr-scanner-android.
Changing the dependency of easy_ocr_library module should solve the problem:
- Delete tess-two module
- Add a maven dependency
com.rmtheis:tess-two:6.1.1
from easy-ocr-scanner-android.
I had exactly the same issue. Is there any way to solve this? It happens right after you take the picture. It tries to scan for a while, then crashes. That's my first time working with an OCR API, and I must say your code helped me a lot to have the basis. If you could tell how to go through this, it would be great. Thanks!
from easy-ocr-scanner-android.
I am having my exams. Will look into this after exams. If you write steps to reproduce it, that would be great.
from easy-ocr-scanner-android.
Thanks for your reply. I repeated all the steps carefully to run the app, and for some reason it works now. One thing I dont now how to deal with is the quality of the recognition and also the time spent, very long sometimes, and not returning a satisfactory result after it. Do you know how I could improve this?
Thanks again.
from easy-ocr-scanner-android.
@gsiqueira Time spent depends on the quality of the image. Large image size means more time needed to process it.
from easy-ocr-scanner-android.
Yes, I tried some things to solve this problem, I reduced the size (640x460 and smaller) of the image taken, tried to binarize it, turn flash on, to improve brightness, but I still get the same result, which takes about one and two minutes to finish the process. The image I used to test has just 10 short lines, is this normal?
I was looking at the code here, and I found the following:
https://cloud.githubusercontent.com/assets/7751486/15730868/c7a96e24-2846-11e6-8c09-5de5607f2443.png
It is strange, because android studio builds the app and it works. I am just showing you this because I don't know if it has something to do with my problem.
Below you find the image I used and the best result I took. Thank you a lot for your attention in my problem.
Source image
https://cloud.githubusercontent.com/assets/7751486/15731177/83f3e27e-2849-11e6-8975-08bb5604edf2.jpg
Result
https://cloud.githubusercontent.com/assets/7751486/15731159/559518f8-2849-11e6-9368-9f0cfd988663.png
from easy-ocr-scanner-android.
Well the accuracy of OCR is not 100% accurate, at least this is the case for the ones those are open sourced.
from easy-ocr-scanner-android.
Hi, I had received exactly the same error.
from easy-ocr-scanner-android.
i have also issue.facing crash.Any solution priyankvex.
Thanks in advance
logcat result:
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: Activity com.wordpress.priyankvex.easyocrscannerdemo.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{41f8c370 V.E..... R......D 0,0-304,96} that was originally added here
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: android.view.WindowLeaked: Activity com.wordpress.priyankvex.easyocrscannerdemo.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{41f8c370 V.E..... R......D 0,0-304,96} that was originally added here
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.view.ViewRootImpl.(ViewRootImpl.java:409)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:218)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.app.Dialog.show(Dialog.java:281)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at com.wordpress.priyankvex.easyocrscannerdemo.MainActivity.onOcrScanStarted(MainActivity.java:59)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at com.wordpress.priyankvex.easyocrscannerdemo.ImageProcessingThread.onPreExecute(ImageProcessingThread.java:51)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.os.AsyncTask.execute(AsyncTask.java:534)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at com.wordpress.priyankvex.easyocrscannerdemo.EasyOcrScanner.onImageTaken(EasyOcrScanner.java:44)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at com.wordpress.priyankvex.easyocrscannerdemo.MainActivity.onActivityResult(MainActivity.java:46)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.app.Activity.dispatchActivityResult(Activity.java:5311)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.app.ActivityThread.deliverResults(ActivityThread.java:3521)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3568)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.app.ActivityThread.access$1100(ActivityThread.java:162)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.os.Handler.dispatchMessage(Handler.java:107)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.os.Looper.loop(Looper.java:194)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at android.app.ActivityThread.main(ActivityThread.java:5371)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at java.lang.reflect.Method.invokeNative(Native Method)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at java.lang.reflect.Method.invoke(Method.java:525)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
01-02 00:54:02.801 19607-19607/com.wordpress.priyankvex.easyocrscanner E/WindowManager: at dalvik.system.NativeStart.main(Native Method)
from easy-ocr-scanner-android.
Facing the same issue. Any solution?
Here is my log:
08-22 15:14:39.674 15432-16033/com.wordpress.priyankvex.easyocrscanner D/OcrScanner: tessdata already present
08-22 15:14:39.721 15432-16033/com.wordpress.priyankvex.easyocrscanner E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.wordpress.priyankvex.easyocrscanner, PID: 15432
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-support-annotations-22.2.1_d1acf46021f20f049c52e8e8d2eef24d273c7976-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-internal_impl-22.2.1_e15adb6504281a2254b4ee3bf34531e1c042464d-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-com.android.support-support-v4-22.2.1_f36f4d36fecc7b76b177aa9708feabdb64dd924c-classes.dex", dex file "/data/data/com.wordpress.priyankvex.easyocrscanner/files/instant-run/dex/slice-com.android.support-appcompat-v7-22.2.1_4daf6349f79e575f360e5411107bef913a07530a-classes.dex"],nativeLibraryDirectories=[/data/app/com.wordpress.priyankvex.easyocrscanner-1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libpngt.so"
at java.lang.Runtime.loadLibrary(Runtime.java:367)
at java.lang.System.loadLibrary(System.java:1076)
at com.googlecode.tesseract.android.TessBaseAPI.(TessBaseAPI.java:43)
at com.wordpress.priyankvex.easyocrscannerdemo.ImageProcessingThread.scanImage(ImageProcessingThread.java:142)
at com.wordpress.priyankvex.easyocrscannerdemo.ImageProcessingThread.doInBackground(ImageProcessingThread.java:58)
at com.wordpress.priyankvex.easyocrscannerdemo.ImageProcessingThread.doInBackground(ImageProcessingThread.java:26)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
08-22 15:14:40.139 15432-15432/com.wordpress.priyankvex.easyocrscanner E/WindowManager: android.view.WindowLeaked: Activity com.wordpress.priyankvex.easyocrscannerdemo.MainActivity has leaked window com.android.internal.policy.PhoneWindow$DecorView{7e5d8de V.E...... R......D 0,0-1026,348} that was originally added here
at android.view.ViewRootImpl.(ViewRootImpl.java:368)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:302)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:86)
at android.app.Dialog.show(Dialog.java:322)
at com.wordpress.priyankvex.easyocrscannerdemo.MainActivity.onOcrScanStarted(MainActivity.java:59)
at com.wordpress.priyankvex.easyocrscannerdemo.ImageProcessingThread.onPreExecute(ImageProcessingThread.java:51)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:604)
at android.os.AsyncTask.execute(AsyncTask.java:551)
at com.wordpress.priyankvex.easyocrscannerdemo.EasyOcrScanner.onImageTaken(EasyOcrScanner.java:44)
at com.wordpress.priyankvex.easyocrscannerdemo.MainActivity.onActivityResult(MainActivity.java:46)
at android.app.Activity.dispatchActivityResult(Activity.java:6508)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3702)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3749)
at android.app.ActivityThread.access$1400(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1400)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
from easy-ocr-scanner-android.
Hi,
I get the same error, while running in LG G3:
10-31 09:58:20.790 19999-22301/com.wordpress.priyankvex.easyocrscanner E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.wordpress.priyankvex.easyocrscanner, PID: 19999
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
...
@gsiqueira
Do you have any ideas what was the root cause in your case?
from easy-ocr-scanner-android.
Hi all, seems studio removes build directory, i fixed the problem by: git checkout easy_ocr_library/libs/tess-two/build/*
Check that needed files not deleted by git status
.
from easy-ocr-scanner-android.
Still not working for me...!! Cannot resolve ImageProcessingThread
from easy-ocr-scanner-android.
Related Issues (10)
- Error while click on button HOT 2
- application crash while returing resoult from camera
- Crash HOT 1
- Detection of shape boundary dynamically ex. ( (business card) Rectangle , square and Circle) from the camera? #50 HOT 1
- is there algorithm or process to Isolate the text from the background to make better performance HOT 1
- Hello please help me in this error when progress dialog appear app crashed
- No setup guide. HOT 1
- gathering all results at once
- Where is the dependency?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easy-ocr-scanner-android.