【发布时间】:2019-10-18 07:18:57
【问题描述】:
如何分别突出显示从图像中提取的每个文本。
我提供了将图像转换为文本文件的代码,其中使用 tesseract 作为 OCR 技术。
public class Sample{
public static void main(String[] args)
{
Tesseract tesseract = new Tesseract();
try {
tesseract.setDatapath("D:/Tess4J/tessdata");
String text
= tesseract.doOCR(new File("image.jpg"));
System.out.print(text);
}
catch (TesseractException e) {
e.printStackTrace();
}
}
【问题讨论】: