Tesseract号码识别无法正常工作(Java)
我试图提取以下png中的数字。令人难以置信的是,它能识别出一些数字,但不是全部 这是我的密码:Tesseract号码识别无法正常工作(Java),java,image-processing,tesseract,tess4j,Java,Image Processing,Tesseract,Tess4j,我试图提取以下png中的数字。令人难以置信的是,它能识别出一些数字,但不是全部 这是我的密码: Tesseract tesseract = new Tesseract(); tesseract.setTessVariable("tessedit_char_whitelist", "0123456789"); tesseract.setTessVariable("user_defined_dpi", "300"); tesseract.setDatapath(System.getProperty(
Tesseract tesseract = new Tesseract();
tesseract.setTessVariable("tessedit_char_whitelist", "0123456789");
tesseract.setTessVariable("user_defined_dpi", "300");
tesseract.setDatapath(System.getProperty("java.io.tmpdir"));
try {
String result = tesseract.doOCR(file);
System.out.println(result);
} catch (TesseractException e) {
e.printStackTrace();
}
输出:
5
1982
这是照片
其余的数字在哪里 您是否尝试过使用不同的PSM值,如4或6?PSM是什么意思?页面分割模式。