java - 如何在 java 中处理 tessrac 的图像?
问题描述
我正在尝试使用 Tesseract 从下面的图像中读取字符:
这是我用于读取图像的编码。
Tesseract tesseract = new Tesseract();
try {
String text = tesseract.doOCR(new File(path));
// path of your image file
System.out.println(text);
} catch (TesseractException e) {
e.printStackTrace();
}
我未能从图像中获得准确的文本。那么如何在阅读之前处理图像?
解决方案
tesseract 不适合验证码破解。
推荐阅读
- swift - Swift XMLParser 无法解析整个字符串
- excel - 我想创建和打印从 Excel 中的每一行填充的 Word 表单,但有些行已合并单元格
- r - 使用 R 中的 grep 过滤数据框中与正则表达式匹配的变量中的值
- javascript - 不使用 reverse() 方法。如何在反向的字符串上保持原始字符串顺序、空格和标点符号?
- java - Java Native Interface - C++ 不等待 java 函数完成
- swift - 使用 UIPanGestureRecognizer 拖动 CGRect
- c# - 为什么我得到:“IThirdParty”类型是在未引用的程序集中定义的。您必须添加对程序集“ThirdPartyAssembly”的引用吗?
- amazon-web-services - aws lambda 域白名单
- ios - 自定义标签栏在视图控制器之间导航
- c++ - 如何从接口获取派生类?