Comments (8)
The correct use of the TESS4J-API with the default tessdata folder:
File imageFile = new File("C:\\random.png");
Tesseract instance = Tesseract.getInstance();
//In case you don't have your own tessdata, let it also be extracted for you
File tessDataFolder = LoadLibs.extractTessResources("tessdata");
//Set the tessdata path
instance.setDatapath(tessDataFolder.getAbsolutePath());
try {
String result = instance.doOCR(imageFile);
System.out.println(result);
} catch (TesseractException e) {
System.err.println(e.getMessage());
}
Please use the latest release: 1.4.1
from tess4j.
Hi there!
Please post here the main method or class you where are calling the doOCR() method, thx.
from tess4j.
Sure!
// Tess4J
Tesseract instance = Tesseract.getInstance();
instance.setPageSegMode(4);
try {
String content = instance.doOCR(page);
} catch (TesseractException e) {
e.printStackTrace();
}
from tess4j.
Thank you, this worked!
Is there any documentation on this?
By the way, this led me to another bug #10
from tess4j.
We are working hard on the project right now, refactoring and testing are taking time, but soon we will deliver better documentation.
Thanks for creating the issue, please help us grow and let us know who is using tess4j: https://github.com/nguyenq/tess4j/wiki/Who-is-using-Tess4J
from tess4j.
Thank you, this worked! [4F2E4A2E]
from tess4j.
@4F2E4A2E Thank you, i'ts working now. I hope we could find more easily the doc in the futur ;) (maybe put the Tutorial directly in the readme file for a direct visioning in github ?)
from tess4j.
Is there a distinction between vertical reading and horizontal reading in picture reading?
from tess4j.
Related Issues (20)
- TIFF to PDF (text_only==false) recognition (or conversion) failed. HOT 3
- Tess4j not work on Mac M1 even with new JNA5.12.1 HOT 2
- linux
- Memory leak when using tess4j for parallel processing in docker environment HOT 1
- Tess4j does not correctly handle images with alpha channel HOT 8
- java.lang.UnsatisfiedLinkError : Error Looking Up function TessBaseAPICreate : The specified procedure can not be found. Tess4j 5.8.0 HOT 5
- LoadLibs copies files into wrong directory when a custom value for jna.library.path is set HOT 5
- Unable to set non-English datapath in Tess4J HOT 2
- Remove hardcoded support for TIFF from `jai-imageio` HOT 1
- Error: tesseract::Tesseract::recog_all_words
- Tesseract1.doOCR method doesn't take into account the stride of the image HOT 6
- TessBaseAPIInit1 calls fail with "Invalid memory access" on Windows 10 with included Tesseract Windows 32-bit DLL HOT 6
- tesseract-ocr and tess result are different HOT 2
- JVM crash on linux with tess4j
- The recognition results of tesseract-ocr and tess4j are not the same HOT 6
- Mac m1 : fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e) HOT 1
- Tesseract CLI gives better results than Tess4J HOT 7
- JVM crash when run TessAPITest#testTessBaseAPIDetectOrientationScript with non-existent datapath HOT 2
- Tesseract CLI gives different results (bounding boxes, text) than Tess4J when creating searchable PDF HOT 2
- Add Support for OSD to the ITesseract interface via a new Recognize method option OR provide a new Interface that allows for OSD Recognition HOT 4
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 tess4j.