Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dear Shreeshrii, It doesn't work in JAVA. #3

Open
SeongJongKwak opened this issue Oct 28, 2022 · 2 comments
Open

Dear Shreeshrii, It doesn't work in JAVA. #3

SeongJongKwak opened this issue Oct 28, 2022 · 2 comments

Comments

@SeongJongKwak
Copy link

Shreeshrii

It doesn't work in JAVA.
please check. It says there is no file name. Any reason?

import net.sourceforge.tess4j.*;
import java.awt.image.BufferedImage;
 
Tesseract ocr;
BufferedImage img;
PImage pimg;
String res, show;
int idx;

void setup() {
  ocr = new Tesseract();
  ocr.setDatapath(dataPath(""));
  ocr.setLanguage("ssd");
  pimg = loadImage("a4.jpg");
  img = (BufferedImage) pimg.getNative();
  show = "";
  idx = 0;
  try {
    res = ocr.doOCR(img);
    //   println(res);
  } 
  catch (TesseractException e) {
    println(e.getMessage());
  }
  frameRate(25);
}

error message

Failed loading language 'ssd'
Tesseract couldn't load any languages!
@SeongJongKwak
Copy link
Author

The version I’m using: tess4j-3.4.8.jar

@SeongJongKwak
Copy link
Author

Works on tess4j-4.0.0.

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant