Tesseract-OCR识别中文与训练字库的使用方法

在   https://download.csdn.net/download/null111666/11022326

将字库文件下载下来,然后将其放在项目指定位置,系统能够访问到

ITesseract instance=new Tesseract();
instance.setDatapath("tessdata");
instance.setLanguage("chi_sim");
String result=instance.doOCR(new File(filePath));
					

在需要识别的位置写上如上代码,将你要识别的file写在new File()里面。

猜你喜欢

转载自blog.csdn.net/null111666/article/details/88576479