Giter Club home page Giter Club logo

Comments (10)

4F2E4A2E avatar 4F2E4A2E commented on August 20, 2024

Please provide the exact mimetype and a test file, thank you.

from tess4j.

brnrc avatar brnrc commented on August 20, 2024

image: https://www.dropbox.com/s/dtb1ra7jqdk9shw/workingimage004.png
uzn: https://www.dropbox.com/s/o2j6atqnwqx7kir/workingimage004.uzn

Run with: tesseract workingimage004.png manual_ocr.txt -psm 4
the output should be

ANNEX TO THE EUROPEAN SEARCH REPORT
ON EUROPEAN PATENT APPLICATION NO.

from tess4j.

brnrc avatar brnrc commented on August 20, 2024

Hey @4F2E4A2E,
Just a friendly question, are you checking on this?
I just want to know if should I wait or try a different solution! Thanks

from tess4j.

4F2E4A2E avatar 4F2E4A2E commented on August 20, 2024

Yes i am, pls get online in skype, thx.

from tess4j.

4F2E4A2E avatar 4F2E4A2E commented on August 20, 2024

Something is not right:

  • the png file provided have a lot more content then two lines
  • the uzn file provided seams to be empty or with just 26Bytes
  • you did not provide the mimetype

Help me out, this kind of format is new to me, in order to help i must be able to be 100% sure of the data integrity of those files and i need to be able to produce the uzn files, thanks.

from tess4j.

4F2E4A2E avatar 4F2E4A2E commented on August 20, 2024

via brucardoso2: https://github.com/OpenGreekAndLatin/greek-dev/wiki/uzn-format

from tess4j.

4F2E4A2E avatar 4F2E4A2E commented on August 20, 2024

Thanks brucardoso2 for introducing me to uzn.
Our lib does support it, but not automated, but it will in our next release. Untill then just parse your uzn and populate the java.awt.Rectangle. Here an example without reading in the uzn file and parsing it:

File imageFile = new File("workingimage004.png");
Tesseract instance = Tesseract.getInstance();  // JNA Interface Mapping
File tessDataFolder = LoadLibs.extractTessResources("tessdata");
instance.setDatapath(tessDataFolder.getAbsolutePath());

//parse the uzn file and create a rectangle obj
Rectangle rect = new Rectangle(600, 213, 1142, 240);
    try {
        String result = instance.doOCR(imageFile, rect);
        System.out.println(result);
    } catch (TesseractException e) {
        System.err.println(e.getMessage());
    }
}

from tess4j.

4F2E4A2E avatar 4F2E4A2E commented on August 20, 2024

A proposal has been created as you can read here: #11
@brucardoso2: can i close this issue?

from tess4j.

brnrc avatar brnrc commented on August 20, 2024

@4F2E4A2E sure

from tess4j.

4F2E4A2E avatar 4F2E4A2E commented on August 20, 2024

Closing issue.

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.