Questions tagged [tess4j]

Tess4J is a Java JNA wrapper for Tesseract OCR API.

Description

A Java JNA wrapper for Tesseract OCR API.
Tess4J is released and distributed under the Apache License, v2.0.

Releases Versions.

  • Version 1.3 (released : May 31, 2014)
  • Version 2.0 Beta (released : June 1, 2014)
  • Version 3.4.3 (released: 14 January 2018)

Features:

The library provides optical character recognition (OCR) support for:

  • TIFF, JPEG, GIF, PNG, and BMP image formats
  • Multi-page TIFF images
  • PDF document format

Related tags

Links

Tess4J homepage
Tess4J Github

222 questions
0
votes
3 answers

Tess4j Image reading

I am using tess4j api for reading an image for numerics. code as below: public static void main(String[] args) { // TODO Auto-generated method stub final File imageFile = new File("C:\\Users\\goku\\Desktop\\myimage.png"); …
V.B
  • 59
  • 5
0
votes
1 answer

Is it possible to rename png files by the time of creation, not after

I am using File[] imageFile = PdfUtilities.convertPdf2Png(new File("MYPATH")) command to generate png from pdf , which is giving file name as "workingimage01","workingimage02"...."workingimage0n" and so on, is it possible to change this name…
Shubham Chauhan
  • 45
  • 1
  • 2
  • 10
0
votes
1 answer

Unsupported image format. May need to install JAI Image I/O package

I'm trying to convert an image file to text using tess4j maven dependency. Dependency in pom.xml:- net.sourceforge.tess4j tess4j
Anuja
  • 115
  • 3
  • 13
0
votes
0 answers

tess4j NoSuchFieldError: RESOURCE_PREFIX with Primefaces on Glassfish, but not with JUnit

I'm trying to do OCR on PDFs using tess4j, which is working perfectly when I use a JUnit test to 'read' the PDF, but not when I run it using Primefaces FileUpload. The listener calls the OCR class which does exactly the same as the JUnit test,…
danny
  • 358
  • 2
  • 14
0
votes
1 answer

Using tess4j, how can I access method to combine words

I understand that I can ask Tesseract to return text back at word level, textline level, paragraph level, block level. I need to form my own cluster of words, which may be a portion of a text line or include multiple lines. Once I have this cluster…
kane
  • 5,465
  • 6
  • 44
  • 72
0
votes
0 answers

java.io.FileNotFoundException: Source 'D:\JBoss\EAP-7.0.0\bin\content\eArsiv.war\WEB-INF\lib\lept4j-1.2.3.jar\win32-x86-64' does not exist

I was developing an application with Spring Boot and using tess4j for OCR process. It was jar packaging and working well. I just changed packaging to war and deployed to jBoss EAP7.Now i am getting "Source…
Murmelto
  • 162
  • 2
  • 11
0
votes
0 answers

Memory leak when I am using Leptonica (lept4j library)

I encounter with memory leak problem when I use Leptonica(class of lept4j library). When I call LeptUtils.convertImageToPix(fi) function in a for-loop, it goes to OutOfMemoryError: Java heap space exception. for (BufferedImage fi : images) { …
Ruslan Poltaev
  • 91
  • 1
  • 1
  • 5
0
votes
1 answer

"Need to install JAI Image I/O package." error when using tess4j in IntelliJ IDEA Scala SBT project

The below tess4j JARs are part of my Scala SBT project in IntelliJ IDEA and are also added as module dependencies: However, I get a java.lang.RuntimeException: Need to install JAI Image I/O package. https://java.net/projects/jai-imageio/ exception…
bugfoot
  • 667
  • 7
  • 20
0
votes
2 answers

How to detect text blocks and columns in pdf with tess4j

I'm new to Tesseract (tess4j), managed to used main features like reading the text or getting the words positions both from image or pdf, rotating etc.. I can't find, and not sure if it is possible to easily detect blocks of text (paragraphs or…
Djordje Ivanovic
  • 4,151
  • 4
  • 27
  • 49
0
votes
1 answer

What are the coordinates of a rectangle in tess4j doOCR?

I'm trying to use tess4j to scan multipage PDF files. I use the following code: PdfUtilities.splitPdf(imageFile, outputFile, startPage, endPage); List imageList = ImageIOHelper.getIIOImageList(outputFile); String result =…
MrMulliner
  • 49
  • 5
0
votes
1 answer

Is there any way to show tess4j progress in UI (JavaFX)?

I need to display tess4j (OCR Library ) progress in Javafx UI. public void testOCR() { File file = new File("test.png"); ITesseract instance = new Tesseract(); try { String s = instance.doOCR(file); …
mohammadkad
  • 105
  • 1
  • 10
0
votes
2 answers

java.lang.IllegalAccessError: tried to access method net.sourceforge.tess4j.Tesseract.()V from class Tess4jTest.TestTess

I did a Java OCR project with Tesseract in the Mirth.When I run the jar file from the Mirth,I get this error.When I search it,I found that there is a init() method and also it is a protected void in Tesseract.java.I think that maybe it is the reason…
Nevzat Günay
  • 1,039
  • 11
  • 19
0
votes
1 answer

java.lang.NoClassDefFoundError: net/sourceforge/tess4j/TesseractException

I try to do an ocr application for Mirth with Java and Tesseract.I export the project in jar file and call in Mirth with Javascript that did a hello world application.I believe that I add the jar files right way.However I have a problem in Java…
Nevzat Günay
  • 1,039
  • 11
  • 19
0
votes
1 answer

Tess4j and NetBeans Java Programm - Problems "AWT-Eventqueue-0" unsatisfied-link-error

I have programmed a small tool that takes an image and uses tesseract to extract data from it. I have used Java in Netbeans on a 64bit Windows 7 machine. So far, the programm compiles perfectly fine and does what I want - including tesseract -. But…
onkyou
  • 1
  • 1
0
votes
0 answers

Facing set datapath error while using tesseract in java

I am using tesseract to recognize text from pdfs and I am facing some weird error. The error is Error opening data file data/tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your…
ANKIT
  • 126
  • 2
  • 11