Comments (7)
What version of the product are you using? On what operating system?
tessreact-for-android-1.00 (Lastest version from the svn as of 2011-06-14)
used ubuntu32 11.04 in a VirtualBox to build so files
source versions as in readme file
java application compiled using eclipse on Windows 7 64
What steps will reproduce the problem?
See previous Post
What is the expected output? What do you see instead?
I expect a B&W image with the text (foreground) in black and the background in
white.
I get text in white with a black background, with kind of blocky pixels that is
non-usable and barely readable.
Original comment by [email protected]
on 15 Jun 2011 at 1:02
from tesseract-android-tools.
I managed to fix the problem. It was when converting the 1bpp PIX to the 32 bit
Android Bitmap.
The problem lies at line 194 of Writefile.cpp.
This line :
dstx[0] = dstx[1] = dstx[2] = (srcx[0] & (dw % 8)) ? 0xFF : 0x00;
needs to be replaced by:
dstx[0] = dstx[1] = dstx[2] = (1 << (7 - (dw & 7)) & srcx[0]) ? 0x00 : 0xFF;
The basic problem was that the bitwise AND was comparing srcx[0], an 8 bit
integer (0-255), with the result of the modulo which is only 3 bits (0-7).
Needs to compare with decreasing powers of 2 (like 2^(7-0)), so 128, 64, 32
etc...
Also I inverted the results, to get a black foreground with a white background
(? 0x00 : 0xFF).
Original comment by [email protected]
on 17 Jun 2011 at 8:36
from tesseract-android-tools.
convertTo8 has similiar problem, do you know how to fix it? The following codes
can not get acceptable result.
Pix p = Convert.convertTo8(ReadFile.readBitmap(bitmap));
baseApi.setImage(p);
Original comment by [email protected]
on 13 Jan 2012 at 3:36
from tesseract-android-tools.
bitmap is from Camera preview frame data processed by:
public Bitmap renderCroppedGreyscaleBitmap() {
int width = getWidth();
int height = getHeight();
int[] pixels = new int[width * height];
byte[] yuv = yuvData;
int inputOffset = top * dataWidth + left;
for (int y = 0; y < height; y++) {
int outputOffset = y * width;
for (int x = 0; x < width; x++) {
int grey = yuv[inputOffset + x] & 0xff;
pixels[outputOffset + x] = 0xFF000000 | (grey * 0x00010101);
}
inputOffset += dataWidth;
}
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
return bitmap;
}
If I use a bitmap from file, convertTo8 and setImage work fine.
Original comment by [email protected]
on 13 Jan 2012 at 4:01
from tesseract-android-tools.
I am searching OCR for Credit Cards and bank Cheques.I found OCR tool for
Cheques i.e, Clear Check 21 MICR but for the Credit cards I didn't get any OCR
tool.Is there any OCR library to support to develop Application for reading
cheques and cards.If anyone know about this please give me some
suggestions.............
Original comment by [email protected]
on 20 Feb 2012 at 12:08
from tesseract-android-tools.
hi eric
i have developed OCR application using android tesseract tools. there is a
binarization using otsu and now im trying to change the binarization method
using sauvola.
where should i make change?
here is the source of android tesseract that i am using as libarary for the
application
https://github.com/rmtheis/tess-two
best regards
Original comment by [email protected]
on 21 Feb 2012 at 11:53
from tesseract-android-tools.
Thanks Eric. Merged your fix in.
Original comment by [email protected]
on 11 Sep 2012 at 8:24
- 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 HOT 1
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.