使用Tesseract with Java从图像中提取文本时出错
**使用Tesseract with Java从图像中提取文本时出错,java,tesseract,Java,Tesseract,** 代码: ** ** 错误 **: 读取参数文件:未找到参数:启用新segsearch签出 作为总结,他们说,当您使用新版本的Tesseract和旧版本的训练数据时,就会发生这种情况。检查两个版本是否相同 > import net.sourceforge.tess4j.*; > > import java.io.File; > > public class imageTest { > > public static void m
- 代码:
- 错误
> import net.sourceforge.tess4j.*;
>
> import java.io.File;
>
> public class imageTest {
>
> public static void main(String[] args) {
>
> Tesseract tesseract = new Tesseract();
> try {
> tesseract.setDatapath("tessdata/");
> String text = tesseract.doOCR(new File("images/01_image.png"));
> System.out.print(text);
> }
>
> catch (TesseractException e) {
> e.printStackTrace();
> }
> } }