GithubHelp home page GithubHelp logo

Comments (8)

4F2E4A2E avatar 4F2E4A2E commented on August 19, 2024 5

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.

4F2E4A2E avatar 4F2E4A2E commented on August 19, 2024

Hi there!

Please post here the main method or class you where are calling the doOCR() method, thx.

from tess4j.

brnrc avatar brnrc commented on August 19, 2024

Sure!

        // Tess4J
        Tesseract instance = Tesseract.getInstance();
        instance.setPageSegMode(4);
        try {
            String content = instance.doOCR(page);
        } catch (TesseractException e) {
            e.printStackTrace();
        }

from tess4j.

brnrc avatar brnrc commented on August 19, 2024

Thank you, this worked!
Is there any documentation on this?

By the way, this led me to another bug #10

from tess4j.

4F2E4A2E avatar 4F2E4A2E commented on August 19, 2024

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.

ramesh-indutech avatar ramesh-indutech commented on August 19, 2024

Thank you, this worked! [4F2E4A2E]

from tess4j.

erochOnGit avatar erochOnGit commented on August 19, 2024

@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.

housme avatar housme commented on August 19, 2024

Is there a distinction between vertical reading and horizontal reading in picture reading?

from tess4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.