Comments (4)
Sorry. I forgot to include the logcat details. Here they are:
10-06 16:33:46.921: VERBOSE/Tesseract(native)(18050):
Java_com_googlecode_tesseract_android_TessBaseAPI_nativeClassInit
10-06 16:33:46.921: VERBOSE/Tesseract(native)(18050):
Java_com_googlecode_tesseract_android_TessBaseAPI_nativeConstruct
10-06 16:33:46.931: VERBOSE/Tesseract(native)(18050):
Java_com_googlecode_tesseract_android_TessBaseAPI_nativeInit
10-06 16:33:46.931: INFO/Tesseract(native)(18050): Attempting Init() with
dir=/mnt/sdcard/tesseract/, lang=eng
10-06 16:33:47.041: INFO/Tesseract(native)(18050): Initialized Tesseract API
with language=eng
10-06 16:33:47.041: VERBOSE/Kishore(18050): Kishore:Accessed
10-06 16:33:47.041: DEBUG/dalvikvm(18050): Trying to load lib
/data/data/iitgn.ocr/lib/liblept.so 0x4601cdb8
10-06 16:33:47.041: DEBUG/dalvikvm(18050): Shared lib
'/data/data/iitgn.ocr/lib/liblept.so' already loaded in same CL 0x4601cdb8
10-06 16:33:47.041: DEBUG/AndroidRuntime(18050): Shutting down VM
10-06 16:33:47.041: WARN/dalvikvm(18050): threadid=1: thread exiting with
uncaught exception (group=0x400259f8)
10-06 16:33:47.051: ERROR/AndroidRuntime(18050): FATAL EXCEPTION: main
Original comment by [email protected]
on 6 Oct 2011 at 11:04
from tesseract-android-tools.
Well, I figured this out. It is not the nativeSetImagePix that wasnt being
accessed. There was a problem in reading the file in the readBitmap function
because the bitmap wasnt in the ARGB_8888 format.
This piece of code is required instead:
final TessBaseAPI baseApi = new TessBaseAPI();
baseApi.init(TESSBASE_PATH, DEFAULT_LANGUAGE);
// baseApi.setPageSegMode(TessBaseAPI.PSM_SINGLE_LINE);
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inPreferredConfig = Bitmap.Config.ARGB_8888;
final Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.digits, opt);
ImageView img = (ImageView) findViewById(R.id.imageView1);
img.setImageBitmap(bmp);
baseApi.setImage(bmp);
Original comment by [email protected]
on 6 Oct 2011 at 11:45
from tesseract-android-tools.
Original comment by [email protected]
on 11 Sep 2012 at 8:36
- Changed title: Throw exception for unsupported Bitmap types
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from tesseract-android-tools.
Check already exists in ReadFile.readBitmap().
Original comment by [email protected]
on 14 Sep 2012 at 6:37
- Changed state: Fixed
from tesseract-android-tools.
Related Issues (20)
- PSM constants are incorrect HOT 1
- Add tests for Bitmap <=> Pix conversion
- Error in loading eng.traineddata (3.01) using com.android.content.res.AssetManager() HOT 6
- Can not figure out which word corresponds to which confidence value. Hope the output api is as rich as in tesseract C++ API. HOT 1
- Getting Fatal signal 11 error while capture line of numbers HOT 1
- Update to Tesseract 3.02 HOT 1
- Missing files for native build HOT 1
- Binarize Image in tesseract
- How do I use tesseract-andriod-tools?
- WriteFile don't work as expected
- ndk-build fail allheaders.h missing HOT 4
- ndk-build failure due to unsafe fprintf usage in tesseract source. HOT 1
- Assert failed when using tesseract with PSM_OSD_ONLY flag
- nativeSetImage not found
- ChoiceIterator
- Getting result words array
- javax.imageio.IIOException: ICC APP2 encountered without prior JFIF in Tesseract OCR
- root galaxy centra sch-7
- how to Image binarization
- error on compiling tessaract-android-tools ndk-build fails
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 tesseract-android-tools.