Skip to content

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

@SeongJongKwak

Description

@SeongJongKwak

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions