ywb2018

原文地址

https://blog.csdn.net/RobotBing/article/details/79782720?utm_source=blogxgwz5

 

public class Test01 {
public static void main(String[] args) {
//图片所在文件夹
testTess4j("C:\\Users\\Administrator\\Desktop\\ui");
}
public static void testTess4j(String filePath){
File root = new File(filePath);
ITesseract instance = new Tesseract();

instance.setLanguage("chi_sim");//添加中文字库
try {
File[] files = root.listFiles();
for (File file : files) {

String result = instance.doOCR(file);
String fileName = file.toString().substring(file.toString().lastIndexOf("\\")+1);
System.out.println("图片名:" + file.toString() );
System.out.println(" 识别结果:");
System.out.println(result);
}
} catch (TesseractException e) {
System.err.println(e.getMessage());
}
}
}

 

 

添加中文识别

https://blog.csdn.net/cccchean/article/details/56279577

分类:

技术点:

相关文章:

  • 2021-12-09
  • 2021-10-17
  • 2021-11-15
  • 2021-11-15
  • 2019-01-07
猜你喜欢
  • 2021-12-15
  • 2021-12-15
  • 2021-11-12
  • 2021-07-01
  • 2021-12-25
相关资源
相似解决方案