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)
- Docker Image with Java 11 + tess4j:5.2.0 + Spring Boot 2.6.6 not working HOT 9
- Getting error Invalid memory access when use Tess4j in JAVA project Netbeans HOT 2
- OCRResult only contains last page's scan
- "createDocumentsWithResults(...)" fails when "filename" is null HOT 2
- Performance degradation for multipaged tiff ocr result HOT 2
- error: Error looking up function 'TessBaseAPIInit5': dlsym(0x7fe46b6d06a0, TessBaseAPIInit5): symbol not found HOT 1
- Tesseract.doOCR() failing on Windows from cmd line for Java 17, works in eclipse HOT 2
- JVM crash on M1 / MacOS with tess4j HOT 4
- Can tess4j be used to convert a pdf with images as content to a searchable pd HOT 2
- doOCR() vs. createDocuments() / createDocumentsWithResults() HOT 4
- meanTextConfidence is 0 for doc with empty last page but non-empty others in createDocumentsWithResults method HOT 2
- java.lang.UnsatisfiedLinkError HOT 4
- 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
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.